Vivelo
New Member
- Joined
- Aug 30, 2018
- Messages
- 34
- Reaction score
- 3
Hello everybody!
I have a question, maybe do you know, how i can display "outfit window" in my "inventory window"?
(I just want the outfit to be displayed - not that it can be edited/change)
I tried editing inventory.lua form outfit.lua (scritps) and OTClient doesnt display anything im add.
In my inventory.otui i add a "Creature Box" with id: inventoryCreatureBox and we see it in the picture, but "outfit sprite" still don't appear.
In outfit.lua is a script responsible for display (i think):
Im trying paste this code in inventory.lua but still not happen:
I think I need to add a line of code somewhere (maybe game_interface? or i must creat a new module? - maybe you know where and what? (I tried to copy the whole outfit.lua script instead of inventory.lua and you guessed it, nothing shows up and should change anything, the same if i convert the code or add a new function)
Sorry for my bad english
And i hope you will be able to help me
I have a question, maybe do you know, how i can display "outfit window" in my "inventory window"?
(I just want the outfit to be displayed - not that it can be edited/change)
I tried editing inventory.lua form outfit.lua (scritps) and OTClient doesnt display anything im add.
In my inventory.otui i add a "Creature Box" with id: inventoryCreatureBox and we see it in the picture, but "outfit sprite" still don't appear.
In outfit.lua is a script responsible for display (i think):
Lua:
function create(creatureOutfit, outfitList, creatureMount, mountList)
if outfitWindow and not outfitWindow:isHidden() then
return
end
outfitCreature = creatureOutfit
mountCreature = creatureMount
outfits = outfitList
mounts = mountList
destroy()
outfitWindow = g_ui.displayUI('outfitwindow')
local colorBoxPanel = outfitWindow:getChildById('colorBoxPanel')
local outfitCreatureBox = outfitWindow:getChildById('outfitCreatureBox')
if outfitCreature then
outfit = outfitCreature:getOutfit()
outfitCreatureBox:setCreature(outfitCreature)
else
outfitCreatureBox:hide()
outfitWindow:getChildById('outfitName'):hide()
outfitWindow:getChildById('outfitNextButton'):hide()
outfitWindow:getChildById('outfitPrevButton'):hide()
end
local mountCreatureBox = outfitWindow:getChildById('mountCreatureBox')
if mountCreature then
mount = mountCreature:getOutfit()
mountCreatureBox:setCreature(mountCreature)
else
mountCreatureBox:hide()
outfitWindow:getChildById('mountName'):hide()
outfitWindow:getChildById('mountNextButton'):hide()
outfitWindow:getChildById('mountPrevButton'):hide()
end
Im trying paste this code in inventory.lua but still not happen:
Lua:
inventory = nil
inventoryPanel = nil
inventoryButton = nil
purseButton = nil
outfitWindow = nil
outfit = nil
outfits = nil
outfitCreature = nil
function createWindow(creatureOutfit, outfitList, inventoryCreatureBox)
if inventory and not inventory:isHidden() then
return
end
local inventoryCreatureBox = inventory:getChildById('inventoryCreatureBox')
outfitCreature = creatureOutfit
outfits = outfitList
destroy()
inventory = g_ui.loadUI('inventory', modules.game_inventory.getRightPanel())
inventory = g_ui.displayUI('inventory')
inventoryCreatureBox:setVisible(true)
if outfitCreature then
outfit = outfitCreature:getOutfit()
inventoryCreatureBox:setCreature(outfitCreature)
else
inventoryCreatureBox:hide()
end
end
I think I need to add a line of code somewhere (maybe game_interface? or i must creat a new module? - maybe you know where and what? (I tried to copy the whole outfit.lua script instead of inventory.lua and you guessed it, nothing shows up and should change anything, the same if i convert the code or add a new function)
Sorry for my bad english
And i hope you will be able to help me
Last edited: