From 36c396359d699326ae3cb1bd24803d0dae1890b1 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 25 Jan 2016 22:14:17 -0500 Subject: [PATCH] v0.3.4: even further layout improvements to wndItem --- .../shatteredpixel/shatteredpixeldungeon/ui/RedButton.java | 2 +- .../shatteredpixel/shatteredpixeldungeon/windows/WndItem.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/RedButton.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/RedButton.java index b79480c5d..0069847b1 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/RedButton.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/RedButton.java @@ -110,7 +110,7 @@ public class RedButton extends Button { } public float reqWidth() { - return text.width() + 2.5f; + return text.width() + 2f; } public float reqHeight() { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndItem.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndItem.java index 1ee517059..10eaad036 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndItem.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndItem.java @@ -78,7 +78,7 @@ public class WndItem extends Window { btn.setSize( Math.max( BUTTON_WIDTH, btn.reqWidth() ), BUTTON_HEIGHT ); if (x + btn.width() > width) { x = 0; - y += BUTTON_HEIGHT + GAP; + y += BUTTON_HEIGHT + 1; } btn.setPos( x, y ); add( btn ); @@ -87,7 +87,7 @@ public class WndItem extends Window { btn.textColor( TITLE_COLOR ); } - x += btn.width() + GAP; + x += btn.width() + 1; } }