From cd8c83532b0d33a3a2e24d9af04dac0455a84625:
gui::slider* s = gui().find_slider("map-zoom-slider");
if (point_in_rect(event.x, event.y, s->location())) {
scrollx = 0; scrolly = 0;
}
s is not guaranteed to not be NULL. display::find_slider() WILL return
NULL if it can't find the requested widget. As it turns out, the editor
currently lacks a slider called "map-zoom-slider".
...with fast switching between them. Can be disabled in the editor
settings. Also changed:
* the display class now holds a pointer to the map instead of a
reference, a pointer can be changed which permits the entire MDI
behavior. Related bits were also changed in terrain_builder.
* mouse_handler_base no longer holds a reference to the map
* the map labels class does not hold a gamemap reference, as it can
use the display object to access the map. Also clearing all labels
was exposed as a public member function.
* used scoped_ptrs and forward declarations to avoid having to include
map_label.hpp and terrain_builder.hpp in display.hpp, this reduces
build dependencies quite a bit.
* made get_action_state use the menu index to allow a dynamic menu to
have checkboxes. This entire chunk of code needs a rewrite.
...move into separate cpp/hpp pair. The code under src/ was modified
mainly using a global search-and-replace. This change allows reducing
code dependencies and gets rid of inner-class confusion (parts of the
code had to use "location" when referring to gamemap::location, it is
now consistent across the codebase.)
...(paint with bg terrain, deselect, remove starting pos). The drag
handling code should probably be moved from the editor into
mouse_handler_base, but it's not needed in the game at the moment.
* Implement very basic single hex drawing
* Framework for mouse actions
* Merge editor_mouse_handler with editor_controller (required some
slight changes in mouse_handler_base and mouse_handler)
* Minor changes that would be difficult to separate now and commit on
their own
* move generic code (that could be used by editor2) into a base class
(in a separate hpp/cpp pair)
* split attack prediction display classes into separate files This is
still work in progress and is likely to change further as I actually
make use of it in editor2.