mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Added some structor concepts
This commit is contained in:
25
expcore/gui/concepts/line.lua
Normal file
25
expcore/gui/concepts/line.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
--[[-- 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.clone_concept('line','basic_line')
|
||||
]]
|
||||
Gui.new_concept('line')
|
||||
:new_property('direction')
|
||||
:define_draw(function(properties,parent,element)
|
||||
element = parent.add{
|
||||
name = properties.name,
|
||||
type = 'line',
|
||||
direction = properties.direction
|
||||
}
|
||||
|
||||
return element
|
||||
end)
|
||||
Reference in New Issue
Block a user