[Commits] [wesnoth/wesnoth] a5f8d6: Add initial support for GUI layering

GitHub noreply at github.com
Sat Jan 30 02:34:33 UTC 2016


  Branch: refs/heads/guifixes
  Home:   https://github.com/wesnoth/wesnoth
  Commit: a5f8d62a75d979ed897b4e5a3271016827f68bd0
      https://github.com/wesnoth/wesnoth/commit/a5f8d62a75d979ed897b4e5a3271016827f68bd0
  Author: Andreas Löf <andreas at alternating.net>
  Date:   2016-01-30 (Sat, 30 Jan 2016)

  Changed paths:
    M src/controller_base.hpp
    M src/gui/auxiliary/event/handler.cpp
    M src/show_dialog.hpp
    M src/storyscreen/render.cpp
    M src/storyscreen/render.hpp
    M src/video.cpp
    M src/video.hpp
    M src/widgets/widget.cpp
    M src/widgets/widget.hpp

  Log Message:
  -----------
  Add initial support for GUI layering

This introduces a subclass of events::sdl_handler that keeps track of
all instantiated classes. When a new instance is created it's pushed
onto a list of all tracked instances. When an instance is destroyed,
all known instances are sent a resize event (under SDL2) to mark them
as dirty. After that there's a DRAW_ALL event pushed onto the event
queue to cause a redraw. There's currently no logic in place to ensure
that there's only one DRAW_ALL event in the event queue at any given
time, but it should be harmless as long as no components are marked as
dirty.





More information about the Commits mailing list