Helliot1
Owner of Empire Online
- Joined
- Jul 26, 2017
- Messages
- 315
- Solutions
- 1
- Reaction score
- 60
I have a doubt with a module that I'm creating. I created the base of module, but I can't put for the Icon of the module appear on the TopMenu only when I'm online on the game. Like Inventory module.
Somebody can help me ?
Here is my Scripts
Testmod.Lua
Testmod.Otui
Somebody can help me ?
Here is my Scripts
Testmod.Lua
LUA:
local testmodWindow = nil
local testmodButton = nil
function init()
testmodWindow = g_ui.displayUI('testmod')
testmodWindow:hide()
testmodButton = modules.client_topmenu.addRightButton('testmodButton', tr('Testmod'), 'testmod', toggle)
end
function terminate()
testmodWindow:destroy()
testmodButton:destroy()
end
function toggle()
if testmodWindow:isVisible() then
testmodWindow:hide()
testmodButton:setOn(false)
else
testmodWindow:show()
testmodButton:setOn(true)
testmodWindow:focus()
end
end
function hide()
testmodWindow:hide()
testmodButton:setOn(false)
end
Testmod.Otui
LUA:
MainWindow
id: testmodWindow
!text: tr('Testmod')
size: 480 340
Button
!text: tr('Ok')
width: 64
anchors.right: parent.right
anchors.bottom: parent.bottom
@onClick: modules.client_changelog.hide()