mirror of
https://forge.murkfall.net/bluesaxman/librePECS.git
synced 2026-03-13 02:04:20 -06:00
Created main js and css files. Added some of the iniitialization for the ui
This commit is contained in:
24
main.js
Normal file
24
main.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// Initialize gui
|
||||
|
||||
window.app = {};
|
||||
app.gui = {};
|
||||
app.gui.main = document.createElement("div");
|
||||
app.gui.main.id = "root";
|
||||
document.body.appendChild(app.gui.main);
|
||||
app.gui.menu = document.createElement("nav");
|
||||
app.gui.menu.id = "navigation";
|
||||
app.gui.main.appendChild(app.gui.menu);
|
||||
app.gui.view = document.createElement("div");
|
||||
app.gui.view.id = "view";
|
||||
app.gui.main.appendChild(app.gui.view);
|
||||
// Library popup
|
||||
app.gui.library = document.createElement("dev");
|
||||
// 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>";
|
||||
app.gui.view.appendChild(thisPec);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user