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/terraform_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/terraform_gui.cpp')
-rw-r--r-- | src/terraform_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index 0f41da75d..06b66cad4 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -559,8 +559,8 @@ struct ScenarioEditorLandscapeGenerationWindow : Window { { if (widget != WID_ETT_DOTS) return; - size->width = max<uint>(size->width, UnScaleByZoom(4 * 59, ZOOM_LVL_GUI)); - size->height = max<uint>(size->height, UnScaleByZoom(4 * 31, ZOOM_LVL_GUI)); + size->width = max<uint>(size->width, ScaleGUITrad(59)); + size->height = max<uint>(size->height, ScaleGUITrad(31)); } virtual void DrawWidget(const Rect &r, int widget) const @@ -575,7 +575,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window { assert(n != 0); do { - DrawSprite(SPR_WHITE_POINT, PAL_NONE, center_x + UnScaleByZoom(4 * coords[0], ZOOM_LVL_GUI), center_y + UnScaleByZoom(4 * coords[1], ZOOM_LVL_GUI)); + DrawSprite(SPR_WHITE_POINT, PAL_NONE, center_x + ScaleGUITrad(coords[0]), center_y + ScaleGUITrad(coords[1])); coords += 2; } while (--n); } |