[Commits] [wesnoth/wesnoth] f93b43: Call set_button_state() from playsingle_controller...

GitHub noreply at github.com
Fri Jun 13 23:40:12 UTC 2014


  Branch: refs/heads/1.12
  Home:   https://github.com/wesnoth/wesnoth
  Commit: f93b439e13731a49c09658a894a12a364af0b608
      https://github.com/wesnoth/wesnoth/commit/f93b439e13731a49c09658a894a12a364af0b608
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-13 (Fri, 13 Jun 2014)

  Changed paths:
    M changelog
    M players_changelog
    M src/playsingle_controller.cpp

  Log Message:
  -----------
  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.





More information about the Commits mailing list