From f08b586b5f50c3336b5b1d113143026924a587ee Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Sat, 2 Apr 2022 08:32:17 +0200 Subject: [PATCH] Updated Button (markdown) --- Button.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Button.md b/Button.md index 06ced05..d2b05f7 100644 --- a/Button.md +++ b/Button.md @@ -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
@@ -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!")