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:
@@ -37,6 +37,15 @@ public final class GroupIcons {
|
||||
}
|
||||
|
||||
public ImageIcon icon(long iconId) {
|
||||
if (iconId == 0) return null;
|
||||
// TeamSpeak's default group icons belong to the icon pack, which draws them in
|
||||
// its own style; only server-uploaded icons come off the wire. The theme keeps
|
||||
// its own cache, so those are not cached again here.
|
||||
if (iconId > 0 && iconId <= IconRepository.MAX_BUNDLED_ID) {
|
||||
ImageIcon themed = IconTheme.icon("GROUP_" + iconId, SIZE);
|
||||
if (themed != null) return themed;
|
||||
}
|
||||
|
||||
ImageIcon cached = decoded.get(iconId);
|
||||
if (cached != null) return cached;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user