changeset 187:c9b743e32567

Improve IDMButton scaled click movement.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 16 Mar 2017 14:19:25 +0200
parents c63a1a31b7e3
children 4568c8016377
files game/IDMButton.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/game/IDMButton.java	Thu Mar 16 13:29:55 2017 +0200
+++ b/game/IDMButton.java	Thu Mar 16 14:19:25 2017 +0200
@@ -103,7 +103,8 @@
         if (state == State.PRESSED)
         {
             img = imgPressed;
-            xoffs = yoffs = 5;
+            xoffs = (int) (3.5f * scale.x);
+            yoffs = (int) (3.5f * scale.y);
         }
         else
         {