diff --git a/Frame.md b/Frame.md
index bf08c7f..e37060f 100644
--- a/Frame.md
+++ b/Frame.md
@@ -2,16 +2,16 @@ Here are all possible functions you can use with frames:
-# CreateFrame
+# NyoUI.createFrame
this function creates a new frame
````lua
-local mainFrame = CreateFrame("myFirstFrame")
+local mainFrame = NyoUI.createFrame("myFirstFrame")
````
**args:** string identifaction id. if you create 2 frames with the same id, the second one will return nil
**returns:** a new frame object
# addFrame
-The same as CreateFrame, but it will have a parent frame
+The same as NyoUI.createFrame, but it will have a parent frame
````lua
frame:addFrame("myFirstFrame")
````
@@ -19,7 +19,7 @@ frame:addFrame("myFirstFrame")
**returns:** a new frame object
Example:
````lua
-local mainFrame = CreateFrame("myFirstFrame")
+local mainFrame = NyoUI.createFrame("myFirstFrame")
local aFrame = mainFrame:addFrame("myFirstSubFrame")
````
# setTitle
@@ -31,20 +31,20 @@ frame:setTitle("My first Frame!")
**returns:** the frame object
Example:
````lua
-local mainFrame = CreateFrame("myFirstFrame")
+local mainFrame = NyoUI.createFrame("myFirstFrame")
local aFrame = MainFrame:addFrame("myFirstSubFrame")
aFrame:setTitle("My first Frame!")
````
or:
````lua
-local mainFrame = CreateFrame("myFirstFrame")
+local mainFrame = NyoUI.createFrame("myFirstFrame")
local aFrame = mainFrame:addFrame("myFirstSubFrame"):setTitle("My first Frame!")
````
# setTitleAlign
Sets the title alignment
````lua
-local mainFrame = CreateFrame("myFirstFrame"):setTitle("My first Frame!"):setTitleAlign("right")
+local mainFrame = NyoUI.createFrame("myFirstFrame"):setTitle("My first Frame!"):setTitleAlign("right")
````
**args:** string text - possible values: "left", "center", "right"
**returns:** the frame object
@@ -54,7 +54,7 @@ local mainFrame = CreateFrame("myFirstFrame"):setTitle("My first Frame!"):setTit
# showBar
shows/hides the bar on top where you will see the title if its active
````lua
-local mainFrame = CreateFrame("myFirstFrame"):showBar()
+local mainFrame = NyoUI.createFrame("myFirstFrame"):showBar()
````
**args:** bool isVisible (no args = true)
**returns:** the frame object
@@ -62,14 +62,14 @@ local mainFrame = CreateFrame("myFirstFrame"):showBar()
# isModifierActive
returns true if user is currently holding a key
````lua
-local mainFrame = CreateFrame("myFirstFrame"):isModifierActive("shift")
+local mainFrame = NyoUI.createFrame("myFirstFrame"):isModifierActive("shift")
````
**args:** int or string - int can be any os.queueEvent("key") key, or instead of int you can use the following strings: "shift", "ctrl", "alt"
**returns:** true or false if the user is holding the key down
**Example:**
````lua
-local mainFrame = CreateFrame("myFirstFrame"):setSize(20,8):show()
+local mainFrame = NyoUI.createFrame("myFirstFrame"):setSize(20,8):show()
local aLabel = mainFrame:addLabel("myFirstLabel"):setText("shift inactive")
mainFrame:addButton("myFirstButton"):setText("Click"):onClick(function()
if(mainFrame:isModifierActive("shift")then
@@ -83,7 +83,7 @@ end)
# remove
removes the frame and its children objects completly
````lua
-local mainFrame = CreateFrame("myFirstFrame"):remove()
+local mainFrame = NyoUI.createFrame("myFirstFrame"):remove()
````
**args:** -
**returns:** -
@@ -91,7 +91,7 @@ local mainFrame = CreateFrame("myFirstFrame"):remove()
# getObject
returns a created object (arg = id)
````lua
-local mainFrame = CreateFrame("myFirstFrame")
+local mainFrame = NyoUI.createFrame("myFirstFrame")
mainFrame:addButton("myFirstButton")
local aButton = mainFrame:getObject("myFirstButton")
````
@@ -101,7 +101,7 @@ local aButton = mainFrame:getObject("myFirstButton")
# removeObject
removes the object with the id
````lua
-local mainFrame = CreateFrame("myFirstFrame")
+local mainFrame = NyoUI.createFrame("myFirstFrame")
mainFrame:addButton("myFirstButton")
mainFrame:removeObject("myFirstButton")
````
@@ -111,7 +111,7 @@ mainFrame:removeObject("myFirstButton")
# setFocusedElement
changes the currently focused element
````lua
-local mainFrame = CreateFrame("myFirstFrame")
+local mainFrame = NyoUI.createFrame("myFirstFrame")
local aButton = mainFrame:addButton("myFirstButton")
mainFrame:setFocusedElement(aButton)
````
@@ -120,7 +120,7 @@ mainFrame:setFocusedElement(aButton)
# removeFocusedElement
removes the focus of the currently focused element
````lua
-local mainFrame = CreateFrame("myFirstFrame")
+local mainFrame = NyoUI.createFrame("myFirstFrame")
local aButton = mainFrame:addButton("myFirstButton")
mainFrame:removeFocusedElement(aButton)
````
@@ -130,7 +130,7 @@ mainFrame:removeFocusedElement(aButton)
# getFocusedElement
gets the currently focused element
````lua
-local mainFrame = CreateFrame("myFirstFrame")
+local mainFrame = NyoUI.createFrame("myFirstFrame")
local aButton = mainFrame:addButton("myFirstButton")
local focusedObject = mainFrame:getFocusedElement()
````
@@ -141,7 +141,7 @@ local focusedObject = mainFrame:getFocusedElement()
sets if the frame should be moveable or not (to move the frame you need to drag it on the top bar)
````lua
-local mainFrame = CreateFrame("myFirstFrame"):setMoveable(true)
+local mainFrame = NyoUI.createFrame("myFirstFrame"):setMoveable(true)
````
**args:** bool
**returns:** object