readme EDIT ADDED DOCUMENTATION
This commit is contained in:
19
README.md
19
README.md
@@ -11,6 +11,7 @@ A library that adds simple GUI elements for you to utilize in your Love2D games.
|
||||
|
||||
Methods:
|
||||
```lua
|
||||
Constructor new()
|
||||
render()
|
||||
update(number deltatime) -- deltatime should be passed from love.update function
|
||||
```
|
||||
@@ -35,6 +36,8 @@ Methods:
|
||||
RGBColor getBackgroundColor()
|
||||
RGBColor getBorderColor()
|
||||
number getCornerRounding()
|
||||
number getBackgroundTransparency()
|
||||
number getBorderTransparency()
|
||||
Dimension getPosition()
|
||||
Dimension getSize()
|
||||
Vector2D getAbsolutePosition() -- returns the real position of the object, in pixels
|
||||
@@ -44,6 +47,8 @@ setBorderColor(RGBColor color)
|
||||
setCornerRounding(number rounding)
|
||||
setPosition(Dimension pos)
|
||||
setSize(Dimension size)
|
||||
setBackgroundTransparency(number alpha)
|
||||
setBorderTransparency(number alpha)
|
||||
```
|
||||
|
||||
### Frame class
|
||||
@@ -54,8 +59,22 @@ setSize(Dimension size)
|
||||
|
||||
*Inherits UIRect*
|
||||
|
||||
Methods:
|
||||
```lua
|
||||
string getFontFace()
|
||||
number getTextSize()
|
||||
setFontFace(string fontFile)
|
||||
setTextSize(number size)
|
||||
```
|
||||
|
||||
### Dimension datatype
|
||||
|
||||
|
||||
Methods:
|
||||
```lua
|
||||
|
||||
```
|
||||
|
||||
### Vector2D datatype
|
||||
|
||||
### RGBColor datatype
|
@@ -22,6 +22,14 @@ function TextBox:recalculateInternalFont()
|
||||
end
|
||||
end
|
||||
|
||||
function TextBox:getFontFace()
|
||||
return self.fontFace
|
||||
end
|
||||
|
||||
function TextBox:getTextSize()
|
||||
return self.textSize
|
||||
end
|
||||
|
||||
function TextBox:setFontFace(fontface)
|
||||
self.fontFace = fontface
|
||||
self:recalculateInternalFont()
|
||||
|
@@ -37,6 +37,18 @@ function UIRect:getCornerRounding()
|
||||
return self.cornerRounding
|
||||
end
|
||||
|
||||
function UIRect:getBorderTransparency()
|
||||
return self.borderTransparency
|
||||
end
|
||||
|
||||
function UIRect:getBackgroundTransparency()
|
||||
return self.backgroundTransparency
|
||||
end
|
||||
|
||||
function UIRect:setBackgroundTransparency(alpha)
|
||||
self.backgroundTransparency = alpha
|
||||
end
|
||||
|
||||
function UIRect:setCornerRounding(rounding)
|
||||
self.cornerRounding = rounding
|
||||
end
|
||||
|
Reference in New Issue
Block a user