For players
Install minuit next to the mods that need it.
To change the look, open the theme tab on a minuit window. Pick a family, a colour set and light or dark, then press Apply everywhere to use it in every mod that uses minuit.
To make your own colours, use the Composer.
The game stores your choice in config/minuit-client.json.
For mod authors
Declare minuit as a required dependency on the range [1.0,2.0). Do not bundle it in your jar, or your players won't get the updates. They install it as its own mod.
The smallest screen is a MinuitScreen that builds a panel with one component:
PetScreen.java
public class PetScreen extends MinuitScreen {
public PetScreen() { super("mymod.pet.title"); }
@Override
protected PanelComponent build(int w, int h) {
return new PetPanel(Themes.byId("mymod"), words(), (w - 200) / 2, (h - 120) / 2);
}
}
// in PetPanel's constructor
add(new ToggleComponent(at(new Box("sit", 10, 30, 180, 20)), words.get("mymod.sit"), false, on -> { }));Each component has a page with its variants and code, starting with Button.