1313import gregtech .api .mui .GTGuis ;
1414import gregtech .api .util .GTTransferUtils ;
1515import gregtech .api .util .GTUtility ;
16+ import gregtech .api .util .LocalizationUtils ;
1617import gregtech .client .renderer .texture .Textures ;
1718import gregtech .client .renderer .texture .custom .QuantumStorageRenderer ;
1819import gregtech .client .utils .TooltipHelper ;
3637import com .cleanroommc .modularui .api .drawable .IKey ;
3738import com .cleanroommc .modularui .factory .PosGuiData ;
3839import com .cleanroommc .modularui .screen .ModularPanel ;
40+ import com .cleanroommc .modularui .utils .Alignment ;
3941import com .cleanroommc .modularui .value .sync .BooleanSyncValue ;
4042import com .cleanroommc .modularui .value .sync .IntSyncValue ;
4143import com .cleanroommc .modularui .value .sync .PanelSyncManager ;
4244import com .cleanroommc .modularui .value .sync .SyncHandlers ;
4345import com .cleanroommc .modularui .widgets .ItemSlot ;
4446import com .cleanroommc .modularui .widgets .ToggleButton ;
47+ import com .cleanroommc .modularui .widgets .layout .Column ;
4548import com .cleanroommc .modularui .widgets .textfield .TextFieldWidget ;
4649import org .apache .commons .lang3 .ArrayUtils ;
4750import org .jetbrains .annotations .NotNull ;
@@ -92,34 +95,32 @@ public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager guiSyncManager)
9295 return GTGuis .createPanel (this , 176 , 166 )
9396 .child (IKey .lang ("gregtech.creative.chest.item" ).asWidget ()
9497 .pos (7 , 9 ))
95- // .child(GTGuiTextures.DISPLAY.asWidget()
96- // .pos(7, 48)
97- // .size(154, 14))
98- .child (new TextFieldWidget ()
99- .pos (7 , 50 )
100- .size (152 , 10 )
101- .setMaxLength (11 )
102- .setNumbers (1 , Integer .MAX_VALUE )
103- .value (new IntSyncValue (() -> itemsPerCycle , value -> itemsPerCycle = value )))
104- .child (IKey .lang ("gregtech.creative.chest.ipc" ).asWidget ()
105- .pos (7 , 28 ))
106- // .child(GTGuiTextures.DISPLAY.asWidget()
107- // .pos(7, 85)
108- // .size(154, 14))
109- .child (new TextFieldWidget ()
110- .pos (7 , 85 )
111- .size (152 , 10 )
112- .setMaxLength (11 )
113- .setNumbers (1 , Integer .MAX_VALUE )
114- .value (new IntSyncValue (() -> ticksPerCycle , value -> ticksPerCycle = value )))
115- .child (IKey .lang ("gregtech.creative.chest.tpc" ).asWidget ()
116- .pos (7 , 65 ))
98+ .child (new Column ()
99+ .pos (7 , 28 )
100+ .coverChildren ()
101+ .crossAxisAlignment (Alignment .CrossAxis .START )
102+ .child (IKey .lang ("gregtech.creative.chest.ipc" ).asWidget ()
103+ .marginBottom (2 ))
104+ .child (new TextFieldWidget ()
105+ .marginBottom (15 )
106+ .size (152 , 14 )
107+ .setMaxLength (11 )
108+ .setNumbers (1 , Integer .MAX_VALUE )
109+ .value (new IntSyncValue (() -> itemsPerCycle , value -> itemsPerCycle = value )))
110+ .child (IKey .lang ("gregtech.creative.chest.tpc" ).asWidget ()
111+ .marginBottom (2 ))
112+ .child (new TextFieldWidget ()
113+ .setTextAlignment (Alignment .CenterLeft )
114+ .size (152 , 14 )
115+ .setMaxLength (11 )
116+ .setNumbers (1 , Integer .MAX_VALUE )
117+ .value (new IntSyncValue (() -> ticksPerCycle , value -> ticksPerCycle = value ))))
117118 .child (new ToggleButton ()
118119 .pos (7 , 101 )
119120 .size (162 , 20 )
120- .overlay (IKey .dynamic (() -> IKey
121- . lang ( active ? "gregtech.creative.activity.on" : "gregtech.creative.activity.off" )
122- . get ( )))
121+ .overlay (IKey .dynamic (() -> LocalizationUtils . format ( active ?
122+ "gregtech.creative.activity.on" :
123+ "gregtech.creative.activity.off" )))
123124 .value (new BooleanSyncValue (() -> active , value -> {
124125 active = value ;
125126 scheduleRenderUpdate ();
@@ -130,7 +131,7 @@ public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager guiSyncManager)
130131 .slot (SyncHandlers .phantomItemSlot (handler , 0 )
131132 .changeListener ((newItem , onlyAmountChanged , client , init ) -> markDirty ()))
132133 .pos (36 , 6 ))
133- .child (createConnectedGui ()
134+ .child (createConnectionButton ()
134135 .top (7 ));
135136 }
136137
0 commit comments