From 203291c5549332114f1b42b08c9a6fd2eaf32ad7 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Sat, 2 Apr 2022 12:29:42 +0200 Subject: [PATCH] Updated Input (markdown) --- Input.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Input.md b/Input.md index 6d3f665..bd3873a 100644 --- a/Input.md +++ b/Input.md @@ -1 +1,20 @@ -WIP \ No newline at end of file +Inputs are a objects, where the user can make inputs +Here is a example of how to create a standard input: + +````lua +local mainFrame = CreateFrame("myFirstFrame"):show() +local aInput = mainFrame:addInput("myFirstInput"):show() +```` + +This will create a default input with the size 5 width and 1 height on position 1 1 (relative to its parent frame), the default background is colors.lightBlue, the default text color is colors.black and the default zIndex is 5. + +Here are all possible functions available for inputs. Remember input inherit from [object](https://github.com/NoryiE/NyoUI/wiki/Object): + +## setInputType +changes the input type +````lua +local mainFrame = CreateFrame("myFirstFrame"):show() +local aButton = mainFrame:addButton("myFirstButton"):setInputType("password"):show() +```` +**args:** "text", "password", "number" are the possible input types - default is text
+**returns:** the object