mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-12 03:55:45 +00:00
Always highlight hp bars of the slected unit,
...not only the one under the mouse More consistent with the highlighting of the unit's sprite and prevent a sort of false de-selection feeling when the bar darkening Thanks to uso for the idea.
This commit is contained in:
parent
b528e49333
commit
184372e0dc
@ -1832,7 +1832,7 @@ void unit::redraw_unit(game_display& disp, const gamemap::location& loc, const b
|
||||
#endif
|
||||
const int hp_bar_height = static_cast<int>(max_hitpoints()*game_config::hp_bar_scaling);
|
||||
|
||||
const fixed_t bar_alpha = loc == disp.mouseover_hex() ? ftofxp(1.0): ftofxp(0.8);
|
||||
const fixed_t bar_alpha = (loc == disp.mouseover_hex() || loc == disp.selected_hex()) ? ftofxp(1.0): ftofxp(0.8);
|
||||
|
||||
disp.draw_bar(*energy_file, xsrc+bar_shift, ysrc_adjusted, hp_bar_height, unit_energy,hp_color(), bar_alpha);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user