Draw the interface with TeamSpeak icon packs

Icon packs are read in TeamSpeak's own format — a zip (or unpacked folder)
of SVG/PNG art plus a settings.ini mapping icon keys to files — so the packs
of an installed client and the ones from its add-on site work unchanged.
Legacy packs without that mapping (default.zip) are resolved by their file
naming convention instead, picking the resolution closest to the drawn size.

The pack draws the tree, toolbar, menus, context menus, file browser and the
default group icons; a pack's FALLBACK option decides whether what it lacks
comes from default.zip, and anything still missing falls back to the icons
the client draws itself. Options → Design picks the pack and shows a viewer
of everything in it.

Vector art is rasterised with JSVG, and the pack search roots are shared
with the sound packs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-14 12:46:39 +00:00
parent e1f62ab50d
commit 676e95023e
21 changed files with 1268 additions and 195 deletions

View File

@@ -17,24 +17,25 @@ final class ClientMenu {
static JPopupMenu build(ClientEntry client, boolean self, ServerTreePanel.Actions actions) {
JPopupMenu menu = new JPopupMenu();
if (!self) {
JMenuItem pm = new JMenuItem("Open text chat");
JMenuItem pm = new JMenuItem("Open text chat", Icons.of("PLAYER_CHAT"));
pm.addActionListener(a -> actions.openPrivateChat(client));
menu.add(pm);
JMenuItem poke = new JMenuItem("Poke");
JMenuItem poke = new JMenuItem("Poke", Icons.of("POKE"));
poke.addActionListener(a -> actions.pokeClient(client));
menu.add(poke);
menu.addSeparator();
boolean muted = actions.isClientLocallyMuted(client.id);
JMenuItem mute = new JMenuItem(muted ? "Unmute client" : "Mute client");
JMenuItem mute = new JMenuItem(muted ? "Unmute client" : "Mute client",
Icons.of(muted ? "PLAYER_ON" : "INPUT_MUTED"));
mute.addActionListener(a -> actions.toggleClientMute(client));
menu.add(mute);
} else {
JMenuItem me = new JMenuItem("This is you");
JMenuItem me = new JMenuItem("This is you", Icons.of("PLAYER_OFF"));
me.setEnabled(false);
menu.add(me);
}
menu.addSeparator();
JMenuItem info = new JMenuItem("Connection Info");
JMenuItem info = new JMenuItem("Connection Info", Icons.of("INFO"));
info.addActionListener(a -> actions.showConnectionInfo(client));
menu.add(info);
return menu;