comparison game/IDMButton.java @ 187:c9b743e32567

Improve IDMButton scaled click movement.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 16 Mar 2017 14:19:25 +0200
parents 981a8e20b363
children 189cd8fe2304
comparison
equal deleted inserted replaced
186:c63a1a31b7e3 187:c9b743e32567
101 int xoffs, yoffs; 101 int xoffs, yoffs;
102 102
103 if (state == State.PRESSED) 103 if (state == State.PRESSED)
104 { 104 {
105 img = imgPressed; 105 img = imgPressed;
106 xoffs = yoffs = 5; 106 xoffs = (int) (3.5f * scale.x);
107 yoffs = (int) (3.5f * scale.y);
107 } 108 }
108 else 109 else
109 { 110 {
110 xoffs = yoffs = 0; 111 xoffs = yoffs = 0;
111 img = imgUnpressed; 112 img = imgUnpressed;