fix spelling
This commit is contained in:
parent
b73cc5eb08
commit
f067332d0f
4 changed files with 7 additions and 9 deletions
|
@ -99,7 +99,7 @@ void tsynced_choice_wait::handle_generic_event(const std::string& event_name)
|
|||
|
||||
void tsynced_choice_wait::on_btn_quit_game(CVideo&)
|
||||
{
|
||||
if (quit_confirmation::default_promt()) {
|
||||
if (quit_confirmation::default_prompt()) {
|
||||
throw_quit_game_exception();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -698,7 +698,7 @@ void command_executor_default::map_screenshot()
|
|||
}
|
||||
void command_executor_default::quit_to_main_menu()
|
||||
{
|
||||
if(quit_confirmation::default_promt()) {
|
||||
if(quit_confirmation::default_prompt()) {
|
||||
throw_quit_game_exception();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ void quit_confirmation::quit()
|
|||
open_ = true;
|
||||
BOOST_REVERSE_FOREACH(quit_confirmation* blocker, blockers_)
|
||||
{
|
||||
if(!blocker->promt_()) {
|
||||
if(!blocker->prompt_()) {
|
||||
open_ = false;
|
||||
return;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ void quit_confirmation::quit()
|
|||
throw CVideo::quit();
|
||||
}
|
||||
|
||||
bool quit_confirmation::default_promt()
|
||||
bool quit_confirmation::default_prompt()
|
||||
{
|
||||
return gui2::show_message(CVideo::get_singleton(), _("Quit"), _("Do you really want to quit?"),
|
||||
gui2::tmessage::yes_no_buttons) != gui2::twindow::CANCEL;
|
||||
|
|
|
@ -31,9 +31,7 @@ class CVideo;
|
|||
class quit_confirmation
|
||||
{
|
||||
public:
|
||||
quit_confirmation(const boost::function<bool()>& promt = &quit_confirmation::default_promt)
|
||||
: promt_(promt) { blockers_.push_back(this); }
|
||||
|
||||
quit_confirmation(const boost::function<bool()>& prompt = &quit_confirmation::default_prompt) : prompt_(prompt) { blockers_.push_back(this); }
|
||||
~quit_confirmation() { blockers_.pop_back(); }
|
||||
|
||||
/**
|
||||
|
@ -43,7 +41,7 @@ public:
|
|||
* displayed.
|
||||
*/
|
||||
static void quit();
|
||||
static bool default_promt();
|
||||
static bool default_prompt();
|
||||
private:
|
||||
//noncopyable
|
||||
quit_confirmation( const quit_confirmation& );
|
||||
|
@ -51,7 +49,7 @@ private:
|
|||
static std::vector<quit_confirmation*> blockers_;
|
||||
static bool open_;
|
||||
|
||||
boost::function<bool()> promt_;
|
||||
boost::function<bool()> prompt_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue