background for active skills

This commit is contained in:
Mashy 2019-10-03 15:21:19 +10:00
parent 962b72b85f
commit 0f1ae4d17a
3 changed files with 8 additions and 3 deletions

View File

@ -116,6 +116,9 @@
height: 2em; height: 2em;
height: 25%; height: 25%;
} }
button.active {
background: #2c2c2c;
}
} }
.effects { .effects {
@ -337,6 +340,9 @@
padding: 0 0.5em ; padding: 0 0.5em ;
margin: 0; margin: 0;
} }
button.active {
background: #2c2c2c;
}
} }
.stats div { .stats div {

View File

@ -6,7 +6,7 @@ function wiggle(id, idle) {
const x = window.screen.width * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random()); const x = window.screen.width * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random());
const y = window.screen.height * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random()); const y = window.screen.height * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random());
console.log(x, y); // console.log(x, y);
return anime({ return anime({
targets: target, targets: target,
rotate: 0, rotate: 0,

View File

@ -55,7 +55,6 @@ function Skill(props) {
// if (skillChosen && !targeting) { // if (skillChosen && !targeting) {
// return false; // return false;
// } // }
const cdText = construct.skills[i].cd > 0 const cdText = construct.skills[i].cd > 0
? `- ${s.cd}T` ? `- ${s.cd}T`
: ''; : '';
@ -72,7 +71,7 @@ function Skill(props) {
return ( return (
<button <button
disabled={cdText || s.disabled || ko} disabled={cdText || s.disabled || ko}
class={`construct-skill-btn ${(targeting || highlight) ? 'active' : ''}`} class={`${(targeting || highlight) ? 'active' : ''}`}
type="submit" type="submit"
onClick={onClick}> onClick={onClick}>
{s.skill} {cdText} {s.skill} {cdText}