Skip to content

Feat: better gui - #4

Merged
Flapjacck merged 1 commit into
mainfrom
better-gui
Oct 15, 2026
Merged

Flapjacck merged 1 commit into
mainfrom
better-gui

Conversation

@Flapjacck

Copy link
Copy Markdown
Owner

Changes

Visual Design

  • Color palette: Dark neutrals (#0F0F14, #18181E) with a single soft cyan accent (#8BDDFF) — no decorative bevels or hard edges
  • Panel layers: Outer dark shell → slightly lighter inner zone → 2px cyan accent stripe at top → thin separator above buttons
  • Screen backdrop: Reduced opacity (0xB0 instead of 0xC8) so players see world changes live while adjusting settings
  • Panel height: Optimized from 196px → 178px to keep more of the world visible

Custom Slider Rendering

  • Replaced vanilla sprite-based sliders with flat rectangles:
    • Dark background track
    • Cyan active-range fill
    • Bright handle knob (1px taller than track for lift effect)
  • Handle brightens on hover for clear interactive feedback
  • Value displayed centered on the slider itself

Layout & Typography

  • Section labels rendered directly in background pass (no StringWidget overhead) with muted secondary color (#8888A0)
  • Title centered at top with drop shadow
  • Two rows: Swing Speed + Held Item Scale, each with label → slider + text box
  • Better visual hierarchy with consistent 18px padding and 8px gaps

Button Changes

  • Removed Apply button — onClose() already auto-saves, making it redundant
  • Two buttons centered: Reset and Close
  • Reset is two-click confirm:
    • First click: label changes to "Confirm?" and arms the reset state
    • Second click: actually resets to vanilla
    • Clicking anywhere else disarms it (label reverts to "Reset")
    • Prevents accidental resets

MC 26.x Compatibility

  • Updated rendering to use extractWidgetRenderState (new in 26.x)
  • Uses correct event signature for mouseClicked(MouseButtonEvent, boolean)

Testing

  • Compiles cleanly
  • Panel is visually distinct but doesn't obscure the world
  • Sliders and text boxes sync correctly
  • Reset requires two clicks; disarms on any other click
  • Settings auto-save on close

@Flapjacck
Flapjacck merged commit f4276f2 into main Oct 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant