<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/DgsMenuGetItemTextSize?action=history&amp;feed=atom</id>
	<title>DgsMenuGetItemTextSize - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/DgsMenuGetItemTextSize?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsMenuGetItemTextSize&amp;action=history"/>
	<updated>2026-05-08T09:33:53Z</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=DgsMenuGetItemTextSize&amp;diff=82213&amp;oldid=prev</id>
		<title>Mohab: Created page with &quot;{{Client function}} __NOTOC__ This function gets the text size of a specific menu item.  ==Syntax== &lt;syntaxhighlight lang=&quot;lua&quot;&gt; float, float dgsMenuGetItemTextSize ( element menu, int uniqueID ) &lt;/syntaxhighlight&gt;  ===Required Arguments=== *'''menu:''' The DGS menu element containing the item *'''uniqueID:''' The unique ID of the menu item (returned by dgsMenuAddItem)  ===Returns=== Returns two floats representing the horizontal and vertical text scale factors, or '...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsMenuGetItemTextSize&amp;diff=82213&amp;oldid=prev"/>
		<updated>2025-07-10T06:06:57Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Client function}} __NOTOC__ This function gets the text size of a specific menu item.  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; float, float dgsMenuGetItemTextSize ( element menu, int uniqueID ) &amp;lt;/syntaxhighlight&amp;gt;  ===Required Arguments=== *&amp;#039;&amp;#039;&amp;#039;menu:&amp;#039;&amp;#039;&amp;#039; The DGS menu element containing the item *&amp;#039;&amp;#039;&amp;#039;uniqueID:&amp;#039;&amp;#039;&amp;#039; The unique ID of the menu item (returned by &lt;a href=&quot;/wiki/DgsMenuAddItem&quot; title=&quot;DgsMenuAddItem&quot;&gt;dgsMenuAddItem&lt;/a&gt;)  ===Returns=== Returns two floats representing the horizontal and vertical text scale factors, or &amp;#039;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function gets the text size of a specific menu item.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float dgsMenuGetItemTextSize ( element menu, int uniqueID )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''menu:''' The DGS menu element containing the item&lt;br /&gt;
*'''uniqueID:''' The unique ID of the menu item (returned by [[dgsMenuAddItem]])&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two floats representing the horizontal and vertical text scale factors, or ''false'' if the operation failed.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
loadstring(exports.dgs:dgsImportFunction())()-- load functions&lt;br /&gt;
&lt;br /&gt;
-- Create a menu with items&lt;br /&gt;
local menu = dgsCreateMenu(200, 200, 200, 150, false)&lt;br /&gt;
local item1 = dgsMenuAddItem(menu, &amp;quot;Normal Size&amp;quot;, &amp;quot;normal&amp;quot;)&lt;br /&gt;
local item2 = dgsMenuAddItem(menu, &amp;quot;Large Text&amp;quot;, &amp;quot;large&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
-- Set different text sizes&lt;br /&gt;
dgsMenuSetItemTextSize(menu, item1, 1.0)&lt;br /&gt;
dgsMenuSetItemTextSize(menu, item2, 1.5, 2.0)&lt;br /&gt;
&lt;br /&gt;
-- Get and display the text sizes&lt;br /&gt;
local sizeX1, sizeY1 = dgsMenuGetItemTextSize(menu, item1)&lt;br /&gt;
local sizeX2, sizeY2 = dgsMenuGetItemTextSize(menu, item2)&lt;br /&gt;
&lt;br /&gt;
outputChatBox(&amp;quot;Item 1 text size: &amp;quot; .. sizeX1 .. &amp;quot;x&amp;quot; .. sizeY1)&lt;br /&gt;
outputChatBox(&amp;quot;Item 2 text size: &amp;quot; .. sizeX2 .. &amp;quot;x&amp;quot; .. sizeY2)&lt;br /&gt;
&lt;br /&gt;
-- Show the menu&lt;br /&gt;
dgsMenuShow(menu)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
*[[dgsMenuSetItemTextSize]]&lt;br /&gt;
*[[dgsMenuAddItem]]&lt;br /&gt;
*[[dgsMenuSetItemText]]&lt;br /&gt;
*[[dgsCreateMenu]]&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
[[User:Mohab|Mohab]].&lt;/div&gt;</summary>
		<author><name>Mohab</name></author>
	</entry>
</feed>