diff options
author | rubidium <rubidium@openttd.org> | 2009-11-28 14:30:00 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-11-28 14:30:00 +0000 |
commit | 6a367fda8a7f8e563310f7254d612dbb0010d919 (patch) | |
tree | b4ce5effc9523320c78bde57d6ab55eefd2c2f16 /src/transparency_gui.cpp | |
parent | a825349bf108aa99b6080c3bceb35e8b3c75cc97 (diff) | |
download | openttd-6a367fda8a7f8e563310f7254d612dbb0010d919.tar.xz |
(svn r18320) -Codechange: make the terraform and transparency window not use absolute location but manually calculate based on toolbar size etc.
Diffstat (limited to 'src/transparency_gui.cpp')
-rw-r--r-- | src/transparency_gui.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/transparency_gui.cpp b/src/transparency_gui.cpp index 1195c4f95..6233817c8 100644 --- a/src/transparency_gui.cpp +++ b/src/transparency_gui.cpp @@ -117,6 +117,13 @@ public: } } + virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number) + { + Point pt = GetToolbarAlignedWindowPosition(sm_width); + pt.y += 2 * (sm_height - this->GetWidget<NWidgetBase>(TTW_WIDGET_BUTTONS)->current_y); + return pt; + } + virtual void OnInvalidateData(int data) { for (uint i = TTW_WIDGET_BEGIN; i < TTW_WIDGET_END; i++) { @@ -149,7 +156,7 @@ static const NWidgetPart _nested_transparency_widgets[] = { }; static const WindowDesc _transparency_desc( - WDP_ALIGN_TBR, 94, 219, 49, + WDP_MANUAL, WDP_MANUAL, 219, 49, WC_TRANSPARENCY_TOOLBAR, WC_NONE, 0, _nested_transparency_widgets, lengthof(_nested_transparency_widgets) |