|
|
@@ -9,67 +9,35 @@ define([ |
|
|
|
globals, |
|
|
|
tosAcceptanceValid |
|
|
|
) { |
|
|
|
const startupUis = [ |
|
|
|
'inventory', |
|
|
|
'equipment', |
|
|
|
'hud', |
|
|
|
'target', |
|
|
|
'menu', |
|
|
|
'spells', |
|
|
|
'messages', |
|
|
|
'online', |
|
|
|
'mainMenu', |
|
|
|
'context', |
|
|
|
'party', |
|
|
|
'help', |
|
|
|
'dialogue', |
|
|
|
'buffs', |
|
|
|
'tooltips', |
|
|
|
'tooltipInfo', |
|
|
|
'tooltipItem', |
|
|
|
'announcements', |
|
|
|
'quests', |
|
|
|
'events', |
|
|
|
'progressBar', |
|
|
|
'stash', |
|
|
|
'talk', |
|
|
|
'trade', |
|
|
|
'overlay', |
|
|
|
'death', |
|
|
|
'leaderboard', |
|
|
|
'reputation', |
|
|
|
'mail', |
|
|
|
'wardrobe', |
|
|
|
'passives', |
|
|
|
'workbench', |
|
|
|
'middleHud', |
|
|
|
'options' |
|
|
|
]; |
|
|
|
|
|
|
|
return { |
|
|
|
uis: [], |
|
|
|
root: '', |
|
|
|
|
|
|
|
init: function (root, uiList = []) { |
|
|
|
init: function (root) { |
|
|
|
if (root) |
|
|
|
this.root = root + '/'; |
|
|
|
|
|
|
|
startupUis.push(...uiList); |
|
|
|
|
|
|
|
events.on('onEnterGame', this.onEnterGame.bind(this)); |
|
|
|
events.on('onUiKeyDown', this.onUiKeyDown.bind(this)); |
|
|
|
events.on('onResize', this.onResize.bind(this)); |
|
|
|
|
|
|
|
globals.clientConfig.uiLoginList.forEach(u => { |
|
|
|
if (u.path) |
|
|
|
this.buildModUi(u); |
|
|
|
else |
|
|
|
this.build(u); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
onEnterGame: function () { |
|
|
|
events.clearQueue(); |
|
|
|
|
|
|
|
startupUis.forEach(function (u) { |
|
|
|
globals.clientConfig.uiList.forEach(u => { |
|
|
|
if (u.path) |
|
|
|
this.buildModUi(u); |
|
|
|
else |
|
|
|
this.build(u); |
|
|
|
}, this); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
buildModUi: function (config) { |
|
|
|