Skip to content

Commit

Permalink
Change backpack GUI layout
Browse files Browse the repository at this point in the history
  • Loading branch information
EntityPlantt committed Nov 22, 2022
1 parent 1743362 commit 781f1a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ <h1>Federal Space</h1>
<div class="gui gui-button" onclick="window.close()">Exit</div>
</div>
<div class="gui" gui-name="backpack" gui-title="Backpack">
<ul></ul>
<div class="gui gui-button" onclick="sellBackpack()">Sell</div>
<div class="gui gui-button" onclick="sellBackpack()">Sell all gems</div>
<p>Your backpack can store up to <span class="bp-max-size"></span> items.</p>
<div class="gui gui-button" onclick="upgradeBackpack()">Upgrade ($<span class="bp-up-cost"></span>)</div>
<ul id="backpack-gem-list"></ul>
</div>
<div class="gui" gui-name="planet" gui-title="Unnamed">
<p class="planet-status"></p>
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Math.toRadians = deg => deg / 180 * Math.PI;
var GUI = {
"backpack": {
open(elm) {
GUI["backpack"].list = elm.querySelector("ul");
GUI["backpack"].list = elm.querySelector("#backpack-gem-list");
elm.querySelector(".bp-max-size").innerText = data.backpack.maxSize.toLocaleString("en-US");
elm.querySelector(".bp-up-cost").innerText = (data.backpack.maxSize * 20000).toLocaleString("en-US");
for (var gem of Object.keys(data.backpack.items)) {
Expand Down

0 comments on commit 781f1a2

Please sign in to comment.