diff --git a/CREDITS.md b/CREDITS.md index 01de8a95b..e17b2b575 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -49,3 +49,4 @@ Copyright © opentopography.org. All Rights Reserved. [Terms of Use](https://ope ### [The Noun Project](https://thenounproject.com/) Stats icon by [Meko](https://thenounproject.com/mekoda/) – https://thenounproject.com/icon/stats-4942475/ +Pay Per Click icon by [Fauzan Adiima](https://thenounproject.com/creator/fauzan94/) – https://thenounproject.com/icon/pay-per-click-2586454/ diff --git a/resources/images/CursorPriceIconWhite.svg b/resources/images/CursorPriceIconWhite.svg new file mode 100644 index 000000000..edc28312d --- /dev/null +++ b/resources/images/CursorPriceIconWhite.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + pay per click, ppc, click, cost per click, mouse + + + + + Created by Fauzan Adiima + from the Noun Project + diff --git a/resources/lang/en.json b/resources/lang/en.json index 8a81345f3..ad8f421aa 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -376,6 +376,8 @@ "special_effects_desc": "Toggle special effects. Deactivate to improve performances", "structure_sprites_label": "Structure Sprites", "structure_sprites_desc": "Toggle structure sprites", + "cursor_cost_label_label": "Cursor Build Cost", + "cursor_cost_label_desc": "Show a cost pill under the build cursor icon", "anonymous_names_label": "Hidden Names", "anonymous_names_desc": "Hide real player names with random ones on your screen.", "lobby_id_visibility_label": "Hidden Lobby IDs", diff --git a/src/client/UserSettingModal.ts b/src/client/UserSettingModal.ts index 3fa54b34d..39f2967c7 100644 --- a/src/client/UserSettingModal.ts +++ b/src/client/UserSettingModal.ts @@ -143,6 +143,15 @@ export class UserSettingModal extends LitElement { console.log("🏠 Structure sprites:", enabled ? "ON" : "OFF"); } + private toggleCursorCostLabel(e: CustomEvent<{ checked: boolean }>) { + const enabled = e.detail?.checked; + if (typeof enabled !== "boolean") return; + + this.userSettings.set("settings.cursorCostLabel", enabled); + + console.log("💰 Cursor build cost:", enabled ? "ON" : "OFF"); + } + private toggleAnonymousNames(e: CustomEvent<{ checked: boolean }>) { const enabled = e.detail?.checked; if (typeof enabled !== "boolean") return; @@ -309,6 +318,15 @@ export class UserSettingModal extends LitElement { @change=${this.toggleStructureSprites} > + + + + +