Implement the buttons spinbuttons for the inventory area
This commit is contained in:
parent
1c737b3dc4
commit
4544516c5c
8 changed files with 131 additions and 71 deletions
|
|
@ -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]
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue