fix: show cancel icon when clicking unusable or already used abilities (#2174)#2903
Open
sungdark wants to merge 2 commits into
Open
fix: show cancel icon when clicking unusable or already used abilities (#2174)#2903sungdark wants to merge 2 commits into
sungdark wants to merge 2 commits into
Conversation
- 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.
|
Someone is attempting to deploy a commit to the FreezingMoon Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When clicking on an ability that is either:
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.tsThe 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: