diff options
author | rubidium <rubidium@openttd.org> | 2009-02-09 02:33:10 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-02-09 02:33:10 +0000 |
commit | c7f3daacbf57e8213550f5bca3226565cbafe5e3 (patch) | |
tree | aa639d9f07d77989dca1ce7b2cf1a57a95a43c69 /src/window.cpp | |
parent | 7df760b9c349d8caa4d3e39400ab8b8e9695941b (diff) | |
download | openttd-c7f3daacbf57e8213550f5bca3226565cbafe5e3.tar.xz |
(svn r15427) -Codechange: give w->caption_color a more sensible name as it holds the owner of whatever is shown in the window
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/window.cpp b/src/window.cpp index 1e950fcfc..59df698ce 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -608,7 +608,7 @@ restart_search: * as deleting this window could cascade in deleting (many) others * anywhere in the z-array */ FOR_ALL_WINDOWS_FROM_BACK(w) { - if (w->caption_color == id) { + if (w->owner == id) { delete w; goto restart_search; } @@ -627,7 +627,7 @@ void ChangeWindowOwner(Owner old_owner, Owner new_owner) { Window *w; FOR_ALL_WINDOWS_FROM_BACK(w) { - if (w->caption_color != old_owner) continue; + if (w->owner != old_owner) continue; switch (w->window_class) { case WC_COMPANY_COLOR: @@ -642,7 +642,7 @@ void ChangeWindowOwner(Owner old_owner, Owner new_owner) continue; default: - w->caption_color = new_owner; + w->owner = new_owner; break; } } @@ -768,7 +768,7 @@ void Window::Initialize(int x, int y, int min_width, int min_height, /* Set up window properties */ this->window_class = cls; this->flags4 = WF_WHITE_BORDER_MASK; // just opened windows have a white border - this->caption_color = 0xFF; + this->owner = INVALID_OWNER; this->left = x; this->top = y; this->width = min_width; |