Redesign the mod menu
The mod menu is now a translucent panel beside a navigation rail, with a header showing how many mods are enabled, a search box, category filters built from the mods' tags and a three-column grid of mod cards. Each card shows the mod's icon, name and description with a settings button and an on/off switch. The layout shrinks to fit smaller windows. New reusable pieces: Panel, Label, ChipGroup, SearchInput, Toggle.drawSwitch, Theme helpers for panel, border, muted text and body font, and Fonts.ellipsize. The sidebar and card icons are Lucide SVGs, and seven mod icons were redrawn in the same style. Scroll can skip its background and be cleared, and no longer passes clicks outside its bounds to children scrolled out of view. Input checks overflow and places the cursor at the scale its text is drawn at. Screens that are not redesigned yet move the wider sidebar so it keeps its gap. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -64,6 +64,35 @@ public class Theme {
|
||||
return hover ? ACCENT_FG.value : PRIMARY_FG.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Translucent background for panels drawn over the world
|
||||
*/
|
||||
public static int getPanelBg() {
|
||||
return withAlpha(0.82f, BACKGROUND.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Faint outline for panels, cards and inputs
|
||||
*/
|
||||
public static int getBorder() {
|
||||
return withAlpha(0.08f, FOREGROUND.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Secondary text: descriptions, counts and placeholders
|
||||
*/
|
||||
public static int getMutedFg() {
|
||||
return withAlpha(0.65f, FOREGROUND.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Font for secondary text. Inter bold is too heavy there, so it becomes
|
||||
* regular Inter; other fonts are kept.
|
||||
*/
|
||||
public static int getBodyFont() {
|
||||
return FONT.value == 2 ? 1 : FONT.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiplies existing alpha with 0–255 alpha.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user