• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTClient OTclient UI helps

sabodden

Member
Joined
Sep 27, 2019
Messages
138
Reaction score
18
I have this UI for OTClient mod:

Code:
MiniWindow
  id: botWindow
  !text: tr('ElfBot OTC 0.1 -- 0 ms - 0 exp/hour')
  width: 625
  height: 160
  icon: /data/imgs/elfbot_icon.png
  @onClose: modules.game_minimap.onMiniWindowClose()

  MiniWindowContents  
    Button
      id: Healing
      anchors.top: parent.top
      anchors.left: parent.left
      anchors.right: parent.right
      margin-top: 2
      margin-left: 2
      margin-right: 2
      !text: tr('Healing')
      width: 100
      height: 25
      @onClick: print('test')
     
    Button
      id: Aimbot
      anchors.top: prev.top
      anchors.left: prev.right
      anchors.right: parent.right
      margin-left: 2
      margin-right: 2
      !text: tr('Aimbot')
      width: 100
      height: 25
      @onClick: print('test')






    Button
      id: Extras
      anchors.top: parent.top
      anchors.left: parent.left
      anchors.right: parent.right
      margin-top: 30
      margin-left: 2
      margin-right: 2
      !text: tr('Extras')
      width: 100
      height: 25
      @onClick: print('test')

I have a few question i would like to fix:
1) How to render the UI box in the middle of the screen?
2) Why width Button props is not working? and Healing button is taking all of the screen not showing up the Aimbot button?
3) How to remove the minimize button? Let only the close one
4) Why icon ( icon: /data/imgs/elfbot_icon.png) is not working if the image is there?

Please if u can aswer even one of this questions it would help me a lot!
 
Solution
Same thing, no errors, no open
Have you tried to use button to open a window?

Could i use LUA methods to detect window screen so set it in the middle?
Yes.
that top,left,right,bottom should be something i do on .lua?
i mean, like mainWindow:addAnchor(AnchorHorizontalCenter, 'parent', AnchorHorizontalCenter)
maybe on init, or when create the stuff?
if it is a good place to test, how to do there?
 
Back
Top