Repository navigation
Expand file tree
/
Copy pathNativeUI.lua
More file actions
299 lines (273 loc) · 7.88 KB
/
Copy pathNativeUI.lua
File metadata and controls
299 lines (273 loc) · 7.88 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
print("Github download : https://github.com/iTexZoz/NativeUILua-Reloaded/releases")
print("[Feature Suggestions] and [Frequently asked question] : https://github.com/iTexZoz/NativeUILua-Reloaded/issues/9")
print("NativeUILua-Reloaded wiki : https://github.com/iTexZoz/NativeUILua-Reloaded/wiki")
---@type table
NativeUI = {}
---CreatePool
---@return table
---@public
function NativeUI.CreatePool()
return MenuPool.New()
end
---CreateMenu
---@param Title string
---@param Subtitle string
---@param X number
---@param Y number
---@param TxtDictionary string
---@param TxtName string
---@param Heading number
---@param R number
---@param G number
---@param B number
---@param A number
---@return table
---@public
function NativeUI.CreateMenu(Title, Subtitle, X, Y, TxtDictionary, TxtName, Heading, R, G, B, A)
return UIMenu.New(Title, Subtitle, X, Y, TxtDictionary, TxtName, Heading, R, G, B, A)
end
---CreateItem
---@param Text string
---@param Description string
---@return table
---@public
function NativeUI.CreateItem(Text, Description)
return UIMenuItem.New(Text, Description)
end
---CreateColouredItem
---@param Text string
---@param Description string
---@param MainColour table
---@param HighlightColour table
---@return table
---@public
function NativeUI.CreateColouredItem(Text, Description, MainColour, HighlightColour)
return UIMenuColouredItem.New(Text, Description, MainColour, HighlightColour)
end
---CreateCheckboxItem
---@param Text string
---@param Check boolean
---@param Description string
---@return table
---@public
function NativeUI.CreateCheckboxItem(Text, Check, Description, CheckboxStyle)
return UIMenuCheckboxItem.New(Text, Check, Description, CheckboxStyle)
end
---CreateListItem
---@param Text string
---@param Items number
---@param Index table
---@param Description string
---@return table
---@public
function NativeUI.CreateListItem(Text, Items, Index, Description)
return UIMenuListItem.New(Text, Items, Index, Description)
end
---CreateSliderItem
---@param Text string
---@param Items number
---@param Index table
---@param Description string
---@param Divider boolean
---@param SliderColors table
---@param BackgroundSliderColors table
---@return table
---@public
function NativeUI.CreateSliderItem(Text, Items, Index, Description, Divider, SliderColors, BackgroundSliderColors)
return UIMenuSliderItem.New(Text, Items, Index, Description, Divider, SliderColors, BackgroundSliderColors)
end
---CreateSliderHeritageItem
---@param Text string
---@param Items number
---@param Index table
---@param Description string
---@param SliderColors table
---@param BackgroundSliderColors table
---@return table
---@public
function NativeUI.CreateSliderHeritageItem(Text, Items, Index, Description, SliderColors, BackgroundSliderColors)
return UIMenuSliderHeritageItem.New(Text, Items, Index, Description, SliderColors, BackgroundSliderColors)
end
---CreateSliderProgressItem
---@param Text string
---@param Items number
---@param Index number
---@param Description string
---@param SliderColors table
---@param BackgroundSliderColors table
---@return table
---@public
function NativeUI.CreateSliderProgressItem(Text, Items, Index, Description, SliderColors, BackgroundSliderColors)
return UIMenuSliderProgressItem.New(Text, Items, Index, Description, SliderColors, BackgroundSliderColors)
end
---CreateProgressItem
---@param Text string
---@param Items number
---@param Index table
---@param Description number
---@param Counter boolean
---@return table
---@public
function NativeUI.CreateProgressItem(Text, Items, Index, Description, Counter)
return UIMenuProgressItem.New(Text, Items, Index, Description, Counter)
end
---CreateHeritageWindow
---@param Mum number
---@param Dad number
---@return table
---@public
function NativeUI.CreateHeritageWindow(Mum, Dad)
return UIMenuHeritageWindow.New(Mum, Dad)
end
---CreateGridPanel
---@param TopText string
---@param LeftText string
---@param RightText string
---@param BottomText string
---@return table
---@public
function NativeUI.CreateGridPanel(TopText, LeftText, RightText, BottomText)
return UIMenuGridPanel.New(TopText, LeftText, RightText, BottomText)
end
---CreateHorizontalGridPanel
---@param LeftText string
---@param RightText string
---@return table
---@public
function NativeUI.CreateHorizontalGridPanel(LeftText, RightText)
return UIMenuHorizontalOneLineGridPanel.New(LeftText, RightText)
end
---CreateVerticalGridPanel
---@param TopText string
---@param BottomText string
---@return table
---@public
function NativeUI.CreateVerticalGridPanel(TopText, BottomText)
return UIMenuVerticalOneLineGridPanel.New(TopText, BottomText)
end
---CreateColourPanel
---@param Title string
---@param Colours table
---@return table
---@public
function NativeUI.CreateColourPanel(Title, Colours)
return UIMenuColourPanel.New(Title, Colours)
end
---CreatePercentagePanel
---@param MinText string
---@param MaxText string
---@return table
---@public
function NativeUI.CreatePercentagePanel(MinText, MaxText)
return UIMenuPercentagePanel.New(MinText, MaxText)
end
---CreateStatisticsPanel
---@return table
---@public
function NativeUI.CreateStatisticsPanel()
return UIMenuStatisticsPanel.New()
end
---CreateSprite
---@param TxtDictionary string
---@param TxtName string
---@param X number
---@param Y number
---@param Width number
---@param Height number
---@param Heading number
---@param R number
---@param G number
---@param B number
---@param A number
---@return table
---@public
function NativeUI.CreateSprite(TxtDictionary, TxtName, X, Y, Width, Height, Heading, R, G, B, A)
return Sprite.New(TxtDictionary, TxtName, X, Y, Width, Height, Heading, R, G, B, A)
end
---CreateRectangle
---@param X number
---@param Y number
---@param Width number
---@param Height number
---@param R number
---@param G number
---@param B number
---@param A number
---@return table
---@public
function NativeUI.CreateRectangle(X, Y, Width, Height, R, G, B, A)
return UIResRectangle.New(X, Y, Width, Height, R, G, B, A)
end
---CreateText
---@param Text string
---@param X number
---@param Y number
---@param Scale number
---@param R number
---@param G number
---@param B number
---@param A number
---@param Font number
---@param Alignment number
---@param DropShadow number
---@param Outline number
---@param WordWrap number
---@return table
---@public
function NativeUI.CreateText(Text, X, Y, Scale, R, G, B, A, Font, Alignment, DropShadow, Outline, WordWrap)
return UIResText.New(Text, X, Y, Scale, R, G, B, A, Font, Alignment, DropShadow, Outline, WordWrap)
end
---CreateTimerBarProgress
---@param Text string
---@param TxtDictionary string
---@param TxtName string
---@param X number
---@param Y number
---@param Heading number
---@param R number
---@param G number
---@param B number
---@param A number
---@return table
---@public
function NativeUI.CreateTimerBarProgress(Text, TxtDictionary, TxtName, X, Y, Heading, R, G, B, A)
return UITimerBarProgressItem.New(Text, TxtDictionary, TxtName, X, Y, Heading, R, G, B, A)
end
---CreateTimerBar
---@param Text string
---@param TxtDictionary string
---@param TxtName string
---@param X number
---@param Y number
---@param Heading number
---@param R number
---@param G number
---@param B number
---@param A number
---@return table
---@public
function NativeUI.CreateTimerBar(Text, TxtDictionary, TxtName, X, Y, Heading, R, G, B, A)
return UITimerBarItem.New(Text, TxtDictionary, TxtName, X, Y, Heading, R, G, B, A)
end
---TimerBarPool
---@return table
---@public
function NativeUI.TimerBarPool()
return UITimerBarPool.New()
end
---ProgressBarPool
function NativeUI.ProgressBarPool()
return UIProgressBarPool.New()
end
---CreateProgressBarItem
---@param Text string
---@param X number
---@param Y number
---@param Heading number
---@param R number
---@param G number
---@param B number
---@param A number
function NativeUI.CreateProgressBarItem(Text, X, Y, Heading, R, G, B, A)
return UIProgressBarItem.New(Text, X, Y, Heading, R, G, B, A)
end