-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleUI.lua
More file actions
62 lines (38 loc) · 1.24 KB
/
SimpleUI.lua
File metadata and controls
62 lines (38 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
local BASE = (...)..'.'
print(BASE)
local i= BASE:find("SimpleUI.$")
print (i)
BASE=BASE:sub(1,i-1)
print(BASE)
--- !doctye module
___simple_ui_base_helpers = {}
--- @class __simple_ui_base_class : classic
___simple_ui_base_class = require(BASE .. "base_class.classic")
--- @alias ui.controls components
--- @module "components.components"
local controls = require(BASE .. "components.components")
--- @module "components.base_classes.__base_component_handler"
local base_handler = require(BASE .. "components.base_classes.__base_component_handler")
base_handler.controls = controls
---- My simple ui module.
---
--- @class SimpleUI_ : BaseComponentHandler
local ui = base_handler:extend()
ui:implement(require(BASE .. "components.interfaces.component_creator"))
ui.controls = controls
ui:implement( require(BASE .. "components.interfaces.groups"))
function ui:add_window(x, y, w, h)
local id = self:id()
local tmp = {}
local window = self.controls.wi(tmp)
window:set_size(w,h)
window:set_pos(x,y)
self:add_component(window,id)
self:increase_id()
self:redraw()
return id
end
-- ui.controls.cb.ui = ui
-- ui.controls.tb.ui = ui
--- @return SimpleUI_
return ui