<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ihnify</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ihnify"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Ihnify"/>
	<updated>2026-04-07T04:26:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsGetSide&amp;diff=67574</id>
		<title>DgsGetSide</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsGetSide&amp;diff=67574"/>
		<updated>2020-10-23T09:41:53Z</updated>

		<summary type="html">&lt;p&gt;Ihnify: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function returns the position of the DGS element side.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string dgsGetSide( element theElement, bool topleft )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The DGS element to be checked.&lt;br /&gt;
*'''topleft:''' The position of the DGS element in the window.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''false'' if the element passed is invalid or a string containing one of the following:&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
local window = DGS:dgsCreateWindow(0.40, 0.33, 0.20, 0.21, &amp;quot;DGS Window&amp;quot;, true)&lt;br /&gt;
local button = DGS:dgsCreateButton(0.0, 0.0, 0.2, 0.1, &amp;quot;OK&amp;quot;, true, window)&lt;br /&gt;
&lt;br /&gt;
DGS:dgsSetSide(button, &amp;quot;right&amp;quot;, true)&lt;br /&gt;
&lt;br /&gt;
local buttonSide = DGS:dgsGetSide(button)&lt;br /&gt;
&lt;br /&gt;
outputChatBox(&amp;quot;dgsSide &amp;quot; .. buttonSide)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Ihnify</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsGetSide&amp;diff=62745</id>
		<title>DgsGetSide</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsGetSide&amp;diff=62745"/>
		<updated>2019-05-21T10:30:08Z</updated>

		<summary type="html">&lt;p&gt;Ihnify: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function returns the position of the DGS element side.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int dgsGetSide( element theElement, bool topleft )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The DGS element to be checked.&lt;br /&gt;
*'''topleft:''' The position of the DGS element in the window.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''false'' if the element passed is invalid or a string containing one of the following:&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
local window = DGS:dgsCreateWindow(0.40, 0.33, 0.20, 0.21, &amp;quot;DGS Window&amp;quot;, true)&lt;br /&gt;
local button = DGS:dgsCreateButton(0.0, 0.0, 0.2, 0.1, &amp;quot;OK&amp;quot;, true, window)&lt;br /&gt;
&lt;br /&gt;
DGS:dgsSetSide(button, &amp;quot;right&amp;quot;, true)&lt;br /&gt;
&lt;br /&gt;
local buttonSide = dgs:dgsGetSide(button)&lt;br /&gt;
&lt;br /&gt;
outputChatBox(&amp;quot;dgsSide &amp;quot; .. buttonSide)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Ihnify</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsGetSide&amp;diff=62687</id>
		<title>DgsGetSide</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsGetSide&amp;diff=62687"/>
		<updated>2019-05-18T15:40:59Z</updated>

		<summary type="html">&lt;p&gt;Ihnify: /* Returns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function returns the position of the DGS element side.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int dgsGetSide( element theElement, bool topleft )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The DGS element to be checked.&lt;br /&gt;
*'''topleft:''' The position of the DGS element in the window.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''false'' if the element passed is invalid or a string containing one of the following:&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
local window = DGS:dgsCreateWindow(0.40, 0.33, 0.20, 0.21, &amp;quot;DGS Window&amp;quot;, true)&lt;br /&gt;
local button = DGS:dgsCreateButton(0.0, 0.0, 0.2, 0.1, &amp;quot;OK&amp;quot;, true, window)&lt;br /&gt;
&lt;br /&gt;
dgs:dgsSetSide(button, &amp;quot;right&amp;quot;, true)&lt;br /&gt;
&lt;br /&gt;
local buttonSide = dgs:dgsGetSide(button)&lt;br /&gt;
&lt;br /&gt;
outputChatBox(&amp;quot;dgsSide &amp;quot; .. buttonSide)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Ihnify</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsGetSide&amp;diff=62686</id>
		<title>DgsGetSide</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsGetSide&amp;diff=62686"/>
		<updated>2019-05-18T15:40:47Z</updated>

		<summary type="html">&lt;p&gt;Ihnify: /* Returns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function returns the position of the DGS element side.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int dgsGetSide( element theElement, bool topleft )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The DGS element to be checked.&lt;br /&gt;
*'''topleft:''' The position of the DGS element in the window.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns false if the element passed is invalid or a string containing one of the following:&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
local window = DGS:dgsCreateWindow(0.40, 0.33, 0.20, 0.21, &amp;quot;DGS Window&amp;quot;, true)&lt;br /&gt;
local button = DGS:dgsCreateButton(0.0, 0.0, 0.2, 0.1, &amp;quot;OK&amp;quot;, true, window)&lt;br /&gt;
&lt;br /&gt;
dgs:dgsSetSide(button, &amp;quot;right&amp;quot;, true)&lt;br /&gt;
&lt;br /&gt;
local buttonSide = dgs:dgsGetSide(button)&lt;br /&gt;
&lt;br /&gt;
outputChatBox(&amp;quot;dgsSide &amp;quot; .. buttonSide)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Ihnify</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsGetSide&amp;diff=62685</id>
		<title>DgsGetSide</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsGetSide&amp;diff=62685"/>
		<updated>2019-05-18T13:01:37Z</updated>

		<summary type="html">&lt;p&gt;Ihnify: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function returns the position of the DGS element side.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int dgsGetSide( element theElement, bool topleft )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The DGS element to be checked.&lt;br /&gt;
*'''topleft:''' The position of the DGS element in the window.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the position of DGS element&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
local window = DGS:dgsCreateWindow(0.40, 0.33, 0.20, 0.21, &amp;quot;DGS Window&amp;quot;, true)&lt;br /&gt;
local button = DGS:dgsCreateButton(0.0, 0.0, 0.2, 0.1, &amp;quot;OK&amp;quot;, true, window)&lt;br /&gt;
&lt;br /&gt;
dgs:dgsSetSide(button, &amp;quot;right&amp;quot;, true)&lt;br /&gt;
&lt;br /&gt;
local buttonSide = dgs:dgsGetSide(button)&lt;br /&gt;
&lt;br /&gt;
outputChatBox(&amp;quot;dgsSide &amp;quot; .. buttonSide)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Ihnify</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsGetSide&amp;diff=62684</id>
		<title>DgsGetSide</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsGetSide&amp;diff=62684"/>
		<updated>2019-05-18T13:01:01Z</updated>

		<summary type="html">&lt;p&gt;Ihnify: Created page with &amp;quot;{{Client function}}  This function returns the position of the DOGS element side.  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; int dgsGetSide( element theElement, bool topleft ) &amp;lt;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function returns the position of the DOGS element side.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int dgsGetSide( element theElement, bool topleft )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The DGS element to be checked.&lt;br /&gt;
*'''topleft:''' The position of the DGS element in the window.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the position of DGS element&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
local window = DGS:dgsCreateWindow(0.40, 0.33, 0.20, 0.21, &amp;quot;DGS Window&amp;quot;, true)&lt;br /&gt;
local button = DGS:dgsCreateButton(0.0, 0.0, 0.2, 0.1, &amp;quot;OK&amp;quot;, true, window)&lt;br /&gt;
&lt;br /&gt;
dgs:dgsSetSide(button, &amp;quot;right&amp;quot;, true)&lt;br /&gt;
&lt;br /&gt;
local buttonSide = dgs:dgsGetSide(button)&lt;br /&gt;
&lt;br /&gt;
outputChatBox(&amp;quot;dgsSide &amp;quot; .. buttonSide)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Ihnify</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsSetSide&amp;diff=62683</id>
		<title>DgsSetSide</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsSetSide&amp;diff=62683"/>
		<updated>2019-05-18T12:54:54Z</updated>

		<summary type="html">&lt;p&gt;Ihnify: Created page with &amp;quot;{{Client function}}  This function to set the position of the DGS element.  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; int dgsSetSide( element theElement, string display, bool to...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function to set the position of the DGS element.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int dgsSetSide( element theElement, string display, bool topleft )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The DGS element to change position for.&lt;br /&gt;
*'''display:''' A position string, &amp;quot;right&amp;quot; or &amp;quot;bottom&amp;quot;.&lt;br /&gt;
*'''topleft:''' The position of the DGS element in the window.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
If the function succeeds it returns ''true'', if it fails it returns ''false''.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
local window = DGS:dgsCreateWindow(0.40, 0.33, 0.20, 0.21, &amp;quot;DGS Window&amp;quot;, true)&lt;br /&gt;
local button = DGS:dgsCreateButton(0.0, 0.0, 0.2, 0.1, &amp;quot;Ok&amp;quot;, true, window)&lt;br /&gt;
&lt;br /&gt;
dgs:dgsSetSide(button, &amp;quot;right&amp;quot;, true) -- in right top left of the window&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Ihnify</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsGridListGetSelectedItem&amp;diff=62682</id>
		<title>DgsGridListGetSelectedItem</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsGridListGetSelectedItem&amp;diff=62682"/>
		<updated>2019-05-18T11:05:51Z</updated>

		<summary type="html">&lt;p&gt;Ihnify: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function returns the row and colum indexes of the selected item in a grid list.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int dgsGridListGetSelectedItem ( element gridList )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''gridList:''' the grid list you want to know the selected row index of&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the row of the selected item if the specified grid list is valid and has a selected item, (-1) if no item is selected, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
local GridList = DGS:dgsCreateGridList ( 0.80, 0.10, 0.15, 0.60, true )&lt;br /&gt;
local column = DGS:dgsGridListAddColumn( GridList, &amp;quot;test&amp;quot;, 0.85 )&lt;br /&gt;
local row = DGS:dgsGridListAddRow ( GridList )&lt;br /&gt;
DGS:dgsGridListSetItemText (GridList, row, column, &amp;quot;1&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
addEventHandler ( &amp;quot;onDgsMouseClick&amp;quot;, root, function ( button, state  )&lt;br /&gt;
	if source == GridList then &lt;br /&gt;
		local Selected = DGS:dgsGridListGetSelectedItem(GridList)&lt;br /&gt;
		if Selected ~= -1 then &lt;br /&gt;
			local output= DGS:dgsGridListGetItemText(GridList,Selected,column)&lt;br /&gt;
			outputChatBox(&amp;quot;&amp;quot;..output..&amp;quot;&amp;quot;,255,0,0)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Ihnify</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsGridListGetSelectedItem&amp;diff=62679</id>
		<title>DgsGridListGetSelectedItem</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsGridListGetSelectedItem&amp;diff=62679"/>
		<updated>2019-05-17T17:03:37Z</updated>

		<summary type="html">&lt;p&gt;Ihnify: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function returns the row and colum indexes of the selected item in a grid list.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int dgsGridListGetSelectedItem ( element gridList )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''gridList:''' the grid list you want to know the selected row index of&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the row of the selected item if the specified grid list is valid and has a selected item, (-1) if no item is selected, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
showCursor(true)&lt;br /&gt;
local GridList = DGS:dgsCreateGridList ( 0.80, 0.10, 0.15, 0.60, true )&lt;br /&gt;
local column = DGS:dgsGridListAddColumn( GridList, &amp;quot;test&amp;quot;, 0.85 )&lt;br /&gt;
local row = DGS:dgsGridListAddRow ( GridList )&lt;br /&gt;
DGS:dgsGridListSetItemText (GridList, row, column, &amp;quot;1&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
addEventHandler ( &amp;quot;onDgsMouseClick&amp;quot;, root, function ( button, state  )&lt;br /&gt;
	if source == GridList then &lt;br /&gt;
		local Selected = DGS:dgsGridListGetSelectedItem(GridList)&lt;br /&gt;
		if Selected ~= -1 then &lt;br /&gt;
			local output= DGS:dgsGridListGetItemText(GridList,Selected,column)&lt;br /&gt;
			outputChatBox(&amp;quot;&amp;quot;..output..&amp;quot;&amp;quot;,255,0,0)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Ihnify</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsCreateEdit&amp;diff=62678</id>
		<title>DgsCreateEdit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsCreateEdit&amp;diff=62678"/>
		<updated>2019-05-17T17:02:47Z</updated>

		<summary type="html">&lt;p&gt;Ihnify: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
[[Image:Dx_5.PNG|frame|Example Dx edit field.]]&lt;br /&gt;
&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td valign=top height=80&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is for creating a new DGS edit box.  This is a text box in which the user can input text. Edit boxes only allow a single line of text. If you want to allow multiple lines of text create a memo box using [[guiCreateMemo]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element dgsCreateEdit ( float x, float y, float width, float height, string text, bool relative, [element parent = nil, int textcolor = FF000000, float scalex = 1, float scaley = 1,element imagebg = nil, element colorbg = FFC8C8C8, bool selectmode = false] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' A float of the 2D x position of the DGS edit box on a player's screen.  This is affected by the ''relative'' argument.&lt;br /&gt;
*'''y:''' A float of the 2D y position of the DGS edit box on a player's screen. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''width:''' A float of the width of the DGS edit box. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''height:''' A float of the height of the DGS edit box. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''text:''' A string of the text that will be displayed by default in the edit box.&lt;br /&gt;
*'''relative:''' This is whether sizes and positioning are relative.  If this is ''true'', then all x,y,width,height floats must be between 0 and 1, representing measures relative to the parent.&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''parent:''' This is the parent that the DGS edit box is attached to.  If the ''relative'' argument is true, sizes and positioning will be made relative to this parent. If the ''relative'' argument is false, positioning will be the number of offset pixels from the parent's origin. If no parent is passed, the parent will become the screen - causing positioning and sizing according to screen positioning.&lt;br /&gt;
*'''textcolor:''' An int of the color of the text.&lt;br /&gt;
*'''scalex:''' A float of the multiplier of the width of the text.&lt;br /&gt;
*'''scaley:''' A float of the multiplier of the height of the text.&lt;br /&gt;
*'''imagebg:''' A texture element of the background of the DGS edit box.&lt;br /&gt;
*'''colorbg:''' An int of the color of the background of the DGS edit box.&lt;br /&gt;
*'''selectmode :''' A bool of whether the select background color is above the text or under the text.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a dgs-dxedit element of the created edit box if it was successfully created, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates an edit box alongside an &amp;quot;Output!&amp;quot; button.  When the button is clicked, it will output the message in the edit box into the Chat Box.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
--create our button&lt;br /&gt;
button = DGS:dgsCreateButton( 0.7, 0.1, 0.2, 0.1, &amp;quot;OK&amp;quot;, true )&lt;br /&gt;
--Create an edit box and define it as &amp;quot;editBox&amp;quot;.&lt;br /&gt;
editBox = DGS:dgsCreateEdit( 0.3, 0.1, 0.4, 0.1, &amp;quot;&amp;quot;, true )&lt;br /&gt;
&lt;br /&gt;
--setup our function to output the message to the chatbox&lt;br /&gt;
function outputEditBox ( button, state )&lt;br /&gt;
        local text = DGS:dgsGetText ( editBox )--get the text from the edit box&lt;br /&gt;
        outputChatBox ( text ) --output that text&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onDgsMouseClick&amp;quot;, button, outputEditBox )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example creates an edit box and sets the input focus so the player does not have to click before typing:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
local editBox = DGS:dgsCreateEdit( 0.3, 0.1, 0.4, 0.1, &amp;quot;&amp;quot;, true )&lt;br /&gt;
DGS:dgsBringToFront( editBox )&lt;br /&gt;
DGS:dgsEditSetCaretPosition( editBox, 1 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit by: Senpai&lt;br /&gt;
This example masks the password:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
local editBox = DGS:dgsCreateEdit( 0.3, 0.1, 0.4, 0.1, &amp;quot;&amp;quot;, true )&lt;br /&gt;
DGS:dgsSetProperty(editBox,&amp;quot;masked&amp;quot;,true) --if its true then it will be masked&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Ihnify</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsCreateEdit&amp;diff=62677</id>
		<title>DgsCreateEdit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsCreateEdit&amp;diff=62677"/>
		<updated>2019-05-17T16:59:39Z</updated>

		<summary type="html">&lt;p&gt;Ihnify: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
[[Image:Dx_5.PNG|frame|Example Dx edit field.]]&lt;br /&gt;
&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td valign=top height=80&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function is for creating a new DGS edit box.  This is a text box in which the user can input text. Edit boxes only allow a single line of text. If you want to allow multiple lines of text create a memo box using [[guiCreateMemo]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element dgsCreateEdit ( float x, float y, float width, float height, string text, bool relative, [element parent = nil, int textcolor = FF000000, float scalex = 1, float scaley = 1,element imagebg = nil, element colorbg = FFC8C8C8, bool selectmode = false] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''x:''' A float of the 2D x position of the DGS edit box on a player's screen.  This is affected by the ''relative'' argument.&lt;br /&gt;
*'''y:''' A float of the 2D y position of the DGS edit box on a player's screen. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''width:''' A float of the width of the DGS edit box. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''height:''' A float of the height of the DGS edit box. This is affected by the ''relative'' argument.&lt;br /&gt;
*'''text:''' A string of the text that will be displayed by default in the edit box.&lt;br /&gt;
*'''relative:''' This is whether sizes and positioning are relative.  If this is ''true'', then all x,y,width,height floats must be between 0 and 1, representing measures relative to the parent.&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''parent:''' This is the parent that the DGS edit box is attached to.  If the ''relative'' argument is true, sizes and positioning will be made relative to this parent. If the ''relative'' argument is false, positioning will be the number of offset pixels from the parent's origin. If no parent is passed, the parent will become the screen - causing positioning and sizing according to screen positioning.&lt;br /&gt;
*'''textcolor:''' An int of the color of the text.&lt;br /&gt;
*'''scalex:''' A float of the multiplier of the width of the text.&lt;br /&gt;
*'''scaley:''' A float of the multiplier of the height of the text.&lt;br /&gt;
*'''imagebg:''' A texture element of the background of the DGS edit box.&lt;br /&gt;
*'''colorbg:''' An int of the color of the background of the DGS edit box.&lt;br /&gt;
*'''selectmode :''' A bool of whether the select background color is above the text or under the text.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a dgs-dxedit element of the created edit box if it was successfully created, false otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates an edit box alongside an &amp;quot;Output!&amp;quot; button.  When the button is clicked, it will output the message in the edit box into the Chat Box.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
--create our button&lt;br /&gt;
button = DGS:dgsCreateButton( 0.7, 0.1, 0.2, 0.1, &amp;quot;OK&amp;quot;, true )&lt;br /&gt;
--Create an edit box and define it as &amp;quot;editBox&amp;quot;.&lt;br /&gt;
editBox = DGS:dgsCreateEdit( 0.3, 0.1, 0.4, 0.1, &amp;quot;&amp;quot;, true )&lt;br /&gt;
&lt;br /&gt;
--setup our function to output the message to the chatbox&lt;br /&gt;
function outputEditBox ()&lt;br /&gt;
        local text = DGS:dgsGetText ( editBox )--get the text from the edit box&lt;br /&gt;
        outputChatBox ( text ) --output that text&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onDgsMouseClick&amp;quot;, button, outputEditBox )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example creates an edit box and sets the input focus so the player does not have to click before typing:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
local editBox = DGS:dgsCreateEdit( 0.3, 0.1, 0.4, 0.1, &amp;quot;&amp;quot;, true )&lt;br /&gt;
DGS:dgsBringToFront( editBox )&lt;br /&gt;
DGS:dgsEditSetCaretPosition( editBox, 1 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Edit by: Senpai&lt;br /&gt;
This example masks the password:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
local editBox = DGS:dgsCreateEdit( 0.3, 0.1, 0.4, 0.1, &amp;quot;&amp;quot;, true )&lt;br /&gt;
DGS:dgsSetProperty(editBox,&amp;quot;masked&amp;quot;,true) --if its true then it will be masked&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Ihnify</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsGridListGetSelectedItem&amp;diff=62676</id>
		<title>DgsGridListGetSelectedItem</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsGridListGetSelectedItem&amp;diff=62676"/>
		<updated>2019-05-17T16:59:14Z</updated>

		<summary type="html">&lt;p&gt;Ihnify: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
&lt;br /&gt;
This function returns the row and colum indexes of the selected item in a grid list.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int dgsGridListGetSelectedItem ( element gridList )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''gridList:''' the grid list you want to know the selected row index of&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the row of the selected item if the specified grid list is valid and has a selected item, (-1) if no item is selected, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
showCursor(true)&lt;br /&gt;
local GridList = DGS:dgsCreateGridList ( 0.80, 0.10, 0.15, 0.60, true )&lt;br /&gt;
local column = DGS:dgsGridListAddColumn( GridList, &amp;quot;test&amp;quot;, 0.85 )&lt;br /&gt;
local row = DGS:dgsGridListAddRow ( GridList )&lt;br /&gt;
DGS:dgsGridListSetItemText (GridList, row, column, &amp;quot;1&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
addEventHandler ( &amp;quot;onDgsMouseClick&amp;quot;, root, function ( )&lt;br /&gt;
	if source == GridList then &lt;br /&gt;
		local Selected = DGS:dgsGridListGetSelectedItem(GridList)&lt;br /&gt;
		if Selected ~= -1 then &lt;br /&gt;
			local output= DGS:dgsGridListGetItemText(GridList,Selected,column)&lt;br /&gt;
			outputChatBox(&amp;quot;&amp;quot;..output..&amp;quot;&amp;quot;,255,0,0)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Ihnify</name></author>
	</entry>
</feed>