本文整理汇总了C++中window::undraw方法的典型用法代码示例。如果您正苦于以下问题:C++ window::undraw方法的具体用法?C++ window::undraw怎么用?C++ window::undraw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类window
的用法示例。
在下文中一共展示了window::undraw方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: update_tod_display
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.
window.undraw();
// NOTE: We only really want to re-render the gamemap tiles here.
// Redrawing everything is a significantly more expensive task.
// At this time, tiles are the only elements on which ToD tint is
// meant to have a visible effect. This is very strongly tied to
// the image caching mechanism.
//
// If this ceases to be the case in the future, you'll need to call
// redraw_everything() instead.
// invalidate all tiles so they are redrawn with the new ToD tint next
display_.invalidate_all();
// redraw tiles
display_.draw(false);
window.invalidate_layout();
}
示例2: update_tod_display
void custom_tod::update_tod_display(window& window)
{
display* disp = display::get_singleton();
assert(disp && "Display pointer is null!");
// 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.
window.undraw();
// NOTE: We only really want to re-render the gamemap tiles here.
// Redrawing everything is a significantly more expensive task.
// At this time, tiles are the only elements on which ToD tint is
// meant to have a visible effect. This is very strongly tied to
// the image caching mechanism.
//
// If this ceases to be the case in the future, you'll need to call
// redraw_everything() instead.
disp->update_tod(&get_selected_tod());
// invalidate all tiles so they are redrawn with the new ToD tint next
disp->invalidate_all();
// redraw tiles
disp->draw(false);
// NOTE: revert to invalidate_layout if necessary to display the ToD mask image.
window.set_is_dirty(true);
}