v0.7.4: adjusted redbutton's so that icons are on the left of text

This commit is contained in:
Evan Debenham 2019-06-06 21:48:53 -04:00
parent d67a4bf021
commit bd3b0a487f

View File

@ -72,7 +72,7 @@ public class RedButton extends Button {
if (text != null && !text.text().equals("")){
componentWidth += text.width() + 2;
text.x = x + (width() - componentWidth)/2f + 1;
text.x = x + (width() + componentWidth)/2f - text.width() - 1;
text.y = y + (height() - text.baseLine()) / 2f;
PixelScene.align(text);
@ -80,7 +80,7 @@ public class RedButton extends Button {
if (icon != null) {
icon.x = x + (width() + componentWidth)/2f - icon.width() - 1;
icon.x = x + (width() - componentWidth)/2f + 1;
icon.y = y + (height() - icon.height()) / 2f;
PixelScene.align(icon);
}