From 1db2b953007a45b08716164d8674ba2e2b018789 Mon Sep 17 00:00:00 2001 From: nehalmistry <> Date: Fri, 21 Jun 2002 00:07:23 +0000 Subject: [PATCH] clicking on arrows in editor moves the gem --- src/editor/editloop.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/editor/editloop.cpp b/src/editor/editloop.cpp index 970675572..2998b43ba 100644 --- a/src/editor/editloop.cpp +++ b/src/editor/editloop.cpp @@ -382,10 +382,7 @@ local void DrawTileIcons(void) */ local void DrawUnitIcons(void) { - int x; - int y; - int i; - int j; + int x, y, i, j, percent; char buf[256]; Icon *icon; @@ -547,7 +544,9 @@ local void DrawUnitIcons(void) } else { VideoDraw(MenuButtonGfx.Sprite, MBUTTON_RIGHT_ARROW, x + j - 20, y); } - i = (50 * (j - 54)) / 100; + + percent = UnitIndex * 100 / MaxUnitIndex; + i = (percent * (j - 54)) / 100; VideoDraw(MenuButtonGfx.Sprite, MBUTTON_S_KNOB, x + 18 + i, y + 1); //