From 487352304b5d77e54d3d0180dc1d63e843c4bd60 Mon Sep 17 00:00:00 2001 From: FullRisk Date: Sun, 12 Jul 2026 16:36:53 +0200 Subject: [PATCH] Hotfix Nr. 1 --- .../de/fullrisk/citrusDev/UI/MyScreen.java | 33 +++++++++++++++---- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/fullrisk/citrusDev/UI/MyScreen.java b/src/main/java/de/fullrisk/citrusDev/UI/MyScreen.java index 33eadce..d8d230a 100644 --- a/src/main/java/de/fullrisk/citrusDev/UI/MyScreen.java +++ b/src/main/java/de/fullrisk/citrusDev/UI/MyScreen.java @@ -277,6 +277,7 @@ public class MyScreen extends BaseOwoScreen { } private void buildGeneralPanel(FlowLayout content) { + FlowLayout fpsRow = ModuleRow.build( GLASS_PANEL, DISABLED, FLAT, Identifier.fromNamespaceAndPath("citrus-dev", "textures/icons/block_culling_file.png"), @@ -328,7 +329,11 @@ public class MyScreen extends BaseOwoScreen { "Shows your Position", new ModuleRow.ToggleState() { public boolean get() { return Module_Coords.toggle; } - public void set(boolean value) { Module_Coords.toggle = value; } + public void set(boolean value) { + Module_Coords.toggle = value; + Config.get().coordsEnabled = value; + Config.get().save(); + } }, Identifier.fromNamespaceAndPath("citrus-dev", "textures/icons/settings.png"), () -> { @@ -346,7 +351,7 @@ public class MyScreen extends BaseOwoScreen { 18, 12, MC_FIVE, "Fullbright", - "Max brightness in dark areas", + "Max brightness", new ModuleRow.ToggleState() { public boolean get() { return Module_Fullbright.isEnabled(); } public void set(boolean value) { Module_Fullbright.setEnabled(value); } @@ -359,18 +364,31 @@ public class MyScreen extends BaseOwoScreen { "Module Enabled", "Fullbright is now active", "Module Disabled", "Fullbright is now inactive" ); - content.child(coordinatesRow); - content.child(keyStrokesRow); - content.child(fpsRow); - content.child(fullbrightRow); + FlowLayout rowsContainer = UIContainers.verticalFlow(Sizing.fixed(CONTENT_WIDTH - 8), Sizing.content()); + rowsContainer.gap(4); + rowsContainer.verticalAlignment(VerticalAlignment.TOP); + rowsContainer.horizontalAlignment(HorizontalAlignment.CENTER); + + rowsContainer.child(coordinatesRow); + rowsContainer.child(keyStrokesRow); + rowsContainer.child(fpsRow); + rowsContainer.child(fullbrightRow); + + var scrollArea = UIContainers.verticalScroll( + Sizing.fixed(CONTENT_WIDTH - 8), + Sizing.fixed(ROW_HEIGHT- 8), + rowsContainer + ); + + content.child(scrollArea); } private void buildSettingsPanel(FlowLayout content) { FlowLayout rowsContainer = UIContainers.verticalFlow(Sizing.fixed(CONTENT_WIDTH - 8), Sizing.content()); - rowsContainer.gap(2); + rowsContainer.gap(8); rowsContainer.verticalAlignment(VerticalAlignment.TOP); rowsContainer.horizontalAlignment(HorizontalAlignment.LEFT); rowsContainer.padding(Insets.of(0)); @@ -439,6 +457,7 @@ public class MyScreen extends BaseOwoScreen { switch (key) { case "FPS" -> openModuleSettings("FPS", fpsModuleSettings()); case "Key" -> openModuleSettings("Keystrokes", keyStrokesSettings()); + case "Coords" -> openModuleSettings("Coordinates", CoordsSettings()); default -> buildGeneralPanel(content); } }