Drag UI
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user