Multiplayer map descriptions.
The "Across the river" map description is obviously just an example of use. To be replaced with a proper description.
This commit is contained in:
parent
b98256b407
commit
5b91500d03
3 changed files with 12 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
|||
[multiplayer]
|
||||
id=multiplayer_test
|
||||
name= _ "Across The River"
|
||||
description= _ "This map is a convenient way to do some testing with two factions, as it is pretty well balanced towards both sides.
|
||||
You can use it AI vs AI to see how well a faction fares against another."
|
||||
map_data="ffffffffffffffgggggggggggggggggggggggg
|
||||
ffffffffffffffffgggggggggggggggCgggtgg
|
||||
ffffffffffffffffggggggggggggggC1Cggggg
|
||||
|
|
|
@ -379,6 +379,9 @@ lobby::RESULT multiplayer_game_setup_dialog::process()
|
|||
if(map_changed) {
|
||||
generator_.assign(NULL);
|
||||
|
||||
SDL_Rect minimap_rect = minimap_restorer_.area();
|
||||
tooltips::clear_tooltips(minimap_rect);
|
||||
|
||||
const size_t select = size_t(maps_menu_->selection());
|
||||
|
||||
if(select < user_maps_.size()) {
|
||||
|
@ -407,6 +410,10 @@ lobby::RESULT multiplayer_game_setup_dialog::process()
|
|||
if(scenario_data_["map_generation"] != "") {
|
||||
generator_.assign(create_map_generator(scenario_data_["map_generation"],scenario_data_.child("generator")));
|
||||
}
|
||||
|
||||
if(scenario_data_["description"].empty() == false) {
|
||||
tooltips::add_tooltip(minimap_rect,scenario_data_["description"]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ RESULT enter(display& disp, config& game_data, const config& terrain_data, dialo
|
|||
const preferences::display_manager disp_manager(&disp);
|
||||
const hotkey::basic_handler key_handler(&disp);
|
||||
const video_change_detector disp_change_detector(disp.video());
|
||||
const tooltips::manager tooltips_manager(disp);
|
||||
|
||||
CKey key;
|
||||
|
||||
|
@ -267,6 +268,8 @@ RESULT enter(display& disp, config& game_data, const config& terrain_data, dialo
|
|||
|
||||
const bool left_button = mouse_flags&SDL_BUTTON_LMASK;
|
||||
|
||||
tooltips::process(mousex,mousey,left_button);
|
||||
|
||||
if(dlg != NULL) {
|
||||
const RESULT res = dlg->process();
|
||||
if(res != CONTINUE) {
|
||||
|
|
Loading…
Add table
Reference in a new issue