Mercurial > hg > openttd
changeset 14064:07b6b76bd9df draft
(svn r18607) -Fix (r18583): Preserve window width when shading.
author | alberth <alberth@openttd.org> |
---|---|
date | Tue, 22 Dec 2009 20:53:28 +0000 |
parents | 4eb2be463cc4 |
children | a5fb37f9f59d |
files | src/window.cpp src/window_gui.h |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/window.cpp +++ b/src/window.cpp @@ -552,13 +552,13 @@ { if (this->shade_select == NULL) return; - int desired = make_shaded ? SZSP_NONE : 0; + int desired = make_shaded ? SZSP_HORIZONTAL : 0; if (this->shade_select->shown_plane != desired) { if (make_shaded) { this->unshaded_size.width = this->width; this->unshaded_size.height = this->height; this->shade_select->SetDisplayedPlane(desired); - this->ReInit(); + this->ReInit(0, -this->height); } else { this->shade_select->SetDisplayedPlane(desired); int dx = ((int)this->unshaded_size.width > this->width) ? (int)this->unshaded_size.width - this->width : 0;
--- a/src/window_gui.h +++ b/src/window_gui.h @@ -540,7 +540,7 @@ /** Is window shaded currently? */ inline bool IsShaded() const { - return this->shade_select != NULL && this->shade_select->shown_plane == SZSP_NONE; + return this->shade_select != NULL && this->shade_select->shown_plane == SZSP_HORIZONTAL; } void SetShaded(bool make_shaded);