mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-28 03:55:23 +09:00
35 lines
640 B
Lua
35 lines
640 B
Lua
--[[-- Core Module - Gui
|
|
@module Gui
|
|
@alias Gui
|
|
]]
|
|
|
|
local Gui = require 'expcore.gui.core'
|
|
|
|
--[[-- A vertical or horizontal line.
|
|
@element line
|
|
|
|
@tparam string direction the direction that children will be added
|
|
|
|
@usage-- Making a basic frame, contains a label with hello world
|
|
local basic_line =
|
|
Gui.new_concept('line')
|
|
|
|
]]
|
|
|
|
Gui.new_concept()
|
|
:save_as('line')
|
|
|
|
-- Properties
|
|
:new_property('direction')
|
|
|
|
-- Draw
|
|
:define_draw(function(properties,parent,element)
|
|
-- Draw a line
|
|
element = parent.add{
|
|
name = properties.name,
|
|
type = 'line',
|
|
direction = properties.direction
|
|
}
|
|
|
|
return element
|
|
end) |