Template:Scripting/Squirrel/Functions/Client GUITypes: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "=== GUIElement === There aren't actually any instances of GUIElement, but it is the base class for all other GUI element classes. This means that all properties and functio...")
 
No edit summary
 
Line 1: Line 1:
=== GUIElement ===
=== GUIElement ===
There aren't actually any instances of GUIElement, but it is the base class for all other GUI element classes. This means that all properties and functions it has also work on other GUI elements. GUI element flags are used in several places, the available flag constants are:
There aren't actually any instances of GUIElement, but it is the base class for all other GUI element classes. This means that all properties and functions it has also work on other GUI elements. GUI element flags are used in several places, the available flag constants are:


Line 64: Line 61:


* GUI_FLAG_WINDOW_RESIZABLE
* GUI_FLAG_WINDOW_RESIZABLE




Line 72: Line 68:


Makes the specified element a child of this element.
Makes the specified element a child of this element.




Line 80: Line 75:


Returns true if this element is the child of the specified element.
Returns true if this element is the child of the specified element.




Line 88: Line 82:


Detaches this element from its parent.
Detaches this element from its parent.




Line 96: Line 89:


Moves the siblign element right in front of this one behind it.
Moves the siblign element right in front of this one behind it.




Line 104: Line 96:


Moves the sibling element right behind this element to the front of it.
Moves the sibling element right behind this element to the front of it.




Line 112: Line 103:


Moves this element on top of all other sibling elements.
Moves this element on top of all other sibling elements.




Line 120: Line 110:


Moves this element to the bottom of all other sibling elements.
Moves this element to the bottom of all other sibling elements.




Line 126: Line 115:


''Type: VectorScreen''
''Type: VectorScreen''




Line 132: Line 120:


''Type: VectorScreen''
''Type: VectorScreen''




Line 138: Line 125:


''Type: Vector''
''Type: Vector''




Line 144: Line 130:


''Type: Vector''
''Type: Vector''




Line 150: Line 135:


''Type: Vector''
''Type: Vector''




Line 158: Line 142:


Sets the 3D transformation of this element.
Sets the 3D transformation of this element.




Line 164: Line 147:


''Type: Colour''
''Type: Colour''




Line 170: Line 152:


''Type: Colour''
''Type: Colour''




Line 176: Line 157:


''Type: int''
''Type: int''




Line 182: Line 162:


''Type: string''
''Type: string''




Line 190: Line 169:


Size on the screen of the text in this element.
Size on the screen of the text in this element.




Line 212: Line 190:


* GUI_ALIGN_CENTER
* GUI_ALIGN_CENTER




Line 218: Line 195:


''Type: string''
''Type: string''




Line 224: Line 200:


''Type: int''
''Type: int''




Line 246: Line 221:


* GUI_FFLAG_OUTLINE
* GUI_FFLAG_OUTLINE




Line 252: Line 226:


''Type: int''
''Type: int''




Line 258: Line 231:


''Type: int''
''Type: int''




Line 264: Line 236:


''Type: int''
''Type: int''




Line 270: Line 241:


''Type: int''
''Type: int''




Line 276: Line 246:


''Type: int''
''Type: int''




Line 282: Line 251:


''Parameter types: int. Return type: void.''
''Parameter types: int. Return type: void.''




Line 288: Line 256:


''Parameter types: int. Return type: void.''
''Parameter types: int. Return type: void.''
=== GUIButton ===
=== GUIButton ===
Constructor '''GUIButton()'''
Constructor '''GUIButton()'''




Line 302: Line 263:


''Parameter types: VectorScreen, VectorScreen, Colour''
''Parameter types: VectorScreen, VectorScreen, Colour''




Line 308: Line 268:


''Parameter types: VectorScreen, VectorScreen, Colour, string''
''Parameter types: VectorScreen, VectorScreen, Colour, string''




Line 314: Line 273:


''Parameter types: VectorScreen, VectorScreen, Colour, string, int''
''Parameter types: VectorScreen, VectorScreen, Colour, string, int''
=== GUICanvas ===
=== GUICanvas ===
Constructor '''GUICanvas()'''
Constructor '''GUICanvas()'''
=== GUICheckbox ===
=== GUICheckbox ===
Constructor '''GUICheckbox()'''
Constructor '''GUICheckbox()'''




Line 336: Line 282:


''Parameter types: VectorScreen, Colour''
''Parameter types: VectorScreen, Colour''




Line 342: Line 287:


''Parameter types: VectorScreen, Colour, int''
''Parameter types: VectorScreen, Colour, int''
=== GUIEditbox ===
=== GUIEditbox ===
Constructor '''GUIEditbox(position, size, colour)'''
Constructor '''GUIEditbox(position, size, colour)'''


''Parameter types: VectorScreen, VectorScreen, Colour''
''Parameter types: VectorScreen, VectorScreen, Colour''




Line 358: Line 296:


''Parameter types: VectorScreen, VectorScreen, Colour, string''
''Parameter types: VectorScreen, VectorScreen, Colour, string''




Line 364: Line 301:


''Parameter types: VectorScreen, VectorScreen, Colour, string, int''
''Parameter types: VectorScreen, VectorScreen, Colour, string, int''




Line 370: Line 306:


''Type: bool''
''Type: bool''




Line 376: Line 311:


''Type: string''
''Type: string''




Line 382: Line 316:


''Parameter types: int, int. Return type: void.''
''Parameter types: int, int. Return type: void.''




Line 388: Line 321:


''Type: int''
''Type: int''
=== GUILabel ===
=== GUILabel ===
Constructor '''GUILabel()'''
Constructor '''GUILabel()'''




Line 402: Line 328:


''Parameter types: VectorScreen, Colour''
''Parameter types: VectorScreen, Colour''




Line 408: Line 333:


''Parameter types: VectorScreen, Colour, string''
''Parameter types: VectorScreen, Colour, string''




Line 414: Line 338:


''Parameter types: VectorScreen, Colour, string, int''
''Parameter types: VectorScreen, Colour, string, int''
=== GUIListbox ===
=== GUIListbox ===
Constructor '''GUIListbox()'''
Constructor '''GUIListbox()'''




Line 428: Line 345:


''Parameter types: VectorScreen, VectorScreen''
''Parameter types: VectorScreen, VectorScreen''




Line 434: Line 350:


''Parameter types: VectorScreen, VectorScreen, Colour, Colour''
''Parameter types: VectorScreen, VectorScreen, Colour, Colour''




Line 440: Line 355:


''Parameter types: VectorScreen, VectorScreen, Colour, Colour, int''
''Parameter types: VectorScreen, VectorScreen, Colour, Colour, int''




Line 446: Line 360:


''Type: array''
''Type: array''




Line 452: Line 365:


''Parameter types: string. Return type: void.''
''Parameter types: string. Return type: void.''




Line 458: Line 370:


''Parameter types: string. Return type: void.''
''Parameter types: string. Return type: void.''




Line 466: Line 377:


Removes all items.
Removes all items.




Line 472: Line 382:


''Type: int''
''Type: int''




Line 478: Line 387:


''Type: int''
''Type: int''




Line 486: Line 394:


Background colour of selected items.
Background colour of selected items.
=== GUIMemobox ===
=== GUIMemobox ===
Constructor '''GUIMemobox()'''
Constructor '''GUIMemobox()'''




Line 500: Line 401:


''Parameter types: VectorScreen, VectorScreen, Colour''
''Parameter types: VectorScreen, VectorScreen, Colour''




Line 506: Line 406:


''Parameter types: VectorScreen, VectorScreen, Colour, int''
''Parameter types: VectorScreen, VectorScreen, Colour, int''




Line 512: Line 411:


''Parameter types: string. Return type: void.''
''Parameter types: string. Return type: void.''




Line 518: Line 416:


''Parameter types: string, Colour. Return type: void.''
''Parameter types: string, Colour. Return type: void.''




Line 524: Line 421:


''Return type: void.''
''Return type: void.''




Line 530: Line 426:


''Type: float''
''Type: float''




Line 536: Line 431:


''Type: int''
''Type: int''




Line 542: Line 436:


''Type: int''
''Type: int''




Line 548: Line 441:


''Type: int''
''Type: int''
=== GUIProgressBar ===
=== GUIProgressBar ===
Constructor '''GUIProgressBar()'''
Constructor '''GUIProgressBar()'''




Line 562: Line 448:


''Parameter types: VectorScreen, VectorScreen, Colour''
''Parameter types: VectorScreen, VectorScreen, Colour''




Line 568: Line 453:


''Parameter types: VectorScreen, VectorScreen, Colour, Colour''
''Parameter types: VectorScreen, VectorScreen, Colour, Colour''




Line 574: Line 458:


''Parameter types: VectorScreen, VectorScreen, Colour, Colour, int''
''Parameter types: VectorScreen, VectorScreen, Colour, Colour, int''




Line 580: Line 463:


''Parameter types: VectorScreen, VectorScreen, Colour, Colour, int, float''
''Parameter types: VectorScreen, VectorScreen, Colour, Colour, int, float''




Line 586: Line 468:


''Type: float''
''Type: float''




Line 592: Line 473:


''Type: float''
''Type: float''




Line 598: Line 478:


''Type: float''
''Type: float''




Line 604: Line 483:


''Type: int''
''Type: int''




Line 610: Line 488:


''Type: Colour''
''Type: Colour''




Line 616: Line 493:


''Type: Colour''
''Type: Colour''
=== GUIScrollbar ===
=== GUIScrollbar ===
Constructor '''GUIScrollbar()'''
Constructor '''GUIScrollbar()'''




Line 630: Line 500:


''Parameter types: VectorScreen, VectorScreen''
''Parameter types: VectorScreen, VectorScreen''




Line 636: Line 505:


''Parameter types: VectorScreen, VectorScreen, Colour''
''Parameter types: VectorScreen, VectorScreen, Colour''




Line 642: Line 510:


''Parameter types: VectorScreen, VectorScreen, Colour, int''
''Parameter types: VectorScreen, VectorScreen, Colour, int''




Line 648: Line 515:


''Parameter types: float, float, float, float. Return type: void.''
''Parameter types: float, float, float, float. Return type: void.''




Line 654: Line 520:


''Type: float''
''Type: float''




Line 660: Line 525:


''Type: float''
''Type: float''




Line 666: Line 530:


''Type: float''
''Type: float''




Line 672: Line 535:


''Type: float''
''Type: float''




Line 678: Line 540:


''Type: float''
''Type: float''
=== GUISprite ===
=== GUISprite ===
Constructor '''GUISprite()'''
Constructor '''GUISprite()'''




Line 692: Line 547:


''Parameter types: string, VectorScreen''
''Parameter types: string, VectorScreen''




Line 698: Line 552:


''Parameter types: string, VectorScreen, Colour''
''Parameter types: string, VectorScreen, Colour''




Line 704: Line 557:


''Parameter types: string, VectorScreen, Colour, int''
''Parameter types: string, VectorScreen, Colour, int''




Line 710: Line 562:


''Type: VectorScreen''
''Type: VectorScreen''




Line 716: Line 567:


''Type: Vector''
''Type: Vector''




Line 722: Line 572:


''Type: Vector''
''Type: Vector''




Line 728: Line 577:


''Parameter types: string. Return type: void.''
''Parameter types: string. Return type: void.''




Line 734: Line 582:


''Return type: void.''
''Return type: void.''
=== GUIWindow ===
=== GUIWindow ===
Constructor '''GUIWindow()'''
Constructor '''GUIWindow()'''




Line 748: Line 589:


''Parameter types: VectorScreen, VectorScreen, Colour''
''Parameter types: VectorScreen, VectorScreen, Colour''




Line 754: Line 594:


''Parameter types: VectorScreen, VectorScreen, Colour, string''
''Parameter types: VectorScreen, VectorScreen, Colour, string''




Line 760: Line 599:


''Parameter types: VectorScreen, VectorScreen, Colour, string, int''
''Parameter types: VectorScreen, VectorScreen, Colour, string, int''




Line 766: Line 604:


''Type: VectorScreen''
''Type: VectorScreen''





Latest revision as of 06:38, 29 July 2016

GUIElement

There aren't actually any instances of GUIElement, but it is the base class for all other GUI element classes. This means that all properties and functions it has also work on other GUI elements. GUI element flags are used in several places, the available flag constants are:

  • GUI_FLAG_NONE
  • GUI_FLAG_VISIBLE
  • GUI_FLAG_DISABLED
  • GUI_FLAG_BACKGROUND
  • GUI_FLAG_BORDER
  • GUI_FLAG_SHADOW
  • GUI_FLAG_DRAGGABLE
  • GUI_FLAG_CLIP
  • GUI_FLAG_WRAP
  • GUI_FLAG_AUTO_RESIZE
  • GUI_FLAG_INHERIT_ALPHA
  • GUI_FLAG_ANIMATION
  • GUI_FLAG_TABSTOP
  • GUI_FLAG_MOUSECTRL
  • GUI_FLAG_KBCTRL
  • GUI_FLAG_SCROLLABLE
  • GUI_FLAG_TEXT_SHADOW
  • GUI_FLAG_TEXT_TAGS
  • GUI_FLAG_DEPTH_TEST
  • GUI_FLAG_3D_ENTITY
  • GUI_FLAG_CACHE_TEXTURE
  • GUI_FLAG_CHECKBOX_CHECKED
  • GUI_FLAG_EDITBOX_MASKINPUT
  • GUI_FLAG_LISTBOX_MULTISELECT
  • GUI_FLAG_LISTBOX_SORTING
  • GUI_FLAG_MEMOBOX_TOPBOTTOM
  • GUI_FLAG_SCROLLBAR_HORIZ
  • GUI_FLAG_WINDOW_TITLEBAR
  • GUI_FLAG_WINDOW_CLOSEBTN
  • GUI_FLAG_WINDOW_RESIZABLE


Function AddChild(element)

Parameter types: GUIElement. Return type: void.

Makes the specified element a child of this element.


Function IsChildOf(element)

Parameter types: GUIElement. Return type: bool.

Returns true if this element is the child of the specified element.


Function Detach()

Return type: void.

Detaches this element from its parent.


Function MoveForward()

Return type: void.

Moves the siblign element right in front of this one behind it.


Function MoveBackward()

Return type: void.

Moves the sibling element right behind this element to the front of it.


Function SendToTop()

Return type: void.

Moves this element on top of all other sibling elements.


Function SendToBottom()

Return type: void.

Moves this element to the bottom of all other sibling elements.


Property Position (bound)

Type: VectorScreen


Property Size (bound)

Type: VectorScreen


Property Position3D / Pos3D (bound)

Type: Vector


Property Rotation3D (bound)

Type: Vector


Property Size3D (bound)

Type: Vector


Function Set3DTransform(position, rotation, size)

Parameter types: Vector, Vector, Vector. Return type: void.

Sets the 3D transformation of this element.


Property Colour / Color (bound)

Type: Colour


Property TextColour / TextColor (bound)

Type: Colour


Property Alpha

Type: int


Property Text

Type: string


Property TextSize (read-only)

Type: VectorScreen

Size on the screen of the text in this element.


Property TextAlignment

Type: int

Sets the alignment of text. Available constants are:

  • GUI_ALIGN_LEFT
  • GUI_ALIGN_RIGHT
  • GUI_ALIGN_TOP
  • GUI_ALIGN_BOTTOM
  • GUI_ALIGN_CENTERV
  • GUI_ALIGN_CENTERH
  • GUI_ALIGN_CENTER


Property FontName

Type: string


Property FontSize

Type: int


Property FontFlags

Type: int

Available flag constants are:

  • GUI_FFLAG_NONE
  • GUI_FFLAG_BOLD
  • GUI_FFLAG_ITALIC
  • GUI_FFLAG_ULINE
  • GUI_FFLAG_STRIKE
  • GUI_FFLAG_NOAA
  • GUI_FFLAG_OUTLINE


Property TextPaddingTop

Type: int


Property TextPaddingBottom

Type: int


Property TextPaddingLeft

Type: int


Property TextPaddingRight

Type: int


Property Flags

Type: int


Function AddFlags(flags)

Parameter types: int. Return type: void.


Function RemoveFlags(flags)

Parameter types: int. Return type: void.

GUIButton

Constructor GUIButton()


Constructor GUIButton(position, size, colour)

Parameter types: VectorScreen, VectorScreen, Colour


Constructor GUIButton(position, size, colour, text)

Parameter types: VectorScreen, VectorScreen, Colour, string


Constructor GUIButton(position, size, colour, text, flags)

Parameter types: VectorScreen, VectorScreen, Colour, string, int

GUICanvas

Constructor GUICanvas()

GUICheckbox

Constructor GUICheckbox()


Constructor GUICheckbox(position, colour)

Parameter types: VectorScreen, Colour


Constructor GUICheckbox(position, colour, flags)

Parameter types: VectorScreen, Colour, int

GUIEditbox

Constructor GUIEditbox(position, size, colour)

Parameter types: VectorScreen, VectorScreen, Colour


Constructor GUIEditbox(position, size, colour, text)

Parameter types: VectorScreen, VectorScreen, Colour, string


Constructor GUIEditbox(position, size, colour, text, flags)

Parameter types: VectorScreen, VectorScreen, Colour, string, int


Property HasTextSelected (read-only)

Type: bool


Property TextSelection (read-only)

Type: string


Function SelectText(startIndex, endIndex)

Parameter types: int, int. Return type: void.


Property CursorPos

Type: int

GUILabel

Constructor GUILabel()


Constructor GUILabel(position, colour)

Parameter types: VectorScreen, Colour


Constructor GUILabel(position, colour, text)

Parameter types: VectorScreen, Colour, string


Constructor GUILabel(position, colour, text, flags)

Parameter types: VectorScreen, Colour, string, int

GUIListbox

Constructor GUIListbox()


Constructor GUIListbox(position, size)

Parameter types: VectorScreen, VectorScreen


Constructor GUIListbox(position, size, colour, selectedColour)

Parameter types: VectorScreen, VectorScreen, Colour, Colour


Constructor GUIListbox(position, size, colour, selectedColour, flags)

Parameter types: VectorScreen, VectorScreen, Colour, Colour, int


Property Items (read-only)

Type: array


Function AddItem(item)

Parameter types: string. Return type: void.


Function RemoveItem(item)

Parameter types: string. Return type: void.


Function Clean()

Return type: void.

Removes all items.


Property ItemCount (read-only)

Type: int


Property SelectedCount (read-only)

Type: int


Property SelectedColour (bound)

Type: Colour

Background colour of selected items.

GUIMemobox

Constructor GUIMemobox()


Constructor GUIMemobox(position, size, colour)

Parameter types: VectorScreen, VectorScreen, Colour


Constructor GUIMemobox(position, size, colour, flags)

Parameter types: VectorScreen, VectorScreen, Colour, int


Function AddLine(line)

Parameter types: string. Return type: void.


Function AddLine(line, colour)

Parameter types: string, Colour. Return type: void.


Function Clear()

Return type: void.


Property DisplayPos

Type: float


Property LineHeight

Type: int


Property LineCount (read-only)

Type: int


Property HistorySize

Type: int

GUIProgressBar

Constructor GUIProgressBar()


Constructor GUIProgressBar(position, size, colour)

Parameter types: VectorScreen, VectorScreen, Colour


Constructor GUIProgressBar(position, size, colour, selectedColour)

Parameter types: VectorScreen, VectorScreen, Colour, Colour


Constructor GUIProgressBar(position, size, colour, selectedColour, flags)

Parameter types: VectorScreen, VectorScreen, Colour, Colour, int


Constructor GUIProgressBar(position, size, colour, selectedColour, flags, endValue)

Parameter types: VectorScreen, VectorScreen, Colour, Colour, int, float


Property Value

Type: float


Property MaxValue

Type: float


Property BackgroundShade

Type: float


Property Thickness

Type: int


Property StartColour (bound)

Type: Colour


Property EndColour (bound)

Type: Colour

GUIScrollbar

Constructor GUIScrollbar()


Constructor GUIScrollbar(position, size)

Parameter types: VectorScreen, VectorScreen


Constructor GUIScrollbar(position, size, colour)

Parameter types: VectorScreen, VectorScreen, Colour


Constructor GUIScrollbar(position, size, colour, flags)

Parameter types: VectorScreen, VectorScreen, Colour, int


Function SetParams(contentSize, stepSize, barPosition, barSize)

Parameter types: float, float, float, float. Return type: void.


Property ContentSize

Type: float


Property StepSize

Type: float


Property BarSize

Type: float


Property BarPosition

Type: float


Property BackgroundShade / BGShade

Type: float

GUISprite

Constructor GUISprite()


Constructor GUISprite(fileName, position)

Parameter types: string, VectorScreen


Constructor GUISprite(fileName, position, colour)

Parameter types: string, VectorScreen, Colour


Constructor GUISprite(fileName, position, colour, flags)

Parameter types: string, VectorScreen, Colour, int


Property TextureSize

Type: VectorScreen


Property TopLeftUV

Type: Vector


Property BottomRightUV

Type: Vector


Function SetTexture(fileName)

Parameter types: string. Return type: void.


Function Resize()

Return type: void.

GUIWindow

Constructor GUIWindow()


Constructor GUIWindow(position, size, colour)

Parameter types: VectorScreen, VectorScreen, Colour


Constructor GUIWindow(position, size, colour, text)

Parameter types: VectorScreen, VectorScreen, Colour, string


Constructor GUIWindow(position, size, colour, text, flags)

Parameter types: VectorScreen, VectorScreen, Colour, string, int


Property DragOffset (read-only)

Type: VectorScreen


Property TitleColour (bound)

Type: Colour