After testing, it seems these calls to raise_draw_event and display/game_display::draw()
were unnecessary - or at least, became unnecessary at some point. One or two are definitely
still needed, but removing these doesn't seem to cause anything to to glitch out. Likely
explanation is anything that needs updating just gets updated either immediately or on the
next play_slice loop.
This slider hasn't worked in ages, and we're planning to remove it anyway.
The slider "groove" image remains since it's hard drawn in the background image file.
This commit still doesn't fix all of them. I decided to leave alone
cases where variables with the same name are assigned in multiple
conditions of the same if...else if...else statement, and cases where a
scope logging macro is used multiple times in the same scope. In any
case, this commit greatly reduces the warning count on MSVC2015 and makes
new warnings much easier to spot.
This re-creates the main display-gui() buttons on a full redraw to take
into account that the theme expects them to be out of sync. As a
consequence I have also been forced to refactor how said buttons are
managed and introduced a new method to join the same event context
as another component.
This removes all legacy SDL1.2 code. It was done by invoking:
coan source --replace --no-transients -D"SDL_VERSION_ATLEAST(X, Y, Z)"=1 <file>
on each file.
For Apple, control is the modifier key that is used for contextual menus.
KMOD_CTRL will check for a control-click. This fixes#15259 (https://gna.org/bugs/?15259). (I’ve built and verified with this patch, it works correctly.)
This is the result of running command, in src/,
find . -type f -exec sed -i 's/\(WRN.*\)\\n\"\;/\1\" << std::endl\;/g' '{}' \;
and inspecting the results.
Also ran this subsequently:
find . -type f -exec sed -i 's/\(WARN.*\)\\n\"\;/\1\" << std::endl\;/g' '{}' \;
which only affected render.cpp
From cd8c83532b:
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".