diff options
Diffstat (limited to 'resources/js/ui.js')
-rw-r--r-- | resources/js/ui.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/resources/js/ui.js b/resources/js/ui.js index 6884e14..e5afb53 100644 --- a/resources/js/ui.js +++ b/resources/js/ui.js @@ -556,7 +556,8 @@ const UI = { }, drawBattle () { - UI.elements.battle.style.backgroundImage = `url(/modules/tuxemon/mods/tuxemon/gfx/ui/combat/${Memory.state.currentArea.environment.battle_graphics.background})`; + UI.elements.battle.style.backgroundImage = `url(${Memory.state.currentArea.environment.battle_graphics.background})`; + UI.elements.battle.style.backgroundPosition = `${Memory.state.currentArea.environment.battle_graphics.background_position || 'top'}`; UI.showBattle(); UI.drawOpponentMonster(); @@ -1945,8 +1946,8 @@ const UI = { applyStoryPopupContent (popup, { speaker, text }) { const template = UI.createTemplate(Template.storyPopup); - template.querySelector('[data-template-slot="speaker.sprite"]').src = `/modules/tuxemon/mods/tuxemon/gfx/sprites/player/${speaker.template[0].sprite_name}.png`; - template.querySelector('[data-template-slot="speaker.name"]').textContent = slugToName(speaker.slug.replace('spyder_', '')); + template.querySelector('[data-template-slot="speaker.sprite"]').src = speaker.sprite; + template.querySelector('[data-template-slot="speaker.name"]').textContent = speaker.name; template.querySelector('[data-template-slot="text"]').innerHTML = nl2br(text); template.querySelector('[data-template-slot="next"]').addEventListener('click', UI.wrapCallback(() => { popup.dispatchEvent(new Event('next')); |