- Documentation
- Client functions
- guiCreateTabPanel
Function
guiCreateTabPanel
Creates a tab panel. Add tabs with guiCreateTab.
Syntax
gui-tabpanel guiCreateTabPanel(float x, float y, float width, float height, bool relative [, element parent = nil])Arguments
xfloat- X position.
yfloat- Y position.
widthfloat- Width.
heightfloat- Height.
relativebool- Relative values.Optional in MTA:SA: bool relative = false
parentelement, optional = nil- Parent.
Differences from MTA:SA
- Arguments in a different colour differ from MTA:SA.
In MTA:SA
guiCreateTabPanel(float x, float y, float width, float height, bool relative = false, gui-element parent = nil)Returns
The panel.
Example
local win = guiCreateWindow(100, 100, 400, 300, "Panel", false)
local tabs = guiCreateTabPanel(10, 35, 380, 255, false, win)
local tabCars = guiCreateTab("Pojazdy", tabs)
local tabWeapons = guiCreateTab("Bronie", tabs)
guiCreateButton(10, 10, 120, 30, "Infernus", false, tabCars)
guiCreateButton(10, 10, 120, 30, "M4", false, tabWeapons)