• 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!

Button Help

whiteblXK

Active Member
Joined
Apr 20, 2011
Messages
315
Solutions
9
Reaction score
32
Location
Poland
Hi, I have a questions, As in any place to add a button that will open a window size of xxx?

Edit.
I do not know where to find all the functions for client.
 
I dont get what you want to do.
Inside src/luafunctions.cpp you can see every C++ functions.
A read there will give you a better base, however i don't know if it will help with this problem.
 
Code:
Button
  !text: tr('Test')
  size: 64 64
  anchors.left: parent.left
  anchors.bottom: parent.bottom
  @onClick:
 
UP, thx. How do I do that in any place was button and not in left and bottom?
 
This codes you use to stay glued to the edge
Code:
  anchors.left: parent.left
  anchors.bottom: parent.bottom
  anchors.right: parent.right
  anchors.top: parent.top

With these you make a distance from the edge :

Code:
margin-top: 5
margin-left: 5
margin-right: 5
margin-bottom: 5

with those you let near anything (Label, Buttons etc) beyond the edge

Code:
  anchors.left: prev.left
  anchors.bottom: prev.bottom
  anchors.right: prev.right
  anchors.top: prev.top

or you can also use the IDS Created by (Labels, Buttons etc)

Exemple :
Code:
Label
  id: Label1
  anchors.top: parent.top

Label
  id Label2
  anchors.top: Label1.bottom

with this example you make the label 2 appear below the label 1, and you can also add an even greater distance between the two

Exemple:

Code:
Label
  id: Label1
  anchors.top: parent.top

Label
  id Label2
  anchors.top: Label1.bottom
  margin-top: 5

these codes is not limited to this, there are also those that you use to automatically center (However I forgot) and others think that I may have forgotten.
 
Back
Top