mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-13 18:51:13 +00:00
removed the #define show_dialog2 show_dialog in show_dialog.hpp...
...and cleanup the errors caused by that change
This commit is contained in:
parent
8f70633d65
commit
6cc4630c14
@ -113,7 +113,7 @@ void advance_unit(const game_data& info,
|
||||
std::vector<gui::preview_pane*> preview_panes;
|
||||
preview_panes.push_back(&unit_preview);
|
||||
|
||||
res = gui::show_dialog2(gui,NULL,_("Advance Unit"),
|
||||
res = gui::show_dialog(gui,NULL,_("Advance Unit"),
|
||||
_("What should our victorious unit become?"),
|
||||
gui::OK_ONLY, &lang_options, &preview_panes);
|
||||
}
|
||||
@ -596,7 +596,7 @@ std::string load_game_dialog(display& disp, const config& game_config, const gam
|
||||
if(show_replay != NULL)
|
||||
options.push_back(gui::check_item(_("Show replay"),false));
|
||||
|
||||
const int res = gui::show_dialog2(disp,NULL,
|
||||
const int res = gui::show_dialog(disp,NULL,
|
||||
_("Load Game"),
|
||||
_("Choose the game to load"),
|
||||
gui::OK_CANCEL,&items,&preview_panes,"",NULL,-1,&options,-1,-1,NULL,&buttons,"",&sorter);
|
||||
|
@ -806,7 +806,7 @@ bool game_controller::new_campaign()
|
||||
return false;
|
||||
}
|
||||
|
||||
res = gui::show_dialog2(disp(),NULL,_("Campaign"),
|
||||
res = gui::show_dialog(disp(),NULL,_("Campaign"),
|
||||
_("Choose the campaign you want to play:"),
|
||||
gui::OK_CANCEL,&campaign_names,&preview_panes);
|
||||
|
||||
@ -830,7 +830,7 @@ bool game_controller::new_campaign()
|
||||
std::copy(difficulties.begin(),difficulties.end(),difficulty_options.begin());
|
||||
}
|
||||
|
||||
const int res = gui::show_dialog2(disp(),NULL,_("Difficulty"),
|
||||
const int res = gui::show_dialog(disp(),NULL,_("Difficulty"),
|
||||
_("Select difficulty level:"),
|
||||
gui::OK_CANCEL,&difficulty_options);
|
||||
if(res == -1) {
|
||||
@ -1316,7 +1316,7 @@ bool game_controller::change_language()
|
||||
}
|
||||
}
|
||||
|
||||
const int res = gui::show_dialog2(disp(),NULL,_("Language"),
|
||||
const int res = gui::show_dialog(disp(),NULL,_("Language"),
|
||||
_("Choose your preferred language:"),
|
||||
gui::OK_CANCEL,&langs);
|
||||
if(size_t(res) < langs.size()) {
|
||||
|
@ -260,7 +260,7 @@ namespace events{
|
||||
}
|
||||
|
||||
if (items_sub.empty() == false) {
|
||||
gui::show_dialog2(*gui_, NULL, "", title, gui::CLOSE_ONLY, &items_sub);
|
||||
gui::show_dialog(*gui_, NULL, "", title, gui::CLOSE_ONLY, &items_sub);
|
||||
button_flush = new input_blocker();
|
||||
}
|
||||
}
|
||||
@ -344,7 +344,7 @@ namespace events{
|
||||
std::vector<gui::preview_pane*> preview_panes;
|
||||
preview_panes.push_back(&unit_preview);
|
||||
|
||||
selected = gui::show_dialog2(*gui_,NULL,_("Unit List"),"",
|
||||
selected = gui::show_dialog(*gui_,NULL,_("Unit List"),"",
|
||||
gui::OK_ONLY,&items,&preview_panes,
|
||||
"",NULL,0,NULL,-1,-1,NULL,NULL,"",&sorter);
|
||||
}
|
||||
@ -433,7 +433,7 @@ namespace events{
|
||||
items.push_back(str.str());
|
||||
}
|
||||
|
||||
gui::show_dialog2(*gui_,NULL,"","",gui::CLOSE_ONLY,&items,
|
||||
gui::show_dialog(*gui_,NULL,"","",gui::CLOSE_ONLY,&items,
|
||||
NULL,"",NULL,0,NULL,-1,-1,NULL,NULL,"",&sorter);
|
||||
}
|
||||
|
||||
@ -722,7 +722,7 @@ namespace events{
|
||||
std::vector<gui::preview_pane*> preview_panes;
|
||||
preview_panes.push_back(&unit_preview);
|
||||
|
||||
recruit_res = gui::show_dialog2(*gui_,NULL,_("Recruit"),
|
||||
recruit_res = gui::show_dialog(*gui_,NULL,_("Recruit"),
|
||||
_("Select unit:") + std::string("\n"),
|
||||
gui::OK_CANCEL,&items,&preview_panes,"",NULL,-1,NULL,-1,-1,
|
||||
NULL,NULL,"recruit_and_recall");
|
||||
@ -872,7 +872,7 @@ namespace events{
|
||||
std::vector<gui::preview_pane*> preview_panes;
|
||||
preview_panes.push_back(&unit_preview);
|
||||
|
||||
res = gui::show_dialog2(*gui_,NULL,_("Recall"),
|
||||
res = gui::show_dialog(*gui_,NULL,_("Recall"),
|
||||
_("Select unit:") + std::string("\n"),
|
||||
gui::OK_CANCEL,&options,
|
||||
&preview_panes,"",NULL,-1,
|
||||
@ -1316,7 +1316,7 @@ namespace events{
|
||||
std::vector<gui::preview_pane*> preview_panes;
|
||||
preview_panes.push_back(&unit_preview);
|
||||
|
||||
choice = gui::show_dialog2(*gui_,NULL,"",dsgettext(PACKAGE "-lib","Create Unit (Debug!)"),
|
||||
choice = gui::show_dialog(*gui_,NULL,"",dsgettext(PACKAGE "-lib","Create Unit (Debug!)"),
|
||||
gui::OK_CANCEL,&options,&preview_panes);
|
||||
}
|
||||
|
||||
|
@ -1343,7 +1343,7 @@ bool mouse_handler::attack_enemy_(unit_map::iterator attacker, unit_map::iterato
|
||||
preview_panes.push_back(&attacker_preview);
|
||||
preview_panes.push_back(&defender_preview);
|
||||
|
||||
res = gui::show_dialog2(*gui_,NULL,_("Attack Enemy"),
|
||||
res = gui::show_dialog(*gui_,NULL,_("Attack Enemy"),
|
||||
_("Choose weapon:")+std::string("\n"),
|
||||
gui::OK_CANCEL,&items,&preview_panes,"",NULL,-1,NULL,-1,-1,
|
||||
NULL,&buttons);
|
||||
|
@ -254,7 +254,7 @@ void wait::join_game(bool observe)
|
||||
possible_sides);
|
||||
preview_panes.push_back(&leader_selector);
|
||||
|
||||
const int res = gui::show_dialog2(disp(), NULL, "", _("Choose your side:"),
|
||||
const int res = gui::show_dialog(disp(), NULL, "", _("Choose your side:"),
|
||||
gui::OK_CANCEL, &choices, &preview_panes);
|
||||
if(res < 0) {
|
||||
set_result(QUIT);
|
||||
|
@ -219,7 +219,7 @@ turn_info::PROCESS_DATA_RESULT turn_info::process_network_data(const config& cfg
|
||||
}
|
||||
|
||||
const std::string msg = teams_[side_index].current_player() + " " + _("has left the game. What do you want to do?");
|
||||
action = gui::show_dialog2(gui_,NULL,"",msg,gui::OK_ONLY,&options);
|
||||
action = gui::show_dialog(gui_,NULL,"",msg,gui::OK_ONLY,&options);
|
||||
}
|
||||
|
||||
//make the player an AI, and redo this turn, in case
|
||||
|
@ -1155,7 +1155,7 @@ void show_preferences_dialog(display& disp, const config& game_cfg)
|
||||
std::vector<gui::preview_pane*> panes;
|
||||
panes.push_back(&dialog);
|
||||
|
||||
gui::show_dialog2(disp,NULL,_("Preferences"),"",gui::CLOSE_ONLY,&items,&panes);
|
||||
gui::show_dialog(disp,NULL,_("Preferences"),"",gui::CLOSE_ONLY,&items,&panes);
|
||||
return;
|
||||
} catch(preferences_dialog::video_mode_change_exception& e) {
|
||||
switch(e.type) {
|
||||
@ -1240,7 +1240,7 @@ bool show_video_mode_dialog(display& disp)
|
||||
options.push_back(option.str());
|
||||
}
|
||||
|
||||
const int result = gui::show_dialog2(disp,NULL,"",
|
||||
const int result = gui::show_dialog(disp,NULL,"",
|
||||
_("Choose Resolution"),
|
||||
gui::OK_CANCEL,&options);
|
||||
if(size_t(result) < resolutions.size() && resolutions[result] != current_res) {
|
||||
@ -1397,7 +1397,7 @@ bool show_theme_dialog(display& disp)
|
||||
std::vector<std::string> options = disp.get_theme().get_known_themes();
|
||||
if(options.size()){
|
||||
std::string current_theme=_("Saved Theme Preference: ")+preferences::theme();
|
||||
action = gui::show_dialog2(disp,NULL,"",current_theme,gui::OK_CANCEL,&options);
|
||||
action = gui::show_dialog(disp,NULL,"",current_theme,gui::OK_CANCEL,&options);
|
||||
if(action >= 0){
|
||||
preferences::set_theme(options[action]);
|
||||
//it would be preferable for the new theme to take effect
|
||||
|
@ -180,8 +180,6 @@ int show_dialog(display &screen, surface image,
|
||||
menu::style* menu_style=NULL
|
||||
);
|
||||
|
||||
#define show_dialog2 show_dialog
|
||||
|
||||
void show_error_message(display &disp, std::string const &message);
|
||||
|
||||
network::connection network_send_dialog(display& disp, const std::string& msg, config& cfg, network::connection connection_num=0);
|
||||
|
@ -86,7 +86,7 @@ void combo::process_event()
|
||||
if (!pressed())
|
||||
return;
|
||||
SDL_Rect const &loc = location();
|
||||
set_selected_internal(gui::show_dialog2(*disp_, NULL, "", "", gui::MESSAGE, &items_,
|
||||
set_selected_internal(gui::show_dialog(*disp_, NULL, "", "", gui::MESSAGE, &items_,
|
||||
NULL, "", NULL, -1, NULL, loc.x, loc.y + loc.h));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user