A modular floating button framework for Starsector's campaign map. Mods can register draggable buttons that players can arrange, lock together for group movement, and toggle via LunaLib settings.
- Floating Campaign Buttons — Rectangular buttons with chamfered corners and metallic frame, matching the game's native UI style
- Drag & Drop — Buttons can be freely dragged around the campaign map
- Snap-to-Lock Grouping — Drag buttons near each other to snap them into groups; right-click to unlock
- LunaLib Settings — Toggle individual buttons on/off from the mod settings menu
- Modder API — Simple registration interface for other mods to add their own buttons
- Game-Accurate Colors — Uses the game's own
buttonBg,buttonBgDark, andbuttonTextcolor keys
| Button | Requires | Description |
|---|---|---|
| NexusUI | NexusUI | Opens the NexusUI dashboard |
- Install LazyLib and LunaLib
- Download the latest release or clone this repository
- Copy the
TripadExtensionfolder into yourStarsector/mods/directory - Enable Tripad Extension in the Starsector launcher
In your mod_info.json:
{
"dependencies": [
{"id": "tripad_extension", "name": "Tripad Extension"}
]
}import com.tripadextension.*;
public class MyModPlugin extends BaseModPlugin {
@Override
public void onGameLoad(boolean newGame) {
TripadManager mgr = TripadManager.getInstance();
TripadButtonSpec spec = new TripadButtonSpec("my_button")
.setLabel("My Mod")
.setTooltip("Open My Mod panel")
.setIconColor(new Color(100, 200, 100))
.setSortOrder(50)
.setHandler(new TripadClickHandler() {
public void onClick() {
// Your button action here
}
});
mgr.registerButton(spec);
}
}If your mod should work with or without Tripad Extension, use the lazy class loading pattern:
1. Create a helper class that imports Tripad types:
import com.tripadextension.*;
public class MyTripadIntegration {
public static void register() {
TripadManager mgr = TripadManager.getInstance();
TripadButtonSpec spec = new TripadButtonSpec("my_button")
.setLabel("My Mod")
.setTooltip("Open My Mod")
.setSortOrder(50)
.setHandler(new TripadClickHandler() {
public void onClick() { /* ... */ }
});
mgr.registerButton(spec);
}
}2. Guard the call in your ModPlugin:
if (Global.getSettings().getModManager().isModEnabled("tripad_extension")) {
try {
MyTripadIntegration.register();
} catch (Throwable e) {
log.warn("Tripad integration failed: " + e.getMessage());
}
}| Method | Description |
|---|---|
setLabel(String) |
Button text displayed on the campaign map |
setTooltip(String) |
Hover tooltip text |
setIconColor(Color) |
Accent color for the button |
setSortOrder(int) |
Position order (lower = further left) |
setHandler(TripadClickHandler) |
Click callback |
| Method | Description |
|---|---|
getInstance() |
Get the singleton manager |
registerButton(TripadButtonSpec) |
Register a new button |
unregisterButton(String id) |
Remove a button by ID |
getButton(String id) |
Get a button by ID |
getButtons() |
Get all registered buttons |
- NexusUI — UI framework with floating overlay, tabbed panels, and REST API
- NexusDashboard — Fleet, colonies, factions overview
- NexusCheats — In-game cheat panel
- NexusProfiler — Performance diagnostics
- NexusTactical — Combat fleet visualization