Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2537] indicate selected ability when targeting #2567

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

weiquu
Copy link
Contributor

@weiquu weiquu commented Mar 28, 2024

This fixes issue #2537

My wallet address is 0x848fBf0588B448f14a2a8BA84Ef12711677073Db

Outline of solution:

  • Added the svgs for unit abilities to Phaser assets so that they can be used for sprite textures
  • Add 'ability' to the hovered hex's overlay visual state, remove it on click (ability used) and hover off
  • If 'ability' is in the overlay classes and there is an ability selected, add the appropriate abilityIcon; else, set alpha to 0
  • Frame and background are set in the hex's constructor, with alpha toggled along with the the abilityIcon
  • abilityIcon brought to top of overlay group each time it's displayed so the icon can be seen more clearly

Example:
Screenshot 2024-03-29 at 10 31 24 PM

Copy link

vercel bot commented Mar 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ancientbeast ✅ Ready (Inspect) Visit Preview Mar 29, 2024 2:33pm

@DreadKnight
Copy link
Member

@weiquu Heya! Um, no resizing of icons please; use other ways for spacing out stuff, like adding extra divs and using code.

@weiquu
Copy link
Contributor Author

weiquu commented Mar 28, 2024

Hey @DreadKnight, I meant scaling the sprites down, not actually changing the .svg files. Is that fine? I did something similar here as well

@DreadKnight
Copy link
Member

Hey @DreadKnight, I meant scaling the sprites down, not actually changing the .svg files. Is that fine? I did something similar here as well

Doing it through code like that should be ok. I get that this is a draft, just wanted to make sure of this approach aspect.

@weiquu
Copy link
Contributor Author

weiquu commented Mar 29, 2024

@DreadKnight ready for review!

@DreadKnight
Copy link
Member

@weiquu Only did some testing with Firefox, 2 stacked Dark Priests for each player, mouse wheel working badly and no showcased ability icons at all. Will test soon with Brave as well. Also, I understand that icons need to be moved into the autoload folder, but UI should use them from there, it's important to avoid duplicated, but you've changed the icons I think.

@DreadKnight DreadKnight marked this pull request as draft April 2, 2024 06:53
@DreadKnight
Copy link
Member

@weiquu You can test it here btw -> https://ancientbeast-9pgv468k0-freezingmoon.vercel.app
There's also web based IDE like VSC.

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.

None yet

2 participants