Overlapping icon button casings will bother me no more
This commit is contained in:
@@ -278,15 +278,12 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
}).left().margin(0).get();
|
}).left().margin(0).get();
|
||||||
|
|
||||||
button.clearChildren();
|
button.clearChildren();
|
||||||
button.table("button", t -> {
|
button.addImage(iconname).size(16 * 3).padLeft(10);
|
||||||
t.addImage(iconname).size(16 * 3);
|
|
||||||
t.update(() -> t.background(button.getClickListener().isPressed() ? "button-down" : button.getClickListener().isOver() ? "button-over" : "button"));
|
|
||||||
}).size(h);
|
|
||||||
button.table(t -> {
|
button.table(t -> {
|
||||||
t.add(name).growX().wrap();
|
t.add(name).growX().wrap();
|
||||||
t.row();
|
t.row();
|
||||||
t.add(description).color(Color.GRAY).growX().wrap();
|
t.add(description).color(Color.GRAY).growX().wrap();
|
||||||
}).growX().pad(10f);
|
}).growX().pad(10f).padLeft(5);
|
||||||
|
|
||||||
button.row();
|
button.row();
|
||||||
|
|
||||||
|
|||||||
@@ -12,21 +12,15 @@ public class MenuButton extends TextButton{
|
|||||||
|
|
||||||
public MenuButton(String icon, String text, String description, Runnable clicked){
|
public MenuButton(String icon, String text, String description, Runnable clicked){
|
||||||
super("default");
|
super("default");
|
||||||
float s = 66f;
|
|
||||||
|
|
||||||
clicked(clicked);
|
clicked(clicked);
|
||||||
|
|
||||||
clearChildren();
|
clearChildren();
|
||||||
|
|
||||||
margin(0);
|
margin(0);
|
||||||
|
|
||||||
table(t -> {
|
table(t -> {
|
||||||
t.addImage(icon).size(14 * 3);
|
t.addImage(icon).size(14 * 3).padLeft(6);
|
||||||
t.update(() -> t.setBackground(getClickListener().isVisualPressed() ? "button-down" : getClickListener().isOver() ? "button-over" : "button"));
|
|
||||||
}).size(s - 5, s);
|
|
||||||
|
|
||||||
|
|
||||||
table(t -> {
|
|
||||||
t.add(text).wrap().growX().get().setAlignment(Align.center, Align.left);
|
t.add(text).wrap().growX().get().setAlignment(Align.center, Align.left);
|
||||||
if(description != null){
|
if(description != null){
|
||||||
t.row();
|
t.row();
|
||||||
|
|||||||
Reference in New Issue
Block a user