diff options
author | frosch <frosch@openttd.org> | 2015-02-01 20:54:24 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2015-02-01 20:54:24 +0000 |
commit | a8080b62563dcb9f3e3bf5180ebf2de6cf6b68ae (patch) | |
tree | 3ac628ab264823257073f281ce7e692f07e5c651 /src/dock_gui.cpp | |
parent | 3bc7ee3ab731c7a855f811b36356ed907b42989a (diff) | |
download | openttd-a8080b62563dcb9f3e3bf5180ebf2de6cf6b68ae.tar.xz |
(svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ScaleGUITrad().
Diffstat (limited to 'src/dock_gui.cpp')
-rw-r--r-- | src/dock_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index cd994bc0b..95145945c 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -504,8 +504,8 @@ public: switch (widget) { case WID_BDD_X: case WID_BDD_Y: - size->width = UnScaleByZoom(96 * 4, ZOOM_LVL_GUI) + 2; - size->height = UnScaleByZoom(64 * 4, ZOOM_LVL_GUI) + 2; + size->width = ScaleGUITrad(96) + 2; + size->height = ScaleGUITrad(64) + 2; break; } } @@ -514,10 +514,10 @@ public: { this->DrawWidgets(); - int x1 = UnScaleByZoom(63 * 4, ZOOM_LVL_GUI) + 1; - int x2 = UnScaleByZoom(31 * 4, ZOOM_LVL_GUI) + 1; - int y1 = UnScaleByZoom(17 * 4, ZOOM_LVL_GUI) + 1; - int y2 = UnScaleByZoom(33 * 4, ZOOM_LVL_GUI) + 1; + int x1 = ScaleGUITrad(63) + 1; + int x2 = ScaleGUITrad(31) + 1; + int y1 = ScaleGUITrad(17) + 1; + int y2 = ScaleGUITrad(33) + 1; DrawShipDepotSprite(this->GetWidget<NWidgetBase>(WID_BDD_X)->pos_x + x1, this->GetWidget<NWidgetBase>(WID_BDD_X)->pos_y + y1, AXIS_X, DEPOT_PART_NORTH); DrawShipDepotSprite(this->GetWidget<NWidgetBase>(WID_BDD_X)->pos_x + x2, this->GetWidget<NWidgetBase>(WID_BDD_X)->pos_y + y2, AXIS_X, DEPOT_PART_SOUTH); |