[Commits] [wesnoth/wesnoth] 485441: gui2/tstacked_widget: Add single layer mode and la...

GitHub noreply at github.com
Sat Jul 11 03:22:27 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 4854413f7526c38cf74d84fa9b75292556bb3aa0
      https://github.com/wesnoth/wesnoth/commit/4854413f7526c38cf74d84fa9b75292556bb3aa0
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2015-07-11 (Sat, 11 Jul 2015)

  Changed paths:
    M changelog
    M src/gui/widgets/stacked_widget.cpp
    M src/gui/widgets/stacked_widget.hpp

  Log Message:
  -----------
  gui2/tstacked_widget: Add single layer mode and layer switching

This effectively allows us to use stacked_widget as part of the
implementation of tabbed dialogs like Preferences.

The most important thing here is making sure individual layers are
selected so that they can receive events. This works fine in testing,
and it's much easier for me to take an existing widget and adapt it for
my purposes rather than build a new one from scratch.

Another important thing is not selecting the same layer twice. This
apparently deselects it instead.

Finally, existing applications like the titlescreen are unaffected.


  Commit: 86df4a9250c0d4d0b8dbda9520964bb3656b94eb
      https://github.com/wesnoth/wesnoth/commit/86df4a9250c0d4d0b8dbda9520964bb3656b94eb
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2015-07-11 (Sat, 11 Jul 2015)

  Changed paths:
    M src/gui/widgets/stacked_widget.cpp
    M src/gui/widgets/stacked_widget.hpp

  Log Message:
  -----------
  gui2/tstacked_widget: Add getter for the total number of layers


  Commit: 6c97b05f84092102f41eaebc18306f8e458c9854
      https://github.com/wesnoth/wesnoth/commit/6c97b05f84092102f41eaebc18306f8e458c9854
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2015-07-11 (Sat, 11 Jul 2015)

  Changed paths:
    M changelog
    M src/gui/widgets/widget.cpp
    M src/gui/widgets/widget.hpp

  Log Message:
  -----------
  gui2/twidget: Recursively check visibility of parents in is_at()

This fixes an issue where visible children widgets can be interacted
with even if one of their parents is hidden. This fix is particularly
important for the implementation of layer selection in tstacked_widget.


Compare: https://github.com/wesnoth/wesnoth/compare/a9d014665673...6c97b05f8409


More information about the Commits mailing list