From Multi Theft Auto: Wiki
Jump to navigation Jump to search

This function returns the alignment of position from a specific DGS element


string, string dgsGetPositionAlignment( element dgsElement )

DGS OOP Syntax Help! I don't understand this!

Note: The Variable It's a table and has the following using:
  • positionAlignment[1] for horizontal alignment
  • positionAlignment[2] for vertical alignment
Method: DGSElement:getPositionAlignment(...)
Variable: .positionAlignment
Counterpart: dgsSetPositionAlignment

Required Arguments

  • dgsElement: The DGS element to change the alignment.


Return two strings, indicates horizontal and vertical alignment.

  • horizontalAlignment:
    • left
    • center
    • right
  • verticalAlignment:
    • top
    • center
    • bottom


DGS = exports.dgs

local window = DGS:dgsCreateWindow(0.40, 0.33, 0.20, 0.21, "DGS Window", true)
local button = DGS:dgsCreateButton(0.0, 0.0, 0.2, 0.1, "Ok", true, window)

local hAlign,vAlign = DGS:dgsGetPositionAlignment(button)

See Also

General Functions

General Events