Difference between revisions of "AeroGUI"

Line 3: Line 3:
 
{{#set:Description=Easy-to-use system to create basic interfaces.}}
 
{{#set:Description=Easy-to-use system to create basic interfaces.}}
  
= Still under development. Coming soon. =
+
 
 +
=Still under development. Coming soon. ==
 +
  
 
AeroGUI is a Love2D GUI library developed by [[User:Aeromcfly]].
 
AeroGUI is a Love2D GUI library developed by [[User:Aeromcfly]].

Revision as of 05:22, 25 March 2012



Still under development. Coming soon.

AeroGUI is a Love2D GUI library developed by User:Aeromcfly.


Enumerators

Under table GuiEnum

    GuiEnum
    • AlignX
      • Left
      • Right
      • Center
    • AlignY
      • Top
      • Bottom
      • Center

Example

Object.AlignX = GuiEnum.AlignX.Left
Object.AlignY = GuiEnum.AlignY.Center

-- Can also be written by the values of the enums directly:

Object.AlignX = "left"
Object.AlignY = "center"


Functions (love.gui)

love.gui.draw()

Updates and draws GUI objects. Essential for GUI system to work.
Returns nil

Example

function love.draw()
   -- All code here
   love.gui.draw()
end

love.gui.create(string Class [, GuiObject Screen])

Creates a new GuiObject
Class: The object's class (e.i. "Screen")
Screen: An existing Screen object
Returns GuiObject

Example

local Obj = love.gui.create("Frame")

love.gui.get(name)

Returns GuiObject with named 'name' if it exists

Example

local Obj = love.gui.get("MyObject")
if (Obj) then
-- ...
end

love.gui.clear()

Deletes all GuiObjects
Returns nil

Example

love.gui.clear()


Objects

Locked properties are read-only. Trying to set a new value to them will raise an error.

Screen

Screen objects act as rendering places for GUI objects. Screens are not actually seen. Any object whose 'Screen' property is set to a Screen object will scale itself based on the Screen's position and size.

Property Locked Type Description Default
Class TRUE string Class name Class name
Name FALSE string Object name (class)_(index)
Visible FALSE boolean Whether or not the object is drawn on screen true
Position FALSE UDim2 Position of the object drawn UDim2.new()
Size FALSE UDim2 Size of the object drawn UDim2.new(1,0,1,0)
AbsolutePosition TRUE Vector2 Actual position of object drawn Vector2.new()
AbsoluteSize TRUE Vector2 Actual size of object drawn Vector2.new()
AlignX FALSE GuiEnum AlignX Horizontal alignment of object GuiEnum.AlignX.Left
AlignY FALSE GuiEnum AlignY Vertical alignment of object GuiEnum.AlignY.Top
Screen FALSE GuiObject Screen The Screen this object renders to (Optional for Screen objects) screen (argument)
ZIndex FALSE float Draw layer of object (draw operations simply sorted by this number) 0
ZIndexLast TRUE float Used to check for changes in ZIndex 0