Hotfix Nr. 1
This commit is contained in:
@@ -277,6 +277,7 @@ public class MyScreen extends BaseOwoScreen<FlowLayout> {
|
||||
}
|
||||
|
||||
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<FlowLayout> {
|
||||
"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<FlowLayout> {
|
||||
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<FlowLayout> {
|
||||
"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<FlowLayout> {
|
||||
switch (key) {
|
||||
case "FPS" -> openModuleSettings("FPS", fpsModuleSettings());
|
||||
case "Key" -> openModuleSettings("Keystrokes", keyStrokesSettings());
|
||||
case "Coords" -> openModuleSettings("Coordinates", CoordsSettings());
|
||||
default -> buildGeneralPanel(content);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user