Merge remote-tracking branch 'origin/main'

This commit is contained in:
2026-07-11 19:07:57 +02:00
8 changed files with 288 additions and 3 deletions
@@ -56,6 +56,10 @@ public class Module_Coords {
coordinates.padding(Insets.of(padding));
}
public static FlowLayout getCoordinates() {
return coordinates;
}
public static void register() {
Hud.add(Identifier.fromNamespaceAndPath("citrus-dev", "coords_display"), () -> {
if (coordinates == null) {
@@ -52,6 +52,10 @@ public class Module_FPS {
fpsContainer.padding(Insets.of(padding));
}
public static FlowLayout getFpsContainer() {
return fpsContainer;
}
public static void register() {
Hud.add(Identifier.fromNamespaceAndPath("citrus-dev", "fps_display"), () -> {
if (fpsContainer == null) {
@@ -31,6 +31,10 @@ public class Module_KeyStrokes {
static boolean toggle = CONFIG.keyEnabled;
private static boolean shown = false;
public static FlowLayout getKeyContainer() {
return keyContainer;
}
public static boolean isEnabled() {
return toggle;
}
@@ -61,7 +65,7 @@ public class Module_KeyStrokes {
public static void register() {
Hud.add(Identifier.fromNamespaceAndPath("citrus-dev", "keystrokes_display"), () -> {
if (keyContainer == null) {
keySize = CONFIG.keySize > 0 ? CONFIG.keySize : 16; // load saved size, fallback to default
keySize = CONFIG.keySize > 0 ? CONFIG.keySize : 16;
wLabel = new ScalableLabel(Component.literal("W"));
aLabel = new ScalableLabel(Component.literal("A"));
@@ -321,7 +321,26 @@ public class MyScreen extends BaseOwoScreen<FlowLayout> {
private void buildSettingsPanel(FlowLayout content) {
content.child(UIComponents.label(Component.literal("Settings")));
FlowLayout rowsContainer = UIContainers.verticalFlow(Sizing.fixed(CONTENT_WIDTH - 8), Sizing.content());
rowsContainer.gap(2);
rowsContainer.verticalAlignment(VerticalAlignment.TOP);
rowsContainer.horizontalAlignment(HorizontalAlignment.LEFT);
rowsContainer.padding(Insets.of(0));
FlowLayout editButton = SettingsControls.makeTextButton(GLASS_PANEL, "Edit Positions", () -> {
DraggableHud.setEditMode(true);
Minecraft.getInstance().setScreen(null);
});
editButton.horizontalSizing(Sizing.fixed(CONTENT_WIDTH - 8));
rowsContainer.child(editButton);
FlowLayout hintRow = UIContainers.verticalFlow(Sizing.fixed(CONTENT_WIDTH - 8), Sizing.content());
hintRow.padding(Insets.of(4, 0, 0, 0));
hintRow.child(UIComponents.label(Component.literal("Drag HUD modules to reposition. Press ESC to stop."))
.color(Color.ofRgb(0x797b86)));
rowsContainer.child(hintRow);
content.child(rowsContainer);
}
private void openModuleSettings(String title, List<SettingRow> rows) {