diff options
author | rubidium <rubidium@openttd.org> | 2010-11-13 23:40:36 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-11-13 23:40:36 +0000 |
commit | a9da53c1068f9279ae82a557d46ece01f5beecd1 (patch) | |
tree | 783e7844b5a720f4601816bbeb8207e8d809e708 /src/statusbar_gui.cpp | |
parent | fc75b00992dbf6f86a39aca1a2cda4e6378b6bba (diff) | |
download | openttd-a9da53c1068f9279ae82a557d46ece01f5beecd1.tar.xz |
(svn r21179) -Fix [FS#4201] (r69): if the main toolbar's location is configurable, why isn't the statusbar's location configurable?
Diffstat (limited to 'src/statusbar_gui.cpp')
-rw-r--r-- | src/statusbar_gui.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp index a9bc17e95..80efb1805 100644 --- a/src/statusbar_gui.cpp +++ b/src/statusbar_gui.cpp @@ -95,11 +95,12 @@ struct StatusBarWindow : Window { this->reminder_timeout = REMINDER_STOP; this->InitNested(desc); + PositionStatusbar(this); } virtual Point OnInitialPosition(const WindowDesc *desc, int16 sm_width, int16 sm_height, int window_number) { - Point pt = { (_screen.width - max(sm_width, desc->default_width)) / 2, _screen.height - sm_height }; + Point pt = { 0, _screen.height - sm_height }; return pt; } @@ -238,7 +239,7 @@ static const NWidgetPart _nested_main_status_widgets[] = { EndContainer(), }; -static const WindowDesc _main_status_desc( +static WindowDesc _main_status_desc( WDP_MANUAL, 640, 12, WC_STATUS_BAR, WC_NONE, WDF_UNCLICK_BUTTONS | WDF_NO_FOCUS, @@ -254,6 +255,8 @@ bool IsNewsTickerShown() return w != NULL && w->ticker_scroll < StatusBarWindow::TICKER_STOP; } +int16 *_preferred_statusbar_size = &_main_status_desc.default_width; ///< Pointer to the default size for the status toolbar. + void ShowStatusBar() { new StatusBarWindow(&_main_status_desc); |