Browse Source

Make active powerups into icons

tags/v0.1.0
Fen Dweller 5 years ago
parent
commit
4d75a99d92
No known key found for this signature in database GPG Key ID: E80B35A6F11C3656
2 changed files with 30 additions and 4 deletions
  1. +20
    -2
      gorge.css
  2. +10
    -2
      gorge.js

+ 20
- 2
gorge.css View File

@@ -697,8 +697,26 @@ div::-webkit-scrollbar-corner {
--progress: 0%;
background: linear-gradient(to left, #000 0%, #000 var(--progress), #555 var(--progress), #555 100%);
transition: 1s;
height: 50px;
max-height: 50px;
width: 80px;
height: 80px;
max-height: 80px;
}

.powerup-entry > .powerup-entry-icon-holder {
width: 80px;
height: 80px;
opacity: 1;
pointer-events: none;
position: absolute;
display: flex;
transform: translate(0, 10px);
}


.powerup-entry-icon-holder > .fas {
position: absolute;
font-size: 60px;
text-align: center;
}

.powerup-entry-done {


+ 10
- 2
gorge.js View File

@@ -125,7 +125,16 @@ function addPowerup(key, powerup) {

const powerupEntry = document.createElement("div");
powerupEntry.classList.add("powerup-entry");
powerupEntry.innerText = powerup.name;

const powerupIconHolder = document.createElement("div");
powerupIconHolder.classList.add("powerup-entry-icon-holder");
const powerupIcon = document.createElement("i");
powerupIcon.classList.add("fas");
powerupIcon.classList.add(powerup.icon);

powerupIconHolder.appendChild(powerupIcon);
powerupEntry.appendChild(powerupIconHolder);
powerupList.appendChild(powerupEntry);
@@ -532,7 +541,6 @@ function setup() {
updateAll();
}


const cache = {};

function initializeCaches() {


Loading…
Cancel
Save