-
Notifications
You must be signed in to change notification settings - Fork 3
/
webui.lua
49 lines (42 loc) · 1.36 KB
/
webui.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
local script = ScriptHook.CurrentScript()
-- Frame Creation
function script:CreateWebFrames()
local webFrame = UI.WebFrame()
webFrame:SetURL("https://mplus-welcome-nomad-group.web.app")
webFrame:SetPosition3D(Math:newVector(-941.65, -204.2, 15.7655172))
webFrame:SetSize3D(Math:newVector(11, 6.4, 1))
webFrame:SetRotation3D(Math:newVector(-90, 0, 0))
webFrame:SetSize2D(1280, 720)
webFrame:SetRenderDistance3D(75)
self.Frame_Welcome = webFrame
-- Changelog Screen
local webFrame2 = UI.WebFrame()
webFrame2:SetURL("https://mplus-welcome-nomad-group.web.app/changelog_1_1.html")
webFrame2:SetPosition3D(Math:newVector(-929.6, -219.99, 5.8))
webFrame2:SetSize3D(Math:newVector(1.8, 2.3, 1))
webFrame2:SetRotation3D(Math:newVector(-90, 0, -90))
webFrame2:SetSize2D(1600, 1795)
webFrame2:SetRenderDistance3D(25)
self.Frame_Changelog = webFrame2
end
-- Frame Destruction
function script:DestroyWebFrames()
if self.Frame_Welcome then
self.Frame_Welcome:Destroy()
self.Frame_Welcome = nil
end
if self.Frame_Changelog then
self.Frame_Changelog:Destroy()
self.Frame_Changelog = nil
end
end
-- Toggle method
function script:ToggleWebFrames()
if self.Frame_Welcome or self.Frame_Changelog then
self:DestroyWebFrames()
self:SetConfigOption("disableNomadWebFrames", true)
else
self:CreateWebFrames()
self:SetConfigOption("disableNomadWebFrames", false)
end
end