<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/GuiSetLocation?action=history&amp;feed=atom</id>
	<title>GuiSetLocation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/GuiSetLocation?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiSetLocation&amp;action=history"/>
	<updated>2026-05-18T15:26:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GuiSetLocation&amp;diff=36410&amp;oldid=prev</id>
		<title>Enad: Created page with &quot;&lt;pageclass class=&quot;#228B22&quot; subcaption=&quot;Useful Function&quot;&gt;&lt;/pageclass&gt; &lt;lowercasetitle/&gt; __NOTOC__ {{Useful Function}} This function will change gui Location to Horizontal and Vert...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GuiSetLocation&amp;diff=36410&amp;oldid=prev"/>
		<updated>2013-06-15T11:10:51Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pageclass class=&amp;quot;#228B22&amp;quot; subcaption=&amp;quot;Useful Function&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt; &amp;lt;lowercasetitle/&amp;gt; __NOTOC__ {{Useful Function}} This function will change gui Location to Horizontal and Vert...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pageclass class=&amp;quot;#228B22&amp;quot; subcaption=&amp;quot;Useful Function&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
&amp;lt;lowercasetitle/&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function will change gui Location to Horizontal and Vertical location. &lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&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;
string guiSetLocation ( element Gui, string Horizontal, string Vertical )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''Gui''': The guiElement to be changed. &lt;br /&gt;
* '''Horizontal''': &amp;quot;left&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;right&amp;quot;.&lt;br /&gt;
* '''Vertical''': &amp;quot;up&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;down&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
x3NAD = { &lt;br /&gt;
    xLocation = {&lt;br /&gt;
        [&amp;quot;right&amp;quot;] = { 1 };&lt;br /&gt;
        [&amp;quot;left&amp;quot;] = { 10 };&lt;br /&gt;
        [&amp;quot;center&amp;quot;] = { 2 };&lt;br /&gt;
    };&lt;br /&gt;
    yLocation = {&lt;br /&gt;
        [&amp;quot;up&amp;quot;] = { 10 };&lt;br /&gt;
        [&amp;quot;down&amp;quot;] = { 1 };&lt;br /&gt;
        [&amp;quot;center&amp;quot;] = { 2 };     &lt;br /&gt;
    };&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
guiSetLocation = function ( gui, Horizontal, Vertical )&lt;br /&gt;
    local screenW, screenH = guiGetScreenSize ( )&lt;br /&gt;
    local windowW, windowH = guiGetSize ( gui, false )&lt;br /&gt;
    if Horizontal and Vertical then&lt;br /&gt;
        local x, y = tonumber ( x3NAD.xLocation[Horizontal][1] ) or 2, tonumber ( x3NAD.yLocation[Vertical][1] ) or 2&lt;br /&gt;
        local x, y = ( screenW -windowW ) /x, ( screenH -windowH ) /y&lt;br /&gt;
        guiSetPosition ( gui, x, y, false )&lt;br /&gt;
    end&lt;br /&gt;
end;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-side example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
window = guiCreateWindow ( 100, 100, 400, 400, &amp;quot;Test&amp;quot;, false );&lt;br /&gt;
guiSetLocation ( window, &amp;quot;left&amp;quot;, &amp;quot;down&amp;quot; );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This Function Has Created By '''3NAD'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Enad</name></author>
	</entry>
</feed>