Updated Button (markdown)
@@ -3,7 +3,7 @@ Buttons are objects, which execute function by clicking on them
|
||||
Here is a example of how to create a standard button:
|
||||
|
||||
````lua
|
||||
local mainFrame = CreateFrame("myFirstFrame"):show()
|
||||
local mainFrame = NyoUI.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):show()
|
||||
````
|
||||
|
||||
@@ -15,7 +15,7 @@ Here are all possible functions available for buttons. Remember button inherit f
|
||||
## setText
|
||||
Sets the displayed button text
|
||||
````lua
|
||||
local mainFrame = CreateFrame("myFirstFrame"):show()
|
||||
local mainFrame = NyoUI.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setText("Click"):show() -- you could also use :setValue() instead of :setText() - no difference
|
||||
````
|
||||
**args:** text<br>
|
||||
@@ -24,7 +24,7 @@ local aButton = mainFrame:addButton("myFirstButton"):setText("Click"):show() --
|
||||
# Examples
|
||||
Add a onClick event:
|
||||
````lua
|
||||
local mainFrame = CreateFrame("myFirstFrame"):show()
|
||||
local mainFrame = NyoUI.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setText("Click"):onClick(function(self,event,button,x,y)
|
||||
if(event=="mouse_click")and(button==1)then
|
||||
NyoUI.debug("Left mousebutton got clicked!")
|
||||
|
||||
Reference in New Issue
Block a user