readme EDIT ADDED DOCUMENTATION

This commit is contained in:
Josh
2018-05-29 08:51:24 -05:00
parent bb24b17146
commit b373204ea3
3 changed files with 39 additions and 0 deletions

View File

@@ -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

View File

@@ -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()

View File

@@ -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