Skip to content

Commit

Permalink
Fast fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Joywin2412 committed Aug 12, 2024
1 parent 8f43703 commit ef46d14
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions src/ui/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,23 +285,35 @@ export class UI {
if (i == 0) {
// Joywin
const selectedAbility = this.selectNextAbility();
const creature = game.activeCreature;


if (selectedAbility > 0) {
this.abilitiesButtons.forEach((btn, index) => {
if (index === 0) {
btn.$button.removeClass('cancelIcon')
btn.$button.removeClass('nextIcon')

console.log(btn.$button);
this.clickedAbility = -1
}
});
b.cssTransition('nextIcon', 1000);
}
else if(selectedAbility === -1)
{


const self = this;
self.abilitiesButtons.forEach((btn, index) => {
console.log(self.clickedAbility);
const creature = game.activeCreature;
if (self.clickedAbility === index) {
b.cssTransition('cancelIcon', 1000);
this.clickedAbility = -1;
}
} else if (selectedAbility === -1) {
this.abilitiesButtons.forEach((btn, index) => {
console.log(this.clickedAbility);
if (index === 0) {
btn.$button.removeClass('nextIcon')
btn.$button.removeClass('cancelIcon')
this.clickedAbility = -1;
}
});
b.cssTransition('cancelIcon', 1000);

}


return;
}
Expand Down

0 comments on commit ef46d14

Please sign in to comment.