|
30 | 30 | import com.cleanroommc.modularui.value.sync.IntSyncValue; |
31 | 31 | import com.cleanroommc.modularui.value.sync.PanelSyncHandler; |
32 | 32 | import com.cleanroommc.modularui.value.sync.PanelSyncManager; |
33 | | -import com.cleanroommc.modularui.widget.ParentWidget; |
34 | 33 | import com.cleanroommc.modularui.widgets.ButtonWidget; |
35 | 34 | import com.cleanroommc.modularui.widgets.ListWidget; |
36 | 35 | import com.cleanroommc.modularui.widgets.layout.Flow; |
@@ -88,7 +87,8 @@ public boolean usesMui2() { |
88 | 87 | public ModularPanel buildUI(PosGuiData guiData, PanelSyncManager panelSyncManager) { |
89 | 88 | IntSyncValue radiusSync = new IntSyncValue(() -> radius, newRadius -> { |
90 | 89 | radius = newRadius; |
91 | | - GregTechAPI.soundManager.stopTileSound(getPos()); |
| 90 | + GregTechAPI.soundManager.stopTileSound(getPos()); // TODO: one of these is making the sound restart when you |
| 91 | + // open the gui |
92 | 92 | }); |
93 | 93 | ResourceLocationSyncHandler soundSync = new ResourceLocationSyncHandler( |
94 | 94 | () -> getSoundResourceLocation(selectedSound), |
@@ -167,19 +167,15 @@ protected PanelSyncHandler.IPanelBuilder createSoundsPopup(@NotNull ResourceLoca |
167 | 167 | .margin(5) |
168 | 168 | .child(IKey.lang("gregtech.gui.alarm.sounds") |
169 | 169 | .asWidget()) |
170 | | - .child(new ParentWidget<>() |
171 | | - .widthRel(1.0f) |
172 | | - .margin(2, 2, 6, 2) |
| 170 | + .child(new ListWidget<>() |
| 171 | + .left(2) |
| 172 | + .right(2) |
| 173 | + .marginTop(6) |
| 174 | + .marginBottom(4) |
173 | 175 | .expanded() |
174 | | - .child(GTGuiTextures.DISPLAY.asWidget() |
175 | | - .widthRel(1.0f) |
176 | | - .heightRel(1.0f)) |
177 | | - .child(new ListWidget<>() |
178 | | - .widthRel(1.0f) |
179 | | - .heightRel(1.0f) |
180 | | - .margin(2) |
181 | | - .expanded() |
182 | | - .children(soundList)))); |
| 176 | + .children(soundList) |
| 177 | + .background(GTGuiTextures.DISPLAY.asIcon() |
| 178 | + .margin(0, -2)))); |
183 | 179 | }; |
184 | 180 | } |
185 | 181 |
|
|
0 commit comments