DgsCheckBoxSetButtonAlignment: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(Blanked the page)
Tag: Blanking
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Client function}}
__NOTOC__
This function sets the alignment of the button of a dgs check box.


==Syntax==
<syntaxhighlight lang="lua">
bool dgsCheckBoxSetButtonAlignment(element dgsElement, string relative[, string side = "left"])
</syntaxhighlight>
===Required Arguments===
*'''checkBox:''' The dgs check box to set the vertical alignment.
*'''relative:''' The object the dgs check box's button is relative to. Valid type strings are:
**"text": The dgs check box will be relative to the dgs check box's text.
**"boundingBox": The dgs check box will be aligned from dgs check box's bounding box.
*'''side:''' The side the dgs check box's button is aligned to. Valid type strings are:
**"left": The dgs check box will be aligned to the left, relative to relative object.
**"right": The dgs check box will be aligned to the right, relative to relative object.
===Returns===
Returns ''true'' if successful, ''false'' otherwise.
==Example==
<syntaxhighlight lang="lua">
DGS = exports.dgs
local cb1 = DGS:dgsCreateCheckBox(500,500,200,30,"aaaa",false)
local cb2 = DGS:dgsCreateCheckBox(500,520,200,30,"bbbb",false)
DGS:dgsCheckBoxSetButtonAlignment( cb1, "text", "left" )
</syntaxhighlight>
==See Also==
{{DGSFUNCTIONS}}

Latest revision as of 16:01, 5 February 2023