summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-08-21 12:46:46 +0000
committerrubidium <rubidium@openttd.org>2011-08-21 12:46:46 +0000
commit37415b9cf7edaae66ca1fb35665894b9f9241127 (patch)
tree6803ebb1c7b7f42d6ede002c794347e86f11f382 /src/window.cpp
parent236075e944b0d80d9e29b411f1936ba09c788c29 (diff)
downloadopenttd-37415b9cf7edaae66ca1fb35665894b9f9241127.tar.xz
(svn r22785) -Codechange: rename IsGeneratingWorld to HasModalProgress
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp14
1 files changed, 7 insertions, 7 deletions
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();