Implement the buttons spinbuttons for the inventory area

This commit is contained in:
Oliver-Akins 2024-02-07 19:39:24 -07:00
parent 1c737b3dc4
commit 4544516c5c
8 changed files with 131 additions and 71 deletions

View file

@ -1,13 +1,15 @@
export function reloadWindows(type = null) {
if (!type) {
for (const window of globalThis.ui.windows) {
window.render(true);
};
return;
};
for (const window of globalThis.ui.windows) {
if (window instanceof type) {
window.render(true);
};
/**
* @param {string} path
* @param {object} data
* @returns {unknown}
*/
export function getPath(path, data) {
if (!path.includes(`.`)) {
return data[path];
};
let [ key, nextPath ] = path.split(`.`, 2)
return getPath(
nextPath,
data[key]
);
};