-
Notifications
You must be signed in to change notification settings - Fork 0
/
xxx.lua
76 lines (72 loc) · 1.92 KB
/
xxx.lua
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
local d = dofile("EZGUI.lua").init()
local data = {
counter = 1,
elements = {
"Bloo", "Blaa", "Blee",
},
position = {},
align_items_horizontal = "center",
align_items_vertical = "top",
align_self_horizontal = "center",
align_self_vertical = "top",
direction = "vertical",
button_margin = 0,
margin_top = 0,
margin_right = 0,
margin_bottom = 0,
padding_left = 0,
padding_top = 0,
padding_right = 0,
color = { r = 1, g = 1, b = 1, a = 1 },
padding = 0,
margin = 0,
width = 0,
user = {
name = "What"
},
height = 0,
ip = "123.123.123.133",
port = 99,
padding_bottom = 0,
condition_true = true,
condition_false = false,
set_alignment = function(alignment)
if ({left=1, hcenter=1, right=1})[alignment] then
self.align_self_horizontal = ({left="left", hcenter="center", right="right"})[alignment]
else
self.align_self_vertical = ({top="top", vcenter="center", bottom="bottom"})[alignment]
end
end,
condition_func = function()
return math.floor(GameGetFrameNum() / 60) % 2 == 0
end,
debug_layout = true,
debug_text = true,
debug_button = true,
set_align_items_horizontal = function(alignment)
self.align_items_horizontal = alignment
end,
set_align_items_vertical = function(alignment)
self.align_items_vertical = alignment
end,
set_direction = function(direction)
self.direction = direction
end,
toggle_debug_layout = function()
self.debug_layout = not self.debug_layout
end,
toggle_debug_text = function(direction)
self.debug_text = not self.debug_text
end,
toggle_debug_button = function()
self.debug_button = not self.debug_button
end,
start_server = function(direction)
GamePrint("Blob")
end
}
dofile_once("unit_tests.lua")
local parser = dofile_once("parsing_functions.lua")
local pretty = dofile_once("lib/pretty.lua")
local css = dofile_once("css.lua")
-- local a = d(0, 0, "../../gui2.xml", data)