editor2: more pronounced selection display
Draw a bold grid around selected hexes instead of just highlighting them. Should be very noticeable both with and without the standard grid active.
This commit is contained in:
parent
7e8d200ef9
commit
cb652e672a
4 changed files with 18 additions and 1 deletions
BIN
images/editor/selection-overlay.png
Normal file
BIN
images/editor/selection-overlay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -96,7 +96,6 @@ void editor_action_area::extend(const editor_map& map, const std::set<gamemap::l
|
|||
|
||||
void editor_action_paste::extend(const editor_map& map, const std::set<gamemap::location>& locs)
|
||||
{
|
||||
LOG_ED << "Area extend\n";
|
||||
paste_.add_tiles(map, locs);
|
||||
}
|
||||
editor_action_paste* editor_action_paste::perform(map_context& mc) const
|
||||
|
|
|
@ -75,6 +75,21 @@ image::TYPE editor_display::get_image_type(const gamemap::location& loc)
|
|||
return image::SCALED_TO_HEX;
|
||||
}
|
||||
|
||||
void editor_display::draw_hex(const gamemap::location& loc)
|
||||
{
|
||||
const bool on_map = map_.on_board(loc);
|
||||
const bool is_shrouded = shrouded(loc);
|
||||
int xpos = get_location_x(loc);
|
||||
int ypos = get_location_y(loc);
|
||||
int drawing_order = gamemap::get_drawing_order(loc);
|
||||
tblit blit(xpos, ypos);
|
||||
display::draw_hex(loc);
|
||||
if (on_map && map().in_selection(loc)) {
|
||||
drawing_buffer_add(LAYER_FOG_SHROUD, drawing_order, tblit(xpos, ypos,
|
||||
image::get_image("editor/selection-overlay.png", image::SCALED_TO_HEX)));
|
||||
}
|
||||
}
|
||||
|
||||
const SDL_Rect& editor_display::get_clip_rect()
|
||||
{
|
||||
return map_outside_area();
|
||||
|
|
|
@ -40,6 +40,9 @@ protected:
|
|||
* The editor uses different rules for terrain highligting (e.g. selections)
|
||||
*/
|
||||
image::TYPE get_image_type(const gamemap::location& loc);
|
||||
|
||||
void draw_hex(const gamemap::location& loc);
|
||||
|
||||
const SDL_Rect& get_clip_rect();
|
||||
void draw_sidebar();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue