Updated Label (markdown)
22
Label.md
22
Label.md
@@ -1 +1,21 @@
|
|||||||
WIP
|
FYI: The label is currently a one liner, i will improve the label to be a multiliner. one of my TODOs<br><br>
|
||||||
|
Labels are objects, where you are able to put some text onto the screen.
|
||||||
|
Here is a example of how to create a default Label:
|
||||||
|
|
||||||
|
````lua
|
||||||
|
local mainFrame = CreateFrame("myFirstFrame"):show()
|
||||||
|
local aInput = mainFrame:addLabel("myFirstLabel"):show()
|
||||||
|
````
|
||||||
|
|
||||||
|
This will create a default label with a size 1 width and 1 height on position 1 1 (relative to its parent frame), the default background is the parent background, the default text color is also the parent text color and the default zIndex is 1.
|
||||||
|
|
||||||
|
Here are all possible functions available for labels. Remember label inherit from [object](https://github.com/NoryiE/NyoUI/wiki/Object):
|
||||||
|
|
||||||
|
## setText
|
||||||
|
sets the text of your label, it automatically adjusts the width to the text len. If you by any chance dont want the width to be able to change, use :setValue() instead
|
||||||
|
````lua
|
||||||
|
local mainFrame = CreateFrame("myFirstFrame"):show()
|
||||||
|
local aLabel = mainFrame:addLabel("myFirstLabel"):setText("I am a label!"):show()
|
||||||
|
````
|
||||||
|
**args:** some text<br>
|
||||||
|
**returns:** the object<br>
|
||||||
|
|||||||
Reference in New Issue
Block a user