-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.lua
More file actions
79 lines (69 loc) · 2.18 KB
/
test.lua
File metadata and controls
79 lines (69 loc) · 2.18 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
--[[
* Author: Asher Roland
* Created: 11/9/2024
* (c) Copyright by Fusion Pixel Studios
* License: MIT
]]
local fu = fu or app:GetFusion()
local ui = fu.UIManager
local disp = bmd.UIDispatcher(ui)
local Labels_CSS = [[
QLabel
{
color: rgb(255, 255, 255);
font-size: 30px;
font-weight: 300;
font-family: 'Arial';
}
QLabel:!enabled
{
color: rgb(150, 150, 150);
}
]]
local Buttons_CSS = [[
QPushButton
{
border: 1px solid transparent;
border-radius: 8px;
background-color: rgb(0,0,0);
color: white;
font-size: 20px;
font-weight: 300;
font-family: 'Arial';
}
QPushButton:hover
{
background-color: rgb(100, 100, 100);
color: yellow;
}
QPushButton:pressed
{
background-color: rgb(255,255,255);
color: black;
}
QPushButton:!enabled
{
background-color: rgb(50,50,50);
color: rgb(150,150,150);
}
]]
local window = disp:AddWindow({
ID = 'myWindow',
WindowTitle = 'My Window',
ui:VGroup{
ID = 'root',
FixedSize = { 600, 800 },
ui:Label{ ID = 'Label1', Text = 'This is a Label', WordWrap = true, Alignment = { AlignCenter = true }, Weight = 0, StyleSheet = Labels_CSS },
ui:Tree{ ID = 'Tree1', ColumnCount = 2, SortingEnabled = false, ItemsExpandable = false, ExpandsOnDoubleClick = false, HeaderHidden = false, RootIsDecorated = true, Icon = ui:Icon({File = '/PATH/TO/ICON.png'}), IconSize = { h, w }, Animated = true, AllColumnsShowFocus = false, WordWrap = true, TreePosition = 'center', SelectionMode = 'ExtendedSelection', UniformRowHeights = true, Indentation = false, AutoScroll = true, TabKeyNavigation = true, AlternatingRowColors = true, FrameStyle = 3, LineWidth = 5, FrameRect = true, FrameShadow = true, Alignment = { AlignCenter = true }, Weight = 1, StyleSheet = [[color: white; font-size: 20px; font-weight: 500; font-family: 'Arial';]] },
}
})
local winItms = window:GetItems()
function window.On.Button1.Clicked(ev)
end
function window.On.myWindow.Close(ev)
disp:ExitLoop()
end
window:RecalcLayout()
window:Show()
disp:RunLoop()
window:Hide()