Add a tool tip to blip rate settings
Adapt the blip rate to allow variable speed value array sizes
This commit is contained in:
parent
455e020b19
commit
5c69d10cd5
@ -144,7 +144,7 @@ public:
|
|||||||
//Returns the value of ooc_name in config.ini
|
//Returns the value of ooc_name in config.ini
|
||||||
QString get_ooc_name();
|
QString get_ooc_name();
|
||||||
|
|
||||||
//Returns the blip rate from config.ini
|
//Returns the blip rate from config.ini (once per X symbols)
|
||||||
int read_blip_rate();
|
int read_blip_rate();
|
||||||
|
|
||||||
//Returns true if blank blips is enabled in config.ini and false otherwise
|
//Returns true if blank blips is enabled in config.ini and false otherwise
|
||||||
|
@ -319,6 +319,8 @@ AOOptionsDialog::AOOptionsDialog(QWidget *parent, AOApplication *p_ao_app) : QDi
|
|||||||
ui_bliprate_spinbox = new QSpinBox(ui_audio_widget);
|
ui_bliprate_spinbox = new QSpinBox(ui_audio_widget);
|
||||||
ui_bliprate_spinbox->setValue(p_ao_app->read_blip_rate());
|
ui_bliprate_spinbox->setValue(p_ao_app->read_blip_rate());
|
||||||
ui_bliprate_spinbox->setMinimum(1);
|
ui_bliprate_spinbox->setMinimum(1);
|
||||||
|
ui_bliprate_spinbox->setToolTip(tr("Play a blip sound \"once per every X symbols\", where "
|
||||||
|
"X is the blip rate."));
|
||||||
|
|
||||||
ui_audio_layout->setWidget(6, QFormLayout::FieldRole, ui_bliprate_spinbox);
|
ui_audio_layout->setWidget(6, QFormLayout::FieldRole, ui_bliprate_spinbox);
|
||||||
|
|
||||||
|
@ -2275,13 +2275,11 @@ void Courtroom::chat_tick()
|
|||||||
|
|
||||||
if (f_character != ' ' || blank_blip)
|
if (f_character != ' ' || blank_blip)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (blip_pos % blip_rate == 0 && !formatting_char)
|
if (blip_pos % blip_rate == 0 && !formatting_char)
|
||||||
{
|
{
|
||||||
blip_pos = 0;
|
blip_pos = 0;
|
||||||
blip_player->blip_tick();
|
blip_player->blip_tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
++blip_pos;
|
++blip_pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2289,14 +2287,15 @@ void Courtroom::chat_tick()
|
|||||||
|
|
||||||
// Restart the timer, but according to the newly set speeds, if there were any.
|
// Restart the timer, but according to the newly set speeds, if there were any.
|
||||||
// Keep the speed at bay.
|
// Keep the speed at bay.
|
||||||
|
int max_speed = sizeof(message_display_speed) / sizeof(message_display_speed[0]); //7 entries by default
|
||||||
if (current_display_speed < 0)
|
if (current_display_speed < 0)
|
||||||
{
|
{
|
||||||
current_display_speed = 0;
|
current_display_speed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current_display_speed > 6)
|
if (current_display_speed >= max_speed)
|
||||||
{
|
{
|
||||||
current_display_speed = 6;
|
current_display_speed = max_speed-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we had a formatting char, we shouldn't wait so long again, as it won't appear!
|
// If we had a formatting char, we shouldn't wait so long again, as it won't appear!
|
||||||
|
Loading…
Reference in New Issue
Block a user