Skip to content

Commit 84590b8

Browse files
stuff
1 parent 73d967e commit 84590b8

File tree

1 file changed

+29
-21
lines changed

1 file changed

+29
-21
lines changed

src/main/java/com/gregtechceu/gtceu/common/item/tool/behavior/AOEConfigUIBehavior.java

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -101,44 +101,52 @@ public ModularPanel buildUI(PlayerInventoryGuiData<?> data, PanelSyncManager syn
101101
plusLayers.setOnMousePressed(data1 -> AoESymmetrical.increaseLayer(tag, defaultDefinition));
102102
return new ModularPanel("aoe_config")
103103
.child(Flow.column()
104+
.margin(5)
105+
.childPadding(2)
104106
.child(Flow.row()
107+
.childPadding(2)
108+
.coverChildren()
105109
.child(new TextWidget<>(IKey.lang("item.gtceu.tool.aoe.columns")))
106110
.child(new ButtonWidget<>()
107-
.background(GTGuiTextures.BUTTON_THROTTLE_MINUS, GTGuiTextures.MC_BUTTON)
108-
.hoverBackground(GTGuiTextures.BUTTON_THROTTLE_MINUS, GTGuiTextures.MC_BUTTON_HOVERED)
111+
.background(GTGuiTextures.MC_BUTTON, IKey.str("-"))
112+
.hoverBackground(GTGuiTextures.MC_BUTTON_HOVERED, IKey.str("-"))
109113
.syncHandler(minusCols))
110-
.child(new TextWidget<>(IKey.dynamic(() -> Component.literal(
111-
Integer.toString(1 + 2 * AoESymmetrical.getColumn(getBehaviorsTag(held), defaultDefinition))
112-
))))
114+
.child(new TextWidget<>(IKey.dynamic(() -> Component.literal(Integer.toString(
115+
AoESymmetrical.getColumn(tag, defaultDefinition)
116+
)))))
113117
.child(new ButtonWidget<>()
114-
.background(GTGuiTextures.BUTTON_THROTTLE_PLUS, GTGuiTextures.MC_BUTTON)
115-
.hoverBackground(GTGuiTextures.BUTTON_THROTTLE_PLUS, GTGuiTextures.MC_BUTTON_HOVERED)
118+
.background(GTGuiTextures.MC_BUTTON, IKey.str("+"))
119+
.hoverBackground(GTGuiTextures.MC_BUTTON_HOVERED, IKey.str("+"))
116120
.syncHandler(plusCols)))
117121
.child(Flow.row()
122+
.childPadding(2)
123+
.coverChildren()
118124
.child(new TextWidget<>(IKey.lang("item.gtceu.tool.aoe.rows")))
119125
.child(new ButtonWidget<>()
120-
.background(GTGuiTextures.BUTTON_THROTTLE_MINUS, GTGuiTextures.MC_BUTTON)
121-
.hoverBackground(GTGuiTextures.BUTTON_THROTTLE_MINUS, GTGuiTextures.MC_BUTTON_HOVERED)
126+
.background(GTGuiTextures.MC_BUTTON, IKey.str("-"))
127+
.hoverBackground(GTGuiTextures.MC_BUTTON_HOVERED, IKey.str("-"))
122128
.syncHandler(minusRows))
123-
.child(new TextWidget<>(IKey.dynamic(() -> Component.literal(
124-
Integer.toString(1 + 2 * AoESymmetrical.getRow(getBehaviorsTag(held), defaultDefinition))
125-
))))
129+
.child(new TextWidget<>(IKey.dynamic(() -> Component.literal(Integer.toString(
130+
AoESymmetrical.getRow(tag, defaultDefinition)
131+
)))))
126132
.child(new ButtonWidget<>()
127-
.background(GTGuiTextures.BUTTON_THROTTLE_PLUS, GTGuiTextures.MC_BUTTON)
128-
.hoverBackground(GTGuiTextures.BUTTON_THROTTLE_PLUS, GTGuiTextures.MC_BUTTON_HOVERED)
133+
.background(GTGuiTextures.MC_BUTTON, IKey.str("+"))
134+
.hoverBackground(GTGuiTextures.MC_BUTTON_HOVERED, IKey.str("+"))
129135
.syncHandler(plusRows)))
130136
.child(Flow.row()
137+
.childPadding(2)
138+
.coverChildren()
131139
.child(new TextWidget<>(IKey.lang("item.gtceu.tool.aoe.layers")))
132140
.child(new ButtonWidget<>()
133-
.background(GTGuiTextures.BUTTON_THROTTLE_MINUS, GTGuiTextures.MC_BUTTON)
134-
.hoverBackground(GTGuiTextures.BUTTON_THROTTLE_MINUS, GTGuiTextures.MC_BUTTON_HOVERED)
141+
.background(GTGuiTextures.MC_BUTTON, IKey.str("-"))
142+
.hoverBackground(GTGuiTextures.MC_BUTTON_HOVERED, IKey.str("-"))
135143
.syncHandler(minusLayers))
136-
.child(new TextWidget<>(IKey.dynamic(() -> Component.literal(
137-
Integer.toString(1 + 2 * AoESymmetrical.getLayer(getBehaviorsTag(held), defaultDefinition))
138-
))))
144+
.child(new TextWidget<>(IKey.dynamic(() -> Component.literal(Integer.toString(
145+
AoESymmetrical.getLayer(tag, defaultDefinition)
146+
)))))
139147
.child(new ButtonWidget<>()
140-
.background(GTGuiTextures.BUTTON_THROTTLE_PLUS, GTGuiTextures.MC_BUTTON)
141-
.hoverBackground(GTGuiTextures.BUTTON_THROTTLE_PLUS, GTGuiTextures.MC_BUTTON_HOVERED)
148+
.background(GTGuiTextures.MC_BUTTON, IKey.str("+"))
149+
.hoverBackground(GTGuiTextures.MC_BUTTON_HOVERED, IKey.str("+"))
142150
.syncHandler(plusLayers))));
143151
}
144152
}

0 commit comments

Comments
 (0)