From 37415b9cf7edaae66ca1fb35665894b9f9241127 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 21 Aug 2011 12:46:46 +0000 Subject: (svn r22785) -Codechange: rename IsGeneratingWorld to HasModalProgress --- src/window.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/window.cpp') diff --git a/src/window.cpp b/src/window.cpp index e5f5250d8..b20a46004 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1997,7 +1997,7 @@ void HandleKeypress(uint32 raw_key) { /* World generation is multithreaded and messes with companies. * But there is no company related window open anyway, so _current_company is not used. */ - assert(IsGeneratingWorld() || IsLocalCompany()); + assert(HasModalProgress() || IsLocalCompany()); /* Setup event */ uint16 key = GB(raw_key, 0, 16); @@ -2063,7 +2063,7 @@ static int _input_events_this_tick = 0; */ static void HandleAutoscroll() { - if (_settings_client.gui.autoscroll && _game_mode != GM_MENU && !IsGeneratingWorld()) { + if (_settings_client.gui.autoscroll && _game_mode != GM_MENU && !HasModalProgress()) { int x = _cursor.pos.x; int y = _cursor.pos.y; Window *w = FindWindowFromPt(x, y); @@ -2158,7 +2158,7 @@ static void MouseLoop(MouseClick click, int mousewheel) { /* World generation is multithreaded and messes with companies. * But there is no company related window open anyway, so _current_company is not used. */ - assert(IsGeneratingWorld() || IsLocalCompany()); + assert(HasModalProgress() || IsLocalCompany()); HandlePlacePresize(); UpdateTileSelection(); @@ -2182,8 +2182,8 @@ static void MouseLoop(MouseClick click, int mousewheel) if (click != MC_HOVER && !MaybeBringWindowToFront(w)) return; ViewPort *vp = IsPtInWindowViewport(w, x, y); - /* Don't allow any action in a viewport if either in menu of in generating world */ - if (vp != NULL && (_game_mode == GM_MENU || IsGeneratingWorld())) return; + /* Don't allow any action in a viewport if either in menu or when having a modal progress window */ + if (vp != NULL && (_game_mode == GM_MENU || HasModalProgress())) return; if (mousewheel != 0) { /* Send mousewheel event to window */ @@ -2248,7 +2248,7 @@ void HandleMouseEvents() { /* World generation is multithreaded and messes with companies. * But there is no company related window open anyway, so _current_company is not used. */ - assert(IsGeneratingWorld() || IsLocalCompany()); + assert(HasModalProgress() || IsLocalCompany()); static int double_click_time = 0; static Point double_click_pos = {0, 0}; @@ -2355,7 +2355,7 @@ void InputLoop() { /* World generation is multithreaded and messes with companies. * But there is no company related window open anyway, so _current_company is not used. */ - assert(IsGeneratingWorld() || IsLocalCompany()); + assert(HasModalProgress() || IsLocalCompany()); CheckSoftLimit(); HandleKeyScrolling(); -- cgit v1.2.3-54-g00ecf