Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loadout infobar #2444

Merged
merged 33 commits into from
Feb 25, 2022
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
715b373
Add infobox.js
Feb 25, 2022
f56e910
Add infobox directory
Feb 25, 2022
cdd6aa0
Hook in infobox
Feb 25, 2022
13f5431
Add infoboxSize constant to constants.js
Feb 25, 2022
69f1eb4
Increase object sprite render distance
Feb 25, 2022
5ebec9e
Add outline to infobox shader
Feb 25, 2022
70f9cd3
Loadout manager hook in infobox renderer
Feb 25, 2022
0d5eca6
Infobox design work
Feb 25, 2022
cc934b3
Dead imports cleanup
Feb 25, 2022
3be22ae
More infobox work
Feb 25, 2022
402d6d6
Loadout manager emit selectedchange event
Feb 25, 2022
c50c269
Infobox styling
Feb 25, 2022
cd9a06a
Styling cleanup
Feb 25, 2022
8c58c34
Add alea stats rendering in infobox
Feb 25, 2022
b92026b
Infobox styling work
Feb 25, 2022
8ff23b5
Clean up uv leaks in hotbar
Feb 25, 2022
9b196db
Clean up uv leaks in infobox
Feb 25, 2022
a73a06d
Clamp object spriter render target to edge
Feb 25, 2022
d7981dc
Add loadout manager app default
Feb 25, 2022
f43370c
Clean up loadout set selected app to only trigger on selected app
Feb 25, 2022
3ca7940
Bugfix infobox name rendering
Feb 25, 2022
31a1e03
Add infobox hints
Feb 25, 2022
4a4217d
More infobox design work
Feb 25, 2022
3f821c5
Infobox name condition debug
Feb 25, 2022
988913c
Hotbar design work
Feb 25, 2022
c116987
Hotbar styling
Feb 25, 2022
3ff3012
Infobar imports cleanup
Feb 25, 2022
ed76c3b
Infobox bugfixing
Feb 25, 2022
3deda27
Infobox key name cleanup for LMB
Feb 25, 2022
3eb8516
Infobox styling
Feb 25, 2022
ad4339e
Bugfix spritesheet fetching
Feb 25, 2022
c336953
Small cleanup
Feb 25, 2022
0b4c455
More bigfixing
Feb 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Loadout manager emit selectedchange event
Avaer Kazmer committed Feb 25, 2022
commit 402d6d64e81a8677658b31eed7fe8ebde5f7cc18
11 changes: 9 additions & 2 deletions loadout-manager.js
Original file line number Diff line number Diff line change
@@ -38,9 +38,9 @@ class LoadoutManager extends EventTarget {
if (a === app) {
const hotbarRenderer = this.hotbarRenderers[i];
hotbarRenderer.setSpritesheet(null);
if (i === this.selectedIndex) {
/* if (i === this.selectedIndex) {
this.infoboxRenderer.setSpritesheet(null);
}
} */

this.apps[i] = null;

@@ -98,6 +98,13 @@ class LoadoutManager extends EventTarget {
}
this.selectedIndex = index;
}

this.dispatchEvent(new MessageEvent('selectedchange', {
data: {
index,
app: this.apps[index],
},
}));
}
getNextFreeIndex() {
this.ensureRenderers();