Editor: fixed ToD setting having no visible effect
This commit is contained in:
parent
f43469e3c2
commit
94c9e5e604
2 changed files with 8 additions and 6 deletions
|
@ -640,7 +640,7 @@ bool editor_controller::execute_command(const hotkey::hotkey_command& cmd, int i
|
|||
context_manager_->get_map_context().set_starting_time(index);
|
||||
const tod_manager* tod = context_manager_->get_map_context().get_time_manager();
|
||||
tod_color col = tod->times()[index].color;
|
||||
image::set_color_adjustment(col.r, col.g, col.b);
|
||||
gui_->adjust_color_overlay(col.r, col.g, col.b);
|
||||
return true;
|
||||
}
|
||||
case LOCAL_TIME:
|
||||
|
@ -666,7 +666,7 @@ bool editor_controller::execute_command(const hotkey::hotkey_command& cmd, int i
|
|||
context_manager_->get_map_context().replace_schedule(iter->second.second);
|
||||
const tod_manager* tod = context_manager_->get_map_context().get_time_manager();
|
||||
tod_color col = tod->times()[0].color;
|
||||
image::set_color_adjustment(col.r, col.g, col.b);
|
||||
gui_->adjust_color_overlay(col.r, col.g, col.b);
|
||||
return true;
|
||||
}
|
||||
case LOCAL_SCHEDULE:
|
||||
|
|
|
@ -178,10 +178,6 @@ const time_of_day& custom_tod::get_selected_tod() const
|
|||
|
||||
void custom_tod::update_tod_display(window& window)
|
||||
{
|
||||
::image::set_color_adjustment(tod_red_field_->get_value(),
|
||||
tod_green_field_->get_value(),
|
||||
tod_blue_field_->get_value());
|
||||
|
||||
// Prevent a floating slice of window appearing alone over the
|
||||
// theme UI sidebar after redrawing tiles and before we have a
|
||||
// chance to redraw the rest of this window.
|
||||
|
@ -196,6 +192,12 @@ void custom_tod::update_tod_display(window& window)
|
|||
// If this ceases to be the case in the future, you'll need to call
|
||||
// redraw_everything() instead.
|
||||
|
||||
display_.adjust_color_overlay(
|
||||
tod_red_field_->get_value(),
|
||||
tod_green_field_->get_value(),
|
||||
tod_blue_field_->get_value()
|
||||
);
|
||||
|
||||
// invalidate all tiles so they are redrawn with the new ToD tint next
|
||||
display_.invalidate_all();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue