mirror of
https://forge.murkfall.net/bluesaxman/librePECS.git
synced 2026-03-13 02:04:20 -06:00
added additional styling
This commit is contained in:
16
main.js
16
main.js
@@ -7,7 +7,11 @@ class auxillery_dialog {
|
||||
this.root.classList.add("dialog");
|
||||
this.title = "string" == typeof title ? title : "";
|
||||
var title_bar = document.createElement("div");
|
||||
title_bar.innerText = this.title;
|
||||
title_bar.classList.add("title_bar");
|
||||
var titleText = document.createElement("span");
|
||||
titleText.innerText = this.title;
|
||||
titleText.classList.add("title_text");
|
||||
title_bar.appendChild(titleText);
|
||||
this.root.appendChild(title_bar);
|
||||
this.body = document.createElement("div");
|
||||
this.root.appendChild(me.body);
|
||||
@@ -36,14 +40,18 @@ app.gui.view.id = "view";
|
||||
app.gui.main.appendChild(app.gui.view);
|
||||
// Library popup
|
||||
app.gui.library = new auxillery_dialog("Library");
|
||||
app.gui.library.body.classList.add("library_body");
|
||||
app.gui.main.append(app.gui.library.root);
|
||||
// Options popup
|
||||
app.gui.options = new auxillery_dialog("Options");
|
||||
// pre-populate grid with emptys
|
||||
for (var x = 0; x < 16; x++) {
|
||||
var name = "pec"+x;
|
||||
var thisPec = app.gui[name] = document.createElement("span");
|
||||
thisPec.classList.add("pecSlot","empty");
|
||||
thisPec.innerHTML = "<p>+</p>";
|
||||
var thisPec = document.createElement("span");
|
||||
app.gui[name] = thisPec;
|
||||
thisPec.classList.add("pecSlot");
|
||||
thisPec.id = name;
|
||||
clearPec(x);
|
||||
app.gui.view.appendChild(thisPec);
|
||||
thisPec.addEventListener("click", (p,x)=>{
|
||||
app.currentPec = p;
|
||||
|
||||
Reference in New Issue
Block a user