diff --git a/src/js/changelog.js b/src/js/changelog.js index c105208f..35e41924 100644 --- a/src/js/changelog.js +++ b/src/js/changelog.js @@ -3,7 +3,7 @@ export const CHANGELOG = [ version: "1.4.3", date: "28.08.2021", entries: [ - "You can now hold 'ALT' while hovering a building to see its output! (Thanks to Sense101)", + "You can now hold 'ALT' while hovering a building to see its output! (Thanks to Sense101) (PS: There is now a setting to have it always on!)", "The map overview should now be much more performant! As a consequence, you can now zoom out farther! (Thanks to PFedak)", "Puzzle DLC: There is now a 'next puzzle' button!", "Puzzle DLC: There is now a search function!", diff --git a/src/js/game/hud/parts/shape_tooltip.js b/src/js/game/hud/parts/shape_tooltip.js index 9a12834d..aabe7fa1 100644 --- a/src/js/game/hud/parts/shape_tooltip.js +++ b/src/js/game/hud/parts/shape_tooltip.js @@ -29,9 +29,13 @@ export class HUDShapeTooltip extends BaseHUDPart { isActive() { const hudParts = this.root.hud.parts; + const active = + this.root.app.settings.getSetting("shapeTooltipAlwaysOn") || + this.root.keyMapper.getBinding(KEYMAPPINGS.ingame.showShapeTooltip).pressed; + // return false if any other placer is active return ( - this.root.keyMapper.getBinding(KEYMAPPINGS.ingame.showShapeTooltip).pressed && + active && !this.isPlacingBuilding && !hudParts.massSelector.currentSelectionStartWorld && hudParts.massSelector.selectedUids.size < 1 && diff --git a/src/js/profile/application_settings.js b/src/js/profile/application_settings.js index 0c21e252..22074eae 100644 --- a/src/js/profile/application_settings.js +++ b/src/js/profile/application_settings.js @@ -257,6 +257,7 @@ export const allApplicationSettings = [ }), new BoolSetting("enableMousePan", enumCategories.advanced, (app, value) => {}), + new BoolSetting("shapeTooltipAlwaysOn", enumCategories.advanced, (app, value) => {}), new BoolSetting("alwaysMultiplace", enumCategories.advanced, (app, value) => {}), new BoolSetting("zoomToCursor", enumCategories.advanced, (app, value) => {}), new BoolSetting("clearCursorOnDeleteWhilePlacing", enumCategories.advanced, (app, value) => {}), @@ -307,6 +308,7 @@ class SettingsStorage { this.autosaveInterval = "two_minutes"; this.alwaysMultiplace = false; + this.shapeTooltipAlwaysOn = false; this.offerHints = true; this.enableTunnelSmartplace = true; this.vignette = true; @@ -536,7 +538,7 @@ export class ApplicationSettings extends ReadWriteProxy { } getCurrentVersion() { - return 30; + return 31; } /** @param {{settings: SettingsStorage, version: number}} data */ @@ -683,6 +685,11 @@ export class ApplicationSettings extends ReadWriteProxy { data.version = 30; } + if (data.version < 31) { + data.settings.shapeTooltipAlwaysOn = false; + data.version = 31; + } + return ExplainedResult.good(); } } diff --git a/translations/base-en.yaml b/translations/base-en.yaml index 3a3692f8..3f3b1412 100644 --- a/translations/base-en.yaml +++ b/translations/base-en.yaml @@ -1286,6 +1286,11 @@ settings: description: >- Controls the size of the shapes on the map overview (when zooming out). + shapeTooltipAlwaysOn: + title: Shape Tooltip - Show Always + description: >- + Whether to always show the shape tooltip when hovering buildings, instead of having to hold 'ALT'. + keybindings: title: Keybindings hint: >-