vertically aligned text in attack dialogs
This commit is contained in:
parent
92024220c1
commit
12d166637e
3 changed files with 4 additions and 3 deletions
|
@ -1067,7 +1067,7 @@ size_t move_unit(display* disp, const game_data& gamedata, const gamemap& map,
|
|||
//if we use fog or shroud, see if we have sighted an enemy unit, in
|
||||
//which case we should stop immediately.
|
||||
if(teams[team_num].uses_shroud() || teams[team_num].uses_fog()) {
|
||||
if(units.count(*step) == 0) {
|
||||
if(units.count(*step) == 0 && map.underlying_terrain(map.get_terrain(*step)) != gamemap::TOWER) {
|
||||
units.insert(std::pair<gamemap::location,unit>(*step,ui->second));
|
||||
const bool res = clear_shroud_unit(map,gamedata,units,*step,teams,
|
||||
ui->second.side()-1,&seen_units);
|
||||
|
|
|
@ -483,7 +483,6 @@ void show_preferences_dialog(display& disp)
|
|||
side_colours_button.set_x(slider_left + fullscreen_button.width() + 100);
|
||||
side_colours_button.set_y(sound_pos + 80 + 100);
|
||||
|
||||
|
||||
gui::button hotkeys_button (disp,string_table["hotkeys_button"]);
|
||||
hotkeys_button.set_x(slider_left + fullscreen_button.width() + 100);
|
||||
hotkeys_button.set_y(sound_pos + 80 + 150);
|
||||
|
|
|
@ -355,7 +355,9 @@ void menu::draw_item(int item)
|
|||
}
|
||||
|
||||
} else {
|
||||
font::draw_text(display_,area,menu_font_size,font::NORMAL_COLOUR,str,xpos,rect.y);
|
||||
const SDL_Rect& text_size = font::draw_text(NULL,area,menu_font_size,font::NORMAL_COLOUR,str,xpos,rect.y);
|
||||
const size_t y = rect.y + (rect.h - text_size.h)/2;
|
||||
font::draw_text(display_,area,menu_font_size,font::NORMAL_COLOUR,str,xpos,y);
|
||||
}
|
||||
xpos += widths[i];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue