Add: settings to limit your fast-forward game speed
By default this setting is set to 2500% normal game speed.
(cherry picked from commit c3dc27e37e
)
# Conflicts:
# src/gfx.cpp
# src/gfx_func.h
# src/settings_type.h
# src/video/cocoa/cocoa_v.mm
# src/video/video_driver.cpp
# src/video/win32_v.cpp
This commit is contained in:

committed by
Jonathan G Rennison

parent
535fdb5c89
commit
f183ded9fe
@@ -290,7 +290,8 @@ static CallBackFunction ToolbarPauseClick(Window *w)
|
||||
*/
|
||||
static CallBackFunction ToolbarFastForwardClick(Window *w)
|
||||
{
|
||||
_fast_forward ^= true;
|
||||
ChangeGameSpeed(_game_speed == 100);
|
||||
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
return CBF_NONE;
|
||||
}
|
||||
@@ -2177,7 +2178,7 @@ struct MainToolbarWindow : Window {
|
||||
this->SetWidgetDirty(WID_TN_PAUSE);
|
||||
}
|
||||
|
||||
if (this->IsWidgetLowered(WID_TN_FAST_FORWARD) != !!_fast_forward) {
|
||||
if (this->IsWidgetLowered(WID_TN_FAST_FORWARD) != (_game_speed != 100)) {
|
||||
this->ToggleWidgetLoweredState(WID_TN_FAST_FORWARD);
|
||||
this->SetWidgetDirty(WID_TN_FAST_FORWARD);
|
||||
}
|
||||
@@ -2564,7 +2565,7 @@ struct ScenarioEditorToolbarWindow : Window {
|
||||
this->SetDirty();
|
||||
}
|
||||
|
||||
if (this->IsWidgetLowered(WID_TE_FAST_FORWARD) != !!_fast_forward) {
|
||||
if (this->IsWidgetLowered(WID_TE_FAST_FORWARD) != (_game_speed != 100)) {
|
||||
this->ToggleWidgetLoweredState(WID_TE_FAST_FORWARD);
|
||||
this->SetDirty();
|
||||
}
|
||||
|
Reference in New Issue
Block a user