Helliot1
Owner of Empire Online
- Joined
- Jul 26, 2017
- Messages
- 315
- Solutions
- 1
- Reaction score
- 58
Hello,
I have a spells bar in my Otclient, and I need make some ajusts.
This panel I created in game_interface.
I wanted to create a function in which, when in the game_hotckeys module, for example, in the F1 key, the name of the spell "inferno" was written. In the game_interface module, the panel would appear, the icon "/images/inferno"
But I tried different functions and I could not, like this one:
gameinterface.lua
That's the code that's on my image button above
gameinterface.otui
I have a spells bar in my Otclient, and I need make some ajusts.
This panel I created in game_interface.
I wanted to create a function in which, when in the game_hotckeys module, for example, in the F1 key, the name of the spell "inferno" was written. In the game_interface module, the panel would appear, the icon "/images/inferno"
But I tried different functions and I could not, like this one:
gameinterface.lua
Lua:
function hotkeys()
if modules.game_hotkeys:keyCombo('F1') == ('inferno') then
spellsF1 = gameRootPanel:getChildById('spellsF1')
spellsF1:setImageSource('/images/inferno')
end
That's the code that's on my image button above
gameinterface.otui
CSS:
Spells
id: spellsF1
size: 34 34
!text: tr('F1')
anchors.top: gameModPanel.top
anchors.left: gameModPanel.left
@onClick: modules.game_hotkeys.doKeyCombo('F1')
Last edited: