started new compiling platform in packager.lua
This commit is contained in:
@@ -7,8 +7,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local button = mainFrame:addButton("myFirstButton")
|
||||
button:show()
|
||||
````
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## hide
|
||||
hides the object
|
||||
@@ -17,16 +17,16 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local button = mainFrame:addButton("myFirstButton"):setText("Close"):onClick(function() mainFrame:hide() end)
|
||||
button:show()
|
||||
````
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setPosition
|
||||
Changes the position relative to its parent frame
|
||||
````lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):setPosition(2,3)
|
||||
````
|
||||
**parameters:** number x, number y[, boolean relative], if relative is set to true it will add/remove instead of set x, y<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number x, number y[, boolean relative], if relative is set to true it will add/remove instead of set x, y<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
|
||||
|
||||
@@ -35,24 +35,24 @@ Changes the object background color
|
||||
````lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):setBackground(colors.lightGray)
|
||||
````
|
||||
**parameters:** number color<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number color<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setForeground
|
||||
Changes the object text color
|
||||
````lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):setForeground(colors.black)
|
||||
````
|
||||
**parameters:** number color<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number color<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setSize
|
||||
Changes the object size
|
||||
````lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):setSize(15,5)
|
||||
````
|
||||
**parameters:** number width, number length<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number width, number length<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setFocus
|
||||
sets the object to be the focused object.
|
||||
@@ -62,8 +62,8 @@ the foreground, you have to use :setFocus()
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setFocus():show()
|
||||
````
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setZIndex
|
||||
changes the z index (higher z index do have higher draw/event priority) 10 is more important than 5 or 1. You are also able to add multiple objects to the same z index, which means if you create a couple of buttons, you set their z index to 10, everything below 10 is less important, everything above 10 is more important. On the same z index: the last object which gets created is the most important one.
|
||||
@@ -71,8 +71,8 @@ changes the z index (higher z index do have higher draw/event priority) 10 is mo
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setZIndex(1):show()
|
||||
````
|
||||
**parameters:** number index<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setParent
|
||||
changes the frame parent of that object
|
||||
@@ -81,8 +81,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aRandomFrame = basalt.createFrame("aRandomFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):onClick(function() aRandomFrame:setParent(mainFrame) end):show()
|
||||
````
|
||||
**parameters:** frame object<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: frame object<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## isFocused
|
||||
returns if the object is currently the focused object of the parent frame
|
||||
@@ -92,8 +92,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):show()
|
||||
basalt.debug(aButton:isFocused()) -- shows true or false as a debug message
|
||||
````
|
||||
**parameters:** -<br>
|
||||
**returns:** boolean<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: boolean<br>
|
||||
|
||||
## getAnchorPosition
|
||||
converts the x,y coordinates into the anchor coordinates of that object
|
||||
@@ -103,8 +103,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):setSize(15,15):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setAnchor("right","bottom"):setSize(8,1):setPosition(1,1):show()
|
||||
basalt.debug(aButton:getAnchorPosition()) -- returns 7,14 (framesize - own size) instead of 1,1
|
||||
````
|
||||
**parameters:** number x, number y - or nothing (if nothing it uses the object's x, y)<br>
|
||||
**returns:** number x, number y (converted)<br>
|
||||
#### Parameters: number x, number y - or nothing (if nothing it uses the object's x, y)<br>
|
||||
#### Returns: number x, number y (converted)<br>
|
||||
|
||||
## setAnchor
|
||||
sets the anchor of that object
|
||||
@@ -113,8 +113,8 @@ sets the anchor of that object
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):setAnchor("right"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setAnchor("bottom","right"):setSize(8,1):setPosition(1,1):show()
|
||||
````
|
||||
**parameters:** string sides - ("left", "right", "top", "bottom") you can stack positions like so ..:setAnchor("right", "bottom")<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string sides - ("left", "right", "top", "bottom") you can stack positions like so ..:setAnchor("right", "bottom")<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getAbsolutePosition
|
||||
converts the relative coordinates into absolute coordinates
|
||||
@@ -123,8 +123,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):setPosition(3,3):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(8,1):setPosition(4,2):show()
|
||||
basalt.debug(aButton:getAbsolutePosition()) -- returns 7,5 (frame coords + own coords) instead of 4,2
|
||||
````
|
||||
**parameters:** number x, number y - or nothing (if nothing it uses the object's x, y)<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number x, number y - or nothing (if nothing it uses the object's x, y)<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setTextAlign
|
||||
sets the text align of the object (for example buttons)
|
||||
@@ -132,8 +132,8 @@ sets the text align of the object (for example buttons)
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(12,3):setTextAlign("right", "center"):setText("Dont't..."):show()
|
||||
````
|
||||
**parameters:** string horizontal, string vertical - ("left", "center", "right")<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string horizontal, string vertical - ("left", "center", "right")<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setValue
|
||||
sets the value of that object (input, label, checkbox, textfield, scrollbar,...)
|
||||
@@ -141,8 +141,8 @@ sets the value of that object (input, label, checkbox, textfield, scrollbar,...)
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show()
|
||||
````
|
||||
**parameters:** any value<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: any value<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getValue
|
||||
returns the currently saved value
|
||||
@@ -151,8 +151,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show()
|
||||
basalt.debug(aCheckbox:getValue()) -- returns true
|
||||
````
|
||||
**parameters:**-<br>
|
||||
**returns:** any value<br>
|
||||
#### Parameters:-<br>
|
||||
#### Returns: any value<br>
|
||||
|
||||
## getHeight/getWidth
|
||||
returns the height or width
|
||||
@@ -161,8 +161,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(5,8):show()
|
||||
basalt.debug(aButton:getHeight()) -- returns 8
|
||||
````
|
||||
**parameters:**-<br>
|
||||
**returns:** number height/width<br>
|
||||
#### Parameters:-<br>
|
||||
#### Returns: number height/width<br>
|
||||
|
||||
## isVisible
|
||||
returns if the object is currently visible
|
||||
@@ -171,8 +171,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(5,8):show()
|
||||
basalt.debug(aButton:isVisible()) -- returns true
|
||||
````
|
||||
**parameters:**-<br>
|
||||
**returns:** boolean<br>
|
||||
#### Parameters:-<br>
|
||||
#### Returns: boolean<br>
|
||||
|
||||
## getName
|
||||
returns the given name of that object
|
||||
@@ -180,8 +180,8 @@ returns the given name of that object
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
basalt.debug(mainFrame:getName()) -- returns myFirstFrame
|
||||
````
|
||||
**parameters:**-<br>
|
||||
**returns:** string name<br>
|
||||
#### Parameters:-<br>
|
||||
#### Returns: string name<br>
|
||||
|
||||
# Object Events
|
||||
These object events are available for all objects, if a object got some unique events, you can see them in their own category
|
||||
@@ -192,8 +192,8 @@ creates a mouse_click event
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(10,3):onClick(function(self,event,button,x,y) basalt.debug("Hellooww UwU") end):show()
|
||||
````
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## onClickUp
|
||||
creates a click_up event
|
||||
@@ -201,8 +201,8 @@ creates a click_up event
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(10,3):onClickUp(function(self,event,button,x,y) basalt.debug("Byeeeee UwU") end):show()
|
||||
````
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## onMouseDrag
|
||||
creates a mouse_drag event
|
||||
@@ -210,8 +210,8 @@ creates a mouse_drag event
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(10,3):onClickUp(function(self,event,button,x,y) basalt.debug("Byeeeee UwU") end):show()
|
||||
````
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## onChange
|
||||
creates a change event (fires as soon as the value gets changed)
|
||||
@@ -219,29 +219,29 @@ creates a change event (fires as soon as the value gets changed)
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):onChange(function(self) basalt.debug("i got changed into "..self:getValue()) end):show()
|
||||
````
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## onKey
|
||||
creates a key(board) - event can be key or char
|
||||
````lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):onKey(function(self,event,key) basalt.debug("you clicked "..key) end):show()
|
||||
````
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## onLoseFocus
|
||||
creates a lose focus event
|
||||
````lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):onLoseFocus(function(self) basalt.debug("please come back..") end):show()
|
||||
````
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## onGetFocus
|
||||
creates a get focus event
|
||||
````lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):onGetFocus(function(self) basalt.debug("thanks!") end):show()
|
||||
````
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
Reference in New Issue
Block a user