Skip to content
Permalink
Browse files

Display archetype on overlay

  • Loading branch information...
Manuel-777 committed Feb 19, 2019
1 parent 44d07fb commit 76d94faeaa41e67c1f084677537ff721871bef5b
Showing with 15 additions and 2 deletions.
  1. +2 −2 window_background/background.js
  2. +9 −0 window_overlay/index.css
  3. +4 −0 window_overlay/overlay.js
@@ -1609,10 +1609,10 @@ function getOppDeck() {

//
let format = event_to_format[currentEventId];
oppDeck.archetype = undefined;
oppDeck.archetype = "-";
if (format) {
let possible = deck_archetypes[format];
bestMatch = -1;
bestMatch = "-";
bestMatchRate = 0;
possible.forEach((arch) => {
let total = 0;
@@ -27,6 +27,15 @@ body {pointer-events: none}
color: #FAE5D2;
}

.overlay_archetype {
font-size: 14px;
opacity: 1;
-webkit-app-region: drag;
padding: 4px 0 0 0;
text-align: center;
color: #FAE5D2;
}

.overlay_deckcolors {
-webkit-app-region:drag;
height: 24px;
@@ -304,6 +304,8 @@ ipc.on('set_deck', function (event, arg) {
}
changedMode = true;

$(".overlay_archetype").remove();

$(".overlay_deck_container").show();
$(".overlay_draft_container").hide();

@@ -349,7 +351,9 @@ ipc.on('set_deck', function (event, arg) {

if (arg.name !== null) {
if (deckMode == 3) {
$('<div class="overlay_archetype"></div>').insertAfter('.overlay_deckname');
$(".overlay_deckname").html("Played by "+arg.name.slice(0, -6));
$(".overlay_archetype").html(arg.archetype);
}
else {
$(".overlay_deckname").html(arg.name);

0 comments on commit 76d94fa

Please sign in to comment.
You can’t perform that action at this time.