Fix selection under brush in editor.
It disabled selection brightening under the brush, making the brush more visible but the selection area less clear in some cases. Looking at the code, it looks like an unwanted result from another change. I also move the brush layer to the cursor layer. Make sense and help to better see the brush to compensate the first change.
This commit is contained in:
parent
98ec7151a2
commit
0d391b6d44
1 changed files with 2 additions and 4 deletions
|
@ -63,9 +63,7 @@ void editor_display::pre_draw()
|
|||
|
||||
image::TYPE editor_display::get_image_type(const map_location& loc)
|
||||
{
|
||||
if (brush_locations_.find(loc) != brush_locations_.end()) {
|
||||
return image::TOD_COLORED;
|
||||
} else if (map().in_selection(loc)) {
|
||||
if (map().in_selection(loc)) {
|
||||
return image::BRIGHTENED;
|
||||
}
|
||||
return image::TOD_COLORED;
|
||||
|
@ -84,7 +82,7 @@ void editor_display::draw_hex(const map_location& loc)
|
|||
|
||||
if (brush_locations_.find(loc) != brush_locations_.end()) {
|
||||
static const image::locator brush(game_config::images::editor_brush);
|
||||
drawing_buffer_add(LAYER_MOUSEOVER_OVERLAY, loc, xpos, ypos,
|
||||
drawing_buffer_add(LAYER_SELECTED_HEX, loc, xpos, ypos,
|
||||
image::get_image(brush, image::SCALED_TO_HEX));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue