show the debug command notification longer

as requested in http://gna.org/bugs/index.php?18693
This commit is contained in:
gfgtdf 2016-08-08 17:26:12 +02:00
parent f4ac23a3c5
commit 92cd7fee25
3 changed files with 4 additions and 4 deletions

View file

@ -1949,13 +1949,13 @@ void display::enable_menu(const std::string& item, bool enable)
}
}
void display::announce(const std::string& message, const SDL_Color& color)
void display::announce(const std::string& message, const SDL_Color& color, int lifetime)
{
font::floating_label flabel(message);
flabel.set_font_size(font::SIZE_XLARGE);
flabel.set_color(color);
flabel.set_position(map_outside_area().w/2, map_outside_area().h/3);
flabel.set_lifetime(100);
flabel.set_lifetime(lifetime);
flabel.set_clip_rect(map_outside_area());
font::add_floating_label(flabel);

View file

@ -612,7 +612,7 @@ public:
/** Announce a message prominently. */
void announce(const std::string& msg,
const SDL_Color& color = font::GOOD_COLOR);
const SDL_Color& color = font::GOOD_COLOR, int lifetime = 100);
/**
* Schedule the minimap for recalculation.

View file

@ -390,7 +390,7 @@ namespace
{
utils::string_map symbols;
symbols["player"] = resources::controller->current_team().current_player();
resources::screen->announce(vgettext(message, symbols), font::NORMAL_COLOR);
resources::screen->announce(vgettext(message, symbols), font::NORMAL_COLOR, 1000);
}
}
SYNCED_COMMAND_HANDLER_FUNCTION(debug_unit, child, use_undo, /*show*/, /*error_handler*/)