Skip to content

fix: show cancel icon when clicking unusable or already used abilities (#2174)#2903

Open
sungdark wants to merge 2 commits into
FreezingMoon:masterfrom
sungdark:fix/show-cancel-icon-unusable-abilities
Open

fix: show cancel icon when clicking unusable or already used abilities (#2174)#2903
sungdark wants to merge 2 commits into
FreezingMoon:masterfrom
sungdark:fix/show-cancel-icon-unusable-abilities

Conversation

@sungdark
Copy link
Copy Markdown

Summary

When clicking on an ability that is either:

  • Not meeting requirements (e.g., not enough energy)
  • Already used this turn

The cancel icon will now be temporarily displayed on the ability button, providing visual feedback to the player instead of doing nothing.

Changes

File: src/ui/interface.ts

The click handler for ability buttons now checks if the ability is usable before selecting it. If the ability fails require() check or is already used, the cancel icon is briefly shown.

Testing

Built successfully with npm run build.

Fixes #2174


Bounty Payment:

  • Address: eB51DWp1uECrLZRLsE2cnyZUzfRWvzUzaJzkatTpQV9

bounty-scout and others added 2 commits March 27, 2026 07:37
- Removed xray effect on units when showing coordinate grid
- Moved overlayHexesGroup to display on top of creatures
- Show dashed hex overlay at 25% opacity for non-unit hexes
FreezingMoon#2174)

When clicking on an ability that is either:
- Not meeting requirements (e.g., not enough energy)
- Already used this turn

The cancel icon will now be temporarily displayed on the ability button,
providing visual feedback to the player instead of doing nothing.

Previously, clicking such abilities would silently do nothing, which was
confusing. Now the player gets clear feedback that the ability cannot
be activated.
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 27, 2026

Someone is attempting to deploy a commit to the FreezingMoon Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

show canceled icons when clicking unusable abilities [bounty: 4 XTR]

1 participant