mirror of
https://git.crafterpika.cc/crafterpika/SplatTool-public.git
synced 2026-08-17 18:52:16 +02:00
allways set currently selected weapon as default in ui
This commit is contained in:
parent
0c56eb8b89
commit
2d900b0cae
2 changed files with 13 additions and 0 deletions
|
|
@ -82,6 +82,8 @@ function populateWeaponSets() {
|
|||
opt.textContent = name;
|
||||
select.appendChild(opt);
|
||||
}
|
||||
|
||||
sendToCSharp("EquippedWep");
|
||||
}
|
||||
|
||||
window.external.receiveMessage(message => {
|
||||
|
|
@ -97,6 +99,13 @@ window.external.receiveMessage(message => {
|
|||
try {
|
||||
const data = JSON.parse(message);
|
||||
//console.log("Parsed Data:", data);
|
||||
|
||||
if (data.EquippedWepId !== undefined) {
|
||||
const select = document.getElementById("weapon-sets");
|
||||
select.value = data.EquippedWepId;
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.getElementById("pid-display");
|
||||
|
||||
if (data.Players) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue