<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/DgsMenuSetItemTextSize?action=history&amp;feed=atom</id>
	<title>DgsMenuSetItemTextSize - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/DgsMenuSetItemTextSize?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsMenuSetItemTextSize&amp;action=history"/>
	<updated>2026-05-04T07:45:45Z</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=DgsMenuSetItemTextSize&amp;diff=82212&amp;oldid=prev</id>
		<title>Mohab: Created page with &quot;{{Client function}} __NOTOC__ This function sets the text size of a specific menu item.  ==Syntax== &lt;syntaxhighlight lang=&quot;lua&quot;&gt; bool dgsMenuSetItemTextSize ( element menu, int uniqueID, float textSizeX [, float textSizeY ] ) &lt;/syntaxhighlight&gt;  ===Required Arguments=== *'''menu:''' The DGS menu element containing the item *'''uniqueID:''' The unique ID of the menu item (returned by dgsMenuAddItem) *'''textSizeX:''' The horizontal scale of the text  ===Optional Argum...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsMenuSetItemTextSize&amp;diff=82212&amp;oldid=prev"/>
		<updated>2025-07-10T05:59:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Client function}} __NOTOC__ This function sets the text size of a specific menu item.  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool dgsMenuSetItemTextSize ( element menu, int uniqueID, float textSizeX [, float textSizeY ] ) &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;) *&amp;#039;&amp;#039;&amp;#039;textSizeX:&amp;#039;&amp;#039;&amp;#039; The horizontal scale of the text  ===Optional Argum...&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 sets 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;
bool dgsMenuSetItemTextSize ( element menu, int uniqueID, float textSizeX [, float textSizeY ] )&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;
*'''textSizeX:''' The horizontal scale of the text&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''textSizeY:''' The vertical scale of the text. If not specified, textSizeX is used for both dimensions&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the text size was set successfully, ''false'' otherwise.&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 different text sizes&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;
local item3 = dgsMenuAddItem(menu, &amp;quot;Small Text&amp;quot;, &amp;quot;small&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
-- Set different text sizes for each item&lt;br /&gt;
dgsMenuSetItemTextSize(menu, item1, 1.0)        -- Normal size&lt;br /&gt;
dgsMenuSetItemTextSize(menu, item2, 1.5)        -- Large text&lt;br /&gt;
dgsMenuSetItemTextSize(menu, item3, 0.8, 0.8)   -- Small text&lt;br /&gt;
&lt;br /&gt;
-- Show the menu&lt;br /&gt;
dgsMenuShow(menu)&lt;br /&gt;
&lt;br /&gt;
-- Handle menu selections&lt;br /&gt;
addEventHandler(&amp;quot;onDgsMenuSelect&amp;quot;, menu, function(subMenu, uniqueID)&lt;br /&gt;
    if uniqueID == -1 then return end&lt;br /&gt;
    &lt;br /&gt;
    local command = dgsMenuGetItemCommand(source, uniqueID)&lt;br /&gt;
    outputChatBox(&amp;quot;Selected: &amp;quot; .. command)&lt;br /&gt;
    dgsMenuHide(source)&lt;br /&gt;
end, false)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
*[[dgsMenuGetItemTextSize]]&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>