mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-02 20:01:21 +00:00
Make gold hex cursor appear above all terrain when no unit visible
Fixes one of the issues identified in http://forums.wesnoth.org/viewtopic.php?f=4&t=35886
This commit is contained in:
parent
18b67149a9
commit
702d49cd0f
@ -2080,13 +2080,6 @@ void display::draw_hex(const map_location& loc) {
|
||||
drawing_buffer_add(LAYER_FOG_SHROUD, loc, xpos, ypos, get_fog_shroud_images(loc, image_type));
|
||||
}
|
||||
|
||||
if(on_map && loc == mouseoverHex_) {
|
||||
drawing_buffer_add(LAYER_MOUSEOVER_TOP,
|
||||
loc, xpos, ypos, image::get_image("misc/hover-hex-top.png", image::SCALED_TO_HEX));
|
||||
drawing_buffer_add(LAYER_MOUSEOVER_BOTTOM,
|
||||
loc, xpos, ypos, image::get_image("misc/hover-hex-bottom.png", image::SCALED_TO_HEX));
|
||||
}
|
||||
|
||||
if (on_map) {
|
||||
if (draw_coordinates_) {
|
||||
int off_x = xpos + hex_size()/2;
|
||||
|
@ -85,6 +85,10 @@ void editor_display::draw_hex(const map_location& loc)
|
||||
drawing_buffer_add(LAYER_SELECTED_HEX, loc, xpos, ypos,
|
||||
image::get_image(brush, image::SCALED_TO_HEX));
|
||||
}
|
||||
if (map().on_board(loc) && loc == mouseoverHex_) {
|
||||
drawing_buffer_add(LAYER_MOUSEOVER_BOTTOM, loc, xpos, ypos,
|
||||
image::get_image("misc/hover-hex.png", image::SCALED_TO_HEX));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -321,6 +321,17 @@ void game_display::draw_hex(const map_location& loc)
|
||||
image::TYPE image_type = get_image_type(loc);
|
||||
|
||||
display::draw_hex(loc);
|
||||
|
||||
if(on_map && loc == mouseoverHex_) {
|
||||
tdrawing_layer hex_top_layer = LAYER_MOUSEOVER_BOTTOM;
|
||||
if( get_visible_unit(loc, teams_[viewing_team()] ) != NULL ) {
|
||||
hex_top_layer = LAYER_MOUSEOVER_TOP;
|
||||
}
|
||||
drawing_buffer_add( hex_top_layer,
|
||||
loc, xpos, ypos, image::get_image("misc/hover-hex-top.png", image::SCALED_TO_HEX));
|
||||
drawing_buffer_add(LAYER_MOUSEOVER_BOTTOM,
|
||||
loc, xpos, ypos, image::get_image("misc/hover-hex-bottom.png", image::SCALED_TO_HEX));
|
||||
}
|
||||
|
||||
if(!is_shrouded) {
|
||||
typedef overlay_map::const_iterator Itor;
|
||||
|
Loading…
x
Reference in New Issue
Block a user