Call set_button_state() from playsingle_controller::init_gui()
Fixes the minimap buttons sans the minimap unit/village drawing pair being in an indeterminate overlay-less (blank) state for the duration of the initial 'start' WML event in scenarios, unless they are interacted with first. set_button_state() has to be called after play_controller::init_gui() finishes because that method calls game_display::begin() game first, which in turn instantiates the theme UI GUI1 buttons. Notice that set_button_state() is also called when the End Turn button is enabled (e.g. after 'start' is finished). The reason I'm not calling this from play_controller::init_gui() directly is that I am concerned about possible interactions with the replay_controller, which currently seems to do even sloppier work of the GUI before the end of the 'start' event. I might move this call there if that issue is sorted out, since it'll be needed for the replay_controller anyway.
This commit is contained in:
parent
536458c270
commit
f93b439e13
3 changed files with 9 additions and 0 deletions
|
@ -28,6 +28,9 @@ Version 1.11.15+dev:
|
|||
* Fixed the WML load error dialog not displaying an add-on name instead of
|
||||
falling back to its directory name if the add-on contains an outdated
|
||||
_info.cfg file lacking an [info]title= value.
|
||||
* Fixed most of the minimap buttons and the End Turn button appearing
|
||||
without contents or in the wrong state during WML start events until they
|
||||
are interacted with or control is given to the player for the first time.
|
||||
* WML engine:
|
||||
* Fixed a regression in 1.11.14 causing WML parser/preprocessor errors to
|
||||
not interrupt the game load sequence or display an error message in-game,
|
||||
|
|
|
@ -6,6 +6,11 @@ Version 1.11.15+dev:
|
|||
* Language and i18n:
|
||||
* Updated translations:
|
||||
|
||||
* User interface:
|
||||
* Fixed most of the minimap buttons and the End Turn button appearing
|
||||
without contents or in the wrong state during WML start events until they
|
||||
are interacted with or control is given to the player for the first time.
|
||||
|
||||
* WML engine:
|
||||
* Fixed a regression in 1.11.14 causing WML parser/preprocessor errors to
|
||||
not interrupt the game load sequence or display an error message in-game,
|
||||
|
|
|
@ -101,6 +101,7 @@ void playsingle_controller::init_gui(){
|
|||
gui_->scroll_to_tile(map_.starting_position(1), game_display::WARP);
|
||||
|
||||
update_locker lock_display(gui_->video(),recorder.is_skipping());
|
||||
set_button_state(*gui_);
|
||||
events::raise_draw_event();
|
||||
gui_->draw();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue