From 5b115ca56d6371c3d05ff06feeb8fecb00e46fea Mon Sep 17 00:00:00 2001 From: Michael Moore Date: Sat, 24 Feb 2024 13:46:03 -0600 Subject: [PATCH] feat(ui): add tooltips to the various Advanced Border Settings --- src/renderer/src/lib/MapSettingControl.svelte | 19 ++++++- .../src/lib/icons/HeroiconInfoMini.svelte | 12 +++++ src/renderer/src/lib/mapSettings.ts | 49 +++++++++++++++---- 3 files changed, 70 insertions(+), 10 deletions(-) create mode 100644 src/renderer/src/lib/icons/HeroiconInfoMini.svelte diff --git a/src/renderer/src/lib/MapSettingControl.svelte b/src/renderer/src/lib/MapSettingControl.svelte index 0065162..6ca7258 100644 --- a/src/renderer/src/lib/MapSettingControl.svelte +++ b/src/renderer/src/lib/MapSettingControl.svelte @@ -1,5 +1,5 @@ + + + + diff --git a/src/renderer/src/lib/mapSettings.ts b/src/renderer/src/lib/mapSettings.ts index abb9954..257d334 100644 --- a/src/renderer/src/lib/mapSettings.ts +++ b/src/renderer/src/lib/mapSettings.ts @@ -128,6 +128,7 @@ type RequiresReprocessingFunc = (prev: T, next: T) => boolean; interface MapSettingConfigBase extends IdAndName { requiresReprocessing?: boolean | RequiresReprocessingFunc; hideIf?: (settings: MapSettings) => boolean; + tooltip?: string; } interface MapSettingConfigToggle extends MapSettingConfigBase { @@ -693,12 +694,25 @@ export const mapSettingConfig: MapSettingGroup[] = [ name: 'Circular Galaxy Borders', requiresReprocessing: true, type: 'toggle', + tooltip: `
    +
  • When enabled, the overall border of the galaxy will be circular in shape, and there will be no "holes" between systems.
  • +
  • If the galaxy is a "Starburst", a special spiral shape will be used instead of a circle.
  • +
`, }, { id: 'hyperlaneSensitiveBorders', name: 'Hyperlane Sensitive Borders', requiresReprocessing: true, type: 'toggle', + tooltip: `
    +
  • When enabled, borders will follow hyperlanes.
  • +
  • When disabled, only solar systems affect borders.
  • +
  • Not supported if the following are enabled:
  • +
    • +
    • Metro-style Hyperlanes
    • +
    • Align Solar Systems to Grid
    • +
  • +
`, }, { id: 'voronoiGridSize', @@ -707,15 +721,12 @@ export const mapSettingConfig: MapSettingGroup[] = [ type: 'number', step: 1, min: 1, - }, - { - id: 'claimVoidBorderThreshold', - name: 'Claim Bordering Void Threshold', - requiresReprocessing: true, - type: 'range', - step: 0.05, - min: 0, - max: 1, + tooltip: `
    +
  • Higher values make borders "looser".
  • +
  • Lower values make borders "tighter".
  • +
  • Lower values take longer to process.
  • +
  • WARNING: values below 10 can take a very long time to process.
  • +
`, }, { id: 'claimVoidMaxSize', @@ -725,6 +736,26 @@ export const mapSettingConfig: MapSettingGroup[] = [ step: 1, min: 0, optional: true, + tooltip: `
    +
  • Empty "void" between systems can be claimed by neighboring country borders.
  • +
  • Only void smaller than this size can be claimed.
  • +
  • Set to 0 or leave empty to disable this behavior entirely.
  • +
`, + }, + { + id: 'claimVoidBorderThreshold', + name: 'Claim Bordering Void Threshold', + requiresReprocessing: true, + type: 'range', + step: 0.05, + min: 0, + max: 1, + tooltip: `
    +
  • Empty pockets of "void" between systems can be claimed by neighboring country borders.
  • +
  • To claim void, a country much control at least this much of the void's border.
  • +
  • Set to full so only fully enclosed void is claimed.
  • +
  • Set to empty so all void bordering at least one country is claimed.
  • +
`, }, ], },