Skip to main content

Grid System

The grid system allows easy creation of GUIs without playing around with pixel values. It supplies another constructor for all GUI components which accept the position and size in grind units. A grid unit is 30px and between to grid units there is 10px spacing.

Grid System Example

local gridExample = EGUIGrid.Window(10, 10, 8, 4, "ATM", true, false)

local balanceLabel = EGUIGrid.Label(1, 1, 3, 1, "Balance:", gridExample)
local balanceInput = EGUIGrid.Label(4, 1, 4, 1, "$ 456,123", gridExample)

local amountLabel = EGUIGrid.Label(1, 2, 3, 1, "Amount:", gridExample)
local amountInput = EGUIGrid.Input(4, 2, 4, 1, gridExample):SetPlaceholder("Amount")

local withdrawButton = EGUIGrid.Button(5, 3, 3, 1, "Withdraw", gridExample)

Window​

local window = EGUIGrid.Window(5, 5, 20, 20, "Window Test", true, true)
TypeNameDefaultDescription
numberposXX position in pixels
numberposYY position in pixels
numberwidthWidth in grid units
numberheightHeight in grid units
stringtitle
booleantitlebarEnabledtrue
booleancloseButtonEnabledtrue
tableparentnil

Button​

local button = EGUIGrid.Button(1, 1, 3, 1, "Button Test")
TypeNameDefaultDescription
numberposXX position in grid units
numberposYY position in grid units
numberwidthWidth in grid units
numberheightHeight in grid units
stringtext
tableparentnil

Input​

local input = EGUIGrid.Input(1, 1, 3, 1)
TypeNameDefaultDescription
numberposXX position in grid units
numberposYY position in grid units
numberwidthWidth in grid units
numberheightHeight in grid units
tableparentnil

Label​

local label = EGUIGrid.Label(1, 1, 3, 1, "Label Test")
TypeNameDefaultDescription
numberposXX position in grid units
numberposYY position in grid units
numberwidthWidth in grid units
numberheightHeight in grid units
stringtext
tableparentnil

Slider​

local slider = EGUIGrid.Slider(1, 1, 3, 1, 75, 1, 100)
TypeNameDefaultDescription
numberposXX position in grid units
numberposYY position in grid units
numberwidthWidth in grid units
numberheightHeight in grid units
numbervalue
numbermin
numbermax
tableparentnil

TextArea​

local textArea = EGUIGrid.TextArea(1, 1, 3, 3)
TypeNameDefaultDescription
numberposXX position in grid units
numberposYY position in grid units
numberwidthWidth in grid units
numberheightHeight in grid units
tableparentnil

Image​

local image = EGUIGrid.Image(1, 1, 3, 1, "some image")
TypeNameDefaultDescription
numberposXX position in grid units
numberposYY position in grid units
numberwidthWidth in grid units
numberheightHeight in grid units
stringimage
tableparentnil

Checkbox​

local checkbox = EGUIGrid.Checkbox(1, 1, 3, 1, "Checkbox Test")
TypeNameDefaultDescription
numberposXX position in grid units
numberposYY position in grid units
numberwidthWidth in grid units
numberheightHeight in grid units
stringtext
tableparentnil

TabPanel​

local tabPanel = EGUIGrid.TabPanel(1, 1, 3, 3)
TypeNameDefaultDescription
numberposXX position in grid units
numberposYY position in grid units
numberwidthWidth in grid units
numberheightHeight in grid units
tableparentnil

ProgressBar​

local progressBar = EGUIGrid.ProgressBar(1, 1, 3, 3)
TypeNameDefaultDescription
numberposXX position in grid units
numberposYY position in grid units
numberwidthWidth in grid units
numberheightHeight in grid units
tableparentnil