Helliot1
Owner of Empire Online
- Joined
- Jul 26, 2017
- Messages
- 315
- Solutions
- 1
- Reaction score
- 58
Hello guys, I'm trying to create a function to set a text when I press right mouse in a button but I don't have any successful, somebody can help me?
I don't get any errors, and my function doesn't work
This is my function:
This is my button:
I don't get any errors, and my function doesn't work
This is my function:
Lua:
spellsF1 = nil
spellsF1 = gameRootPanel:getChildById('spellsF1')
function openSpells()
if spellsF1 and g_mouse.isPressed(MouseRightButton) then
spellsF1:setText('Pressed')
end
end
This is my button:
CSS:
Button
id: spellsF1
size: 34 34
!text: tr('F1')
anchors.top: gameModPanel.top
anchors.left: gameModPanel.left
Last edited: