v0.7.4: adjusted redbutton's so that icons are on the left of text
This commit is contained in:
parent
d67a4bf021
commit
bd3b0a487f
|
@ -72,7 +72,7 @@ public class RedButton extends Button {
|
||||||
if (text != null && !text.text().equals("")){
|
if (text != null && !text.text().equals("")){
|
||||||
componentWidth += text.width() + 2;
|
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;
|
text.y = y + (height() - text.baseLine()) / 2f;
|
||||||
PixelScene.align(text);
|
PixelScene.align(text);
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ public class RedButton extends Button {
|
||||||
|
|
||||||
if (icon != null) {
|
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;
|
icon.y = y + (height() - icon.height()) / 2f;
|
||||||
PixelScene.align(icon);
|
PixelScene.align(icon);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user