Updated Frame (markdown)
56
Frame.md
56
Frame.md
@@ -49,40 +49,6 @@ local mainFrame = CreateFrame("myFirstFrame"):setTitle("My first Frame!"):setTit
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# setPosition
|
|
||||||
Changes the position relative to its parent frame
|
|
||||||
````lua
|
|
||||||
local mainFrame = CreateFrame("myFirstFrame"):setPosition(2,3)
|
|
||||||
````
|
|
||||||
**args:** int x, int y<br>
|
|
||||||
**returns:** the frame object<br>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# setBackground
|
|
||||||
Changes the background color from the frame
|
|
||||||
````lua
|
|
||||||
local mainFrame = CreateFrame("myFirstFrame"):setBackground(colors.lightGray)
|
|
||||||
````
|
|
||||||
**args:** int color<br>
|
|
||||||
**returns:** the frame object<br>
|
|
||||||
|
|
||||||
# setForeground
|
|
||||||
Changes the text color from the frame
|
|
||||||
````lua
|
|
||||||
local mainFrame = CreateFrame("myFirstFrame"):setForeground(colors.black)
|
|
||||||
````
|
|
||||||
**args:** int color<br>
|
|
||||||
**returns:** the frame object<br>
|
|
||||||
|
|
||||||
# setSize
|
|
||||||
Changes the frame size
|
|
||||||
````lua
|
|
||||||
local mainFrame = CreateFrame("myFirstFrame"):setSize(15,5)
|
|
||||||
````
|
|
||||||
**args:** int width, int length<br>
|
|
||||||
**returns:** the frame object<br>
|
|
||||||
|
|
||||||
# showBar
|
# showBar
|
||||||
shows/hides the bar on top where you will see the title if its active
|
shows/hides the bar on top where you will see the title if its active
|
||||||
````lua
|
````lua
|
||||||
@@ -111,28 +77,6 @@ else
|
|||||||
end)
|
end)
|
||||||
````
|
````
|
||||||
|
|
||||||
# show
|
|
||||||
shows the frame on the screen
|
|
||||||
````lua
|
|
||||||
local mainFrame = CreateFrame("myFirstFrame"):show()
|
|
||||||
````
|
|
||||||
**args:** -<br>
|
|
||||||
**returns:** the frame object<br>
|
|
||||||
|
|
||||||
# hide
|
|
||||||
hides the frame
|
|
||||||
````lua
|
|
||||||
local mainFrame = CreateFrame("myFirstFrame"):hide()
|
|
||||||
````
|
|
||||||
**args:** -<br>
|
|
||||||
**returns:** the frame object<br>
|
|
||||||
**Example:**
|
|
||||||
````lua
|
|
||||||
local mainFrame = CreateFrame("myFirstFrame"):setSize(20,8):show()
|
|
||||||
mainFrame:addButton("myFirstButton"):setText("Exit"):onClick(function()
|
|
||||||
mainFrame:hide()
|
|
||||||
end)
|
|
||||||
````
|
|
||||||
|
|
||||||
# remove
|
# remove
|
||||||
removes the frame and its children objects completly
|
removes the frame and its children objects completly
|
||||||
|
|||||||
Reference in New Issue
Block a user