diff --git a/resources/lang/en.json b/resources/lang/en.json index 28cf8fd05..f5879e7b7 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -535,6 +535,8 @@ "hover_glow_alpha_label": "Hover glow strength", "hover_glow_width_desc": "How far the white glow extends behind the hovered player's name", "hover_glow_width_label": "Hover glow size", + "icon_size_desc": "How large structure icons are drawn on the map", + "icon_size_label": "Structure icon size", "name_cull_desc": "Hide names smaller than this size", "name_cull_label": "Minimum name size", "name_scale_label": "Name Scale", diff --git a/src/client/hud/layers/GraphicsSettingsModal.ts b/src/client/hud/layers/GraphicsSettingsModal.ts index 4719bfc42..977161f3a 100644 --- a/src/client/hud/layers/GraphicsSettingsModal.ts +++ b/src/client/hud/layers/GraphicsSettingsModal.ts @@ -32,6 +32,10 @@ const HOVER_GLOW_ALPHA_MIN = 0; const HOVER_GLOW_ALPHA_MAX = 1; const HOVER_GLOW_ALPHA_STEP = 0.05; +const ICON_SIZE_MIN = 40; +const ICON_SIZE_MAX = 70; +const ICON_SIZE_STEP = 5; + const HIGHLIGHT_FILL_MIN = 0; const HIGHLIGHT_FILL_MAX = 1; const HIGHLIGHT_FILL_STEP = 0.01; @@ -318,6 +322,18 @@ export class GraphicsSettingsModal extends LitElement implements Controller { this.patchRailroad({ railThickness: value }); } + private currentIconSize(): number { + return ( + this.userSettings.graphicsOverrides().structure?.iconSize ?? + renderDefaults.structure.iconSize + ); + } + + private onIconSizeChange(event: Event) { + const value = parseFloat((event.target as HTMLInputElement).value); + this.patchStructure({ iconSize: value }); + } + private currentClassicIcons(): boolean { return ( this.userSettings.graphicsOverrides().structure?.classicIcons ?? true @@ -432,6 +448,7 @@ export class GraphicsSettingsModal extends LitElement implements Controller { const hoverGlowWidth = this.currentHoverGlowWidth(); const hoverGlowAlpha = this.currentHoverGlowAlpha(); const namesColored = !this.currentDarkNames(); + const iconSize = this.currentIconSize(); const classicIcons = this.currentClassicIcons(); const classicNumbers = this.currentClassicNumbers(); const highlightFill = this.currentHighlightFill(); @@ -629,6 +646,31 @@ export class GraphicsSettingsModal extends LitElement implements Controller { ${translateText("graphics_setting.section_structure_icons")} +