1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Add setting to always show shape tooltip

This commit is contained in:
tobspr
2021-08-26 14:29:22 +02:00
parent ae6c5b151e
commit f61f25934f
4 changed files with 19 additions and 3 deletions

View File

@@ -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 &&