[Commits] [wesnoth/wesnoth] d7b564: GUI2/Widget: added ability to set widget alignment...

GitHub noreply at github.com
Sat Apr 8 03:40:04 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: d7b564e2a71bf473a666f184302273ec23be2856
      https://github.com/wesnoth/wesnoth/commit/d7b564e2a71bf473a666f184302273ec23be2856
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-04-08 (Sat, 08 Apr 2017)

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

  Log Message:
  -----------
  GUI2/Widget: added ability to set widget alignment on the fly


  Commit: 5fbd4a727bce7cabbe80e9da17cc44de7a67ddad
      https://github.com/wesnoth/wesnoth/commit/5fbd4a727bce7cabbe80e9da17cc44de7a67ddad
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-04-08 (Sat, 08 Apr 2017)

  Changed paths:
    M data/gui/widget/panel_story_viewer.cfg
    M data/gui/window/story_viewer.cfg
    M src/gui/dialogs/story_viewer.cpp

  Log Message:
  -----------
  Story Viewer: deployed new alignment set API

The set_origin method worked, but not in every circumstance. For example, if the story box were not aligned to the bottom of the
screen in the initial part, it would not be correctly place. If you resized the screen while the box was not at the bottom, it
would return there. This was due to set_origin being purely temporary - ie, the layout engine did not record the new position,
and when invalidate_layout was called, the default (per the dialog WML) position of 'bottom' was restored.

This new method fixes the above issues. It also fixes an issue the old GUI2 screen had where a top-aligned box would also obscure
any available title.


Compare: https://github.com/wesnoth/wesnoth/compare/2053362c97e4...5fbd4a727bce


More information about the Commits mailing list