Permalink
Browse files

Show wildcards in economy

Also fixes #133
  • Loading branch information...
Manuel-777 committed Dec 28, 2018
1 parent a849d1a commit 800d64d71f80beb434793536d1e87608561161cd
Showing with 55 additions and 5 deletions.
  1. +1 −1 window_main/decks.js
  2. +44 −4 window_main/economy.js
  3. +10 −0 window_main/index.css
@@ -114,7 +114,7 @@ function open_decks_tab() {
flcf.classList.add('deck_tags_container');

var flcfwc = document.createElement("div");
//flcfwc.style.flexGrow = 2;
flcfwc.style.marginRight = '8px';
flcfwc.classList.add('flex_item');

let t = createTag(null, flcf, false);
@@ -44,11 +44,11 @@ function open_economy_tab(loadMore) {
let economy_id = economyHistory.changes[n];
let change = economyHistory[economy_id];

if (change == undefined) continue;

if (!selectItems.includes(change.context)) {
selectItems.push(change.context);
}

if (change == undefined) continue;
}

if (change.delta.gemsDelta != undefined) {
if (change.delta.gemsDelta > 0)
@@ -95,6 +95,25 @@ function open_economy_tab(loadMore) {
select.next('div.select-styled').text(filterEconomy);

//
let icwcc = document.createElement("div");
icwcc.classList.add("economy_wc_med");
icwcc.classList.add("wc_common");
icwcc.title = "Common Wildcards";

let icwcu = document.createElement("div");
icwcu.classList.add("economy_wc_med");
icwcu.classList.add("wc_uncommon");
icwcu.title = "Uncommon Wildcards";

let icwcr = document.createElement("div");
icwcr.classList.add("economy_wc_med");
icwcr.classList.add("wc_rare");
icwcr.title = "Rare Wildcards";

let icwcm = document.createElement("div");
icwcm.classList.add("economy_wc_med");
icwcm.classList.add("wc_mythic");
icwcm.title = "Mythic Wildcards";

let icgo = document.createElement("div");
icgo.classList.add("economy_gold_med");
@@ -109,8 +128,29 @@ function open_economy_tab(loadMore) {
tx.style.lineHeight = "64px";
tx.classList.add("economy_sub");

div.appendChild(icgo);
div.appendChild(icwcc);
let ntx = tx.cloneNode(true);
ntx.innerHTML = economyHistory.wcCommon;
div.appendChild(ntx);

div.appendChild(icwcu);
ntx = tx.cloneNode(true);
ntx.innerHTML = economyHistory.wcUncommon;
div.appendChild(ntx);

div.appendChild(icwcr);
ntx = tx.cloneNode(true);
ntx.innerHTML = economyHistory.wcRare;
div.appendChild(ntx);

div.appendChild(icwcm);
ntx = tx.cloneNode(true);
ntx.innerHTML = economyHistory.wcMythic;
div.appendChild(ntx);


div.appendChild(icgo);
ntx = tx.cloneNode(true);
ntx.innerHTML = economyHistory.gold;
div.appendChild(ntx);

@@ -1381,6 +1381,15 @@ a:hover {
background-size: contain;
}

.economy_wc_med {
background-repeat: no-repeat;
margin: auto 8px;
margin-left: 18px;
width: 28px;
height: 28px;
background-size: contain;
}

.economy_gold {
background-repeat: no-repeat;
margin: auto 4px;
@@ -1393,6 +1402,7 @@ a:hover {
.economy_gold_med {
background-repeat: no-repeat;
margin: auto 4px;
margin-left: 16px;
width: 28px;
height: 28px;
background-image: url(../images/gold.png);

0 comments on commit 800d64d

Please sign in to comment.