set Image Source

Discussion in 'Support' started by Helliot1, Oct 13, 2018.

  1. Helliot1

    Helliot1 Owner of Empire Online

    Joined:
    Jul 26, 2017
    Messages:
    221
    Likes Received:
    27
    Best Answers:
    1
    Hello,

    I have a spells bar in my Otclient, and I need make some ajusts.

    [​IMG]

    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"

    [​IMG]

    But I tried different functions and I could not, like this one:

    gameinterface.lua
    Code (Lua):
    1.  
    2. function hotkeys()
    3.   if modules.game_hotkeys:keyCombo('F1') == ('inferno') then
    4.   spellsF1 = gameRootPanel:getChildById('spellsF1')
    5.   spellsF1:setImageSource('/images/inferno')
    6. end
    7.  
    That's the code that's on my image button above

    gameinterface.otui
    Code (CSS):
    1.   Spells
    2.     id: spellsF1
    3.     size: 34 34
    4.     !text: tr('F1')
    5.     anchors.top: gameModPanel.top
    6.     anchors.left: gameModPanel.left
    7.     @onClick: modules.game_hotkeys.doKeyCombo('F1')
     
    Last edited: Oct 13, 2018
  2. Helliot1

    Helliot1 Owner of Empire Online

    Joined:
    Jul 26, 2017
    Messages:
    221
    Likes Received:
    27
    Best Answers:
    1
  3. esnio12

    esnio12 Member

    Joined:
    Oct 2, 2010
    Messages:
    32
    Likes Received:
    10
    Best Answers:
    0
    can you share this mod??
     
  4. Helliot1

    Helliot1 Owner of Empire Online

    Joined:
    Jul 26, 2017
    Messages:
    221
    Likes Received:
    27
    Best Answers:
    1
    I need help to complete this please!!
     
  5. Helliot1

    Helliot1 Owner of Empire Online

    Joined:
    Jul 26, 2017
    Messages:
    221
    Likes Received:
    27
    Best Answers:
    1

Share This Page

Loading...