-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFullscreenGUI-Alignment.lua
More file actions
32 lines (28 loc) · 1 KB
/
FullscreenGUI-Alignment.lua
File metadata and controls
32 lines (28 loc) · 1 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
local states = {
"Left" , "Left VStretch" , "Left VCenter" ,
"Right", "Right VStretch", "Right VCenter",
"Top" , "Top HStretch" , "Top HCenter" ,
"Bottom", "Bottom HStretch", "Bottom HCenter",
"VCenter HCenter",
"VCenter HStretch",
"VStretch HCenter",
"VStretch HStretch",
"Top Left", "Top Right",
"Bottom Left", "Bottom Right",
"Stretch", "[DEFAULT]", "Default", "Center"
}
local selectedState = states[math.random(1, #states)]
local enableFixedAspectRatio = true
local layoutGui = sm.regui.newBlank()
local widget = layoutGui:createWidget("EditBox", "EditBox", "EditBox")
widget:setPositionRealUnits({0, 0})
widget:setSizeRealUnits({1, 1})
widget:setProperties({
Caption = "Current Alignment: " .. selectedState,
FontName = "SM_Text",
TextAlign = "Center",
ReadOnly = true
})
local fullscreenGui = sm.regui.fullscreen.createFullscreenGuiFromInterface(layoutGui, enableFixedAspectRatio, selectedState)
fullscreenGui:update()
fullscreenGui:getGui():open()