<?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=Jyrno42</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=Jyrno42"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Jyrno42"/>
	<updated>2026-05-02T10:56:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientGUITabSwitched&amp;diff=21173</id>
		<title>OnClientGUITabSwitched</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientGUITabSwitched&amp;diff=21173"/>
		<updated>2009-08-20T14:03:20Z</updated>

		<summary type="html">&lt;p&gt;Jyrno42: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event is triggered each time the user switch from GUI tab.&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element theElement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
* '''theElement''':  The element which was selected.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a window with a tabpanel with two tabs. Every time a user changes tabpage a notification will be shown.&lt;br /&gt;
&lt;br /&gt;
First we'll create the window. Then add a tabpanel and couple tabs with some labels in them. Qoute: [[GuiCreateWindow#Example]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local myWindow = guiCreateWindow ( 0, 0, 0.5, 0.4, &amp;quot;Information&amp;quot;, true )  -- create a window which has &amp;quot;Information&amp;quot; in the title bar.&lt;br /&gt;
local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow )       -- create a tab panel which fills the whole window&lt;br /&gt;
local tabMap = guiCreateTab( &amp;quot;Map Information&amp;quot;, tabPanel )                -- create a tab named &amp;quot;Map Information&amp;quot; on 'tabPanel'&lt;br /&gt;
local tabHelp = guiCreateTab( &amp;quot;Help&amp;quot;, tabPanel )                          -- create another tab named &amp;quot;Help&amp;quot; on 'tabPanel'&lt;br /&gt;
 &lt;br /&gt;
-- adds a label (text) to each tab&lt;br /&gt;
guiCreateLabel( 0.02, 0.04, 0.94, 0.2, &amp;quot;This is information about the current map&amp;quot;, true, tabMap )&lt;br /&gt;
guiCreateLabel( 0.02, 0.04, 0.94, 0.92, &amp;quot;This is help text.&amp;quot;, true, tabHelp )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now let's add the event handler.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function OnChange( selectedTab )&lt;br /&gt;
&lt;br /&gt;
	-- If there is a selected tab.&lt;br /&gt;
	if selectedTab ~= nil then &lt;br /&gt;
	&lt;br /&gt;
		outPutChatBox( &amp;quot;You've changed your active tab.&amp;quot;, getLocalPlayer( ) )&lt;br /&gt;
	&lt;br /&gt;
	end	&lt;br /&gt;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientGUITabSwitched&amp;quot;, getRootElement( ), OnChange)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===GUI events===&lt;br /&gt;
{{GUI_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs Example]]&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Jyrno42</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientGUITabSwitched&amp;diff=21172</id>
		<title>OnClientGUITabSwitched</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientGUITabSwitched&amp;diff=21172"/>
		<updated>2009-08-20T14:02:50Z</updated>

		<summary type="html">&lt;p&gt;Jyrno42: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event is triggered each time the user switch from GUI tab.&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element theElement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
* '''theElement''':  The element which was selected.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a window with a tabpanel with two tabs. Every time a user changes tabpage a notification will be shown.&lt;br /&gt;
&lt;br /&gt;
First well create the window. Then add a tabpanel and couple tabs with some labels in them. Qoute: [[GuiCreateWindow#Example]]&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local myWindow = guiCreateWindow ( 0, 0, 0.5, 0.4, &amp;quot;Information&amp;quot;, true )  -- create a window which has &amp;quot;Information&amp;quot; in the title bar.&lt;br /&gt;
local tabPanel = guiCreateTabPanel ( 0, 0.1, 1, 1, true, myWindow )       -- create a tab panel which fills the whole window&lt;br /&gt;
local tabMap = guiCreateTab( &amp;quot;Map Information&amp;quot;, tabPanel )                -- create a tab named &amp;quot;Map Information&amp;quot; on 'tabPanel'&lt;br /&gt;
local tabHelp = guiCreateTab( &amp;quot;Help&amp;quot;, tabPanel )                          -- create another tab named &amp;quot;Help&amp;quot; on 'tabPanel'&lt;br /&gt;
 &lt;br /&gt;
-- adds a label (text) to each tab&lt;br /&gt;
guiCreateLabel( 0.02, 0.04, 0.94, 0.2, &amp;quot;This is information about the current map&amp;quot;, true, tabMap )&lt;br /&gt;
guiCreateLabel( 0.02, 0.04, 0.94, 0.92, &amp;quot;This is help text.&amp;quot;, true, tabHelp )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now lets add the event handler.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function OnChange( selectedTab )&lt;br /&gt;
&lt;br /&gt;
	-- If there is a selected tab.&lt;br /&gt;
	if selectedTab ~= nil then &lt;br /&gt;
	&lt;br /&gt;
		outPutChatBox( &amp;quot;You've changed your active tab.&amp;quot;, getLocalPlayer( ) )&lt;br /&gt;
	&lt;br /&gt;
	end	&lt;br /&gt;
	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientGUITabSwitched&amp;quot;, getRootElement( ), OnChange)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===GUI events===&lt;br /&gt;
{{GUI_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs Example]]&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Jyrno42</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientGUITabSwitched&amp;diff=21171</id>
		<title>OnClientGUITabSwitched</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientGUITabSwitched&amp;diff=21171"/>
		<updated>2009-08-20T13:50:45Z</updated>

		<summary type="html">&lt;p&gt;Jyrno42: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event is triggered each time the user switch from GUI tab.&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element theElement&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
* '''theElement''':  The element which was selected.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--TODO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===GUI events===&lt;br /&gt;
{{GUI_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Needs Example]]&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Jyrno42</name></author>
	</entry>
</feed>