From bd3b0a487fbff934014f94cc71490d9d9852d5d5 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 6 Jun 2019 21:48:53 -0400 Subject: [PATCH] v0.7.4: adjusted redbutton's so that icons are on the left of text --- .../shatteredpixel/shatteredpixeldungeon/ui/RedButton.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RedButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RedButton.java index 6592e6bf5..e4446a05c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RedButton.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RedButton.java @@ -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); }