From 4e8b3b4c33660fda70fc22383dda89cb0c502ab9 Mon Sep 17 00:00:00 2001
From: Robert Jelic <36573031+NoryiE@users.noreply.github.com>
Date: Sat, 2 Apr 2022 15:03:45 +0200
Subject: [PATCH] Updated Radio (markdown)
---
Radio.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 48 insertions(+), 1 deletion(-)
diff --git a/Radio.md b/Radio.md
index 6d3f665..bd2837b 100644
--- a/Radio.md
+++ b/Radio.md
@@ -1 +1,48 @@
-WIP
\ No newline at end of file
+Radios are objects, where the user can choose between different items.
+Here is a example of how to create a standard radio:
+
+````lua
+local mainFrame = CreateFrame("myFirstFrame"):show()
+local aRadio = mainFrame:addRadio("myFirstRadio"):show()
+````
+
+This will create a default radio 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 radios. Remember radio inherit from [object](https://github.com/NoryiE/NyoUI/wiki/Object):
+
+## addItem
+Adds a item to the radio
+
+````lua
+local mainFrame = NyoUI.createFrame("myFirstFrame"):show()
+local aRadio = mainFrame:addRadio("myFirstRadio"):show()
+aRadio:addItem("1. Entry")
+aRadio:addItem("2. Entry",5,1,colors.yellow)
+aRadio:addItem("3. Entry",5,4,colors.yellow,colors.green)
+````
+**args:** text, x, y bgcolor, fgcolor, ..., text is the displayed text, x and y are the position, where you want the item to be created, bgcolor and fgcolors the colors of background/text and args (...) is something dynamic, you wont see them but if you require some more information per item you can use that.
+**returns:** the object
+
+## removeItem
+Removes a item to the radio
+
+````lua
+local mainFrame = NyoUI.createFrame("myFirstFrame"):show()
+local aRadio = mainFrame:addRadio("myFirstRadio"):show()
+aRadio:addItem("1. Entry")
+aRadio:addItem("2. Entry",colors.yellow)
+aRadio:addItem("3. Entry",colors.yellow,colors.green)
+aRadio:removeItem(2)
+````
+**args:** item table (you can get with :getValue()) OR item index
+**returns:** the object
+
+## setSymbol
+changes the selected symbol
+````lua
+local mainFrame = CreateFrame("myFirstFrame"):show()
+local aInput = mainFrame:addInput("myFirstInput"):setInputType("password"):show()
+````
+**args:** char
+**returns:** the object
+