diff options
author | rubidium <rubidium@openttd.org> | 2009-11-25 21:30:45 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-11-25 21:30:45 +0000 |
commit | bd39a3b4c485f4a850e6e515b5216c91042e7edc (patch) | |
tree | 751d3c5a087559cfe247295ba36a4f112a8a6a0a /src | |
parent | 2f5ab1681505cb0054db936dbc929ad649250c7e (diff) | |
download | openttd-bd39a3b4c485f4a850e6e515b5216c91042e7edc.tar.xz |
(svn r18289) -Codechange: if using RTL draw the toolbar in the reverse direction so the buttons overlap 'nicely'
Diffstat (limited to 'src')
-rw-r--r-- | src/toolbar_gui.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 8c258db74..703ffb641 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1014,7 +1014,8 @@ public: GfxFillRect(this->pos_x, this->pos_y, this->pos_x + this->current_x - 1, this->pos_y + this->current_y - 1, 0xB2); GfxFillRect(this->pos_x, this->pos_y, this->pos_x + this->current_x - 1, this->pos_y + this->current_y - 1, 0xB4, FILLRECT_CHECKER); - for (NWidgetBase *child_wid = this->head; child_wid != NULL; child_wid = child_wid->next) { + bool rtl = _dynlang.text_dir == TD_RTL; + for (NWidgetBase *child_wid = rtl ? this->tail : this->head; child_wid != NULL; child_wid = rtl ? child_wid->prev : child_wid->next) { if (child_wid->type == NWID_SPACER) continue; if (!this->visible[((NWidgetCore*)child_wid)->index]) continue; |