forked from ItsikNox/RageUI
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.lua
More file actions
131 lines (102 loc) · 3.64 KB
/
example.lua
File metadata and controls
131 lines (102 loc) · 3.64 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
--- @author Dylan MALANDAIN
--- @version 2.0.0
--- @since 2020
---
--- RageUI Is Advanced UI Libs in LUA for make beautiful interface like RockStar GAME.
---
---
--- Commercial Info.
--- Any use for commercial purposes is strictly prohibited and will be punished.
---
--- @see RageUI
---
print("^1 RageUI - testing file is started. ^0")
RMenu.Add('showcase', 'main', RageUI.CreateMenu("RageUI", "Undefined for using SetSubtitle"))
RMenu:Get('showcase', 'main'):SetSubtitle("RageUI Showcase")
RMenu:Get('showcase', 'main'):DisplayGlare(true);
RMenu:Get('showcase', 'main').Closed = function()
print('Closed Showcase Menu')
end;
RMenu:Get('showcase', 'main').onIndexChange = function(Index)
print(Index)
end
RMenu.Add('showcase', 'submenu', RageUI.CreateSubMenu(RMenu:Get('showcase', 'main'), "SubMenu", "RAGEUI"))
RMenu:Get('showcase', 'submenu').EnableMouse = true
RMenu:Get('showcase', 'submenu').Closed = function()
print('Closed Showcase Menu')
end;
RMenu:Get('showcase', 'submenu').onIndexChange = function(Index)
print(Index)
end
Keys.Register('E', 'E', 'Open RageUI Showcase menu default.', function()
RageUI.Visible(RMenu:Get('showcase', 'main'), not RageUI.Visible(RMenu:Get('showcase', 'main')))
end)
Citizen.CreateThread(function()
while (true) do
Citizen.Wait(1.0)
RageUI.IsVisible(RMenu:Get('showcase', 'main'), function()
for i = 1, 20 do
RageUI.Item.Button('Basic Items', nil, { }, true, {
onHovered = function()
end,
onSelected = function()
end,
onActive = function()
end,
})
end
end)
RageUI.IsVisible(RMenu:Get('showcase', 'submenu'), function()
for i = 1, 11 do
RageUI.Item.List("List Items", { "Yes", "No", "Maybe ?", "Money" }, 1, nil, {}, true, {
onListChange = function(Index, Items)
end,
onSelected = function(Index, Items)
end,
onHovered = function(Index, Items)
end
})
end
end, function()
RageUI.Panel.ColourPanel('Title', RageUI.PanelColour.HairCut, 5, {
onColourChange = function(Index)
end,
onSelected = function()
end
}, 1)
RageUI.Panel.Grid(0.5, 0.2, 'TopText', 'BottomText', 'LeftText', 'RightText', {
onPositionChange = function(X, Y)
print(X, Y)
end,
onSelected = function(X, Y)
print(X, Y)
end
}, 2)
RageUI.Panel.GridHorizontal(0.1, 'LeftText', 'RightText', {
onPositionChange = function(X, Y)
print(X, Y)
end,
onSelected = function(X, Y)
print(X, Y)
end
}, 3)
RageUI.Panel.GridVertical(0.1, 'TopText', 'BottomText', {
onPositionChange = function(X, Y)
print(X, Y)
end,
onSelected = function(X, Y)
print(X, Y)
end
}, 4)
RageUI.Panel.PercentagePanel(1.0, "HeaderText", "MinText", "MaxText", {
onPercentageChange = function(Percentage)
print(Percentage)
end,
onSelected = function(Percentage)
print(Percentage)
end
}, 5)
end)
end
end)