<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/Astrath:createShape?action=history&amp;feed=atom</id>
	<title>Astrath:createShape - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/Astrath:createShape?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Astrath:createShape&amp;action=history"/>
	<updated>2026-05-07T14:33: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=Astrath:createShape&amp;diff=82566&amp;oldid=prev</id>
		<title>Sybellex: Created page with &quot;= DxShape:new =  {{Client function}} {{FuncDef|element DxShape:new ( float posX, float posY, float width, float height, element parent, boolean relative, table color )}}  '''Description:''' Creates a new DX-based shape element. Shapes can have custom colors, hover effects, and rounded corners. Each shape instance is automatically registered in the DX library.  '''Parameters:''' * posX, posY (float) – Position on screen. * width, height (float) – Size of the shape. *...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Astrath:createShape&amp;diff=82566&amp;oldid=prev"/>
		<updated>2025-10-22T20:17:10Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= DxShape:new =  {{Client function}} {{FuncDef|element DxShape:new ( float posX, float posY, float width, float height, element parent, boolean relative, table color )}}  &amp;#039;&amp;#039;&amp;#039;Description:&amp;#039;&amp;#039;&amp;#039; Creates a new DX-based shape element. Shapes can have custom colors, hover effects, and rounded corners. Each shape instance is automatically registered in the DX library.  &amp;#039;&amp;#039;&amp;#039;Parameters:&amp;#039;&amp;#039;&amp;#039; * posX, posY (float) – Position on screen. * width, height (float) – Size of the shape. *...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= DxShape:new =&lt;br /&gt;
&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{FuncDef|element DxShape:new ( float posX, float posY, float width, float height, element parent, boolean relative, table color )}}&lt;br /&gt;
&lt;br /&gt;
'''Description:'''&lt;br /&gt;
Creates a new DX-based shape element. Shapes can have custom colors, hover effects, and rounded corners. Each shape instance is automatically registered in the DX library.&lt;br /&gt;
&lt;br /&gt;
'''Parameters:'''&lt;br /&gt;
* posX, posY (float) – Position on screen.&lt;br /&gt;
* width, height (float) – Size of the shape.&lt;br /&gt;
* parent (element) – Parent DX element to attach this shape to (optional).&lt;br /&gt;
* relative (boolean) – Position relative to parent (optional).&lt;br /&gt;
* color (table / tocolor) – Main color of the shape (optional, default: grey).&lt;br /&gt;
&lt;br /&gt;
'''Returns:'''&lt;br /&gt;
: Returns the newly created DxShape element.&lt;br /&gt;
&lt;br /&gt;
'''Methods:'''&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%; border:none;&amp;quot;&lt;br /&gt;
! Method !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Ath:destroy() || Destroys the shape and all its child elements.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setVisible(boolean) || Shows or hides the shape.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setEnabled(boolean) || Enables or disables the shape for interaction.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setHoverable(boolean) || Enables or disables hover effect.&lt;br /&gt;
|-&lt;br /&gt;
| Ath:setColor(r, g, b, a, type) || Sets main or hover color of the shape.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local myShape = DxShape:new(100, 100, 200, 150)&lt;br /&gt;
myShape:setVisible(true)&lt;br /&gt;
myShape:setHoverable(true)&lt;br /&gt;
myShape:setColor(150, 150, 150, 255, &amp;quot;mainColor&amp;quot;)&lt;br /&gt;
myShape:draw()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''See also:'''&lt;br /&gt;
* [[Astrath]] – Main library page&lt;br /&gt;
* [[DxWindow:new]] – Page for window element reference&lt;br /&gt;
* [[DxLabel:new]] – Page for label element reference&lt;br /&gt;
* [[onClientRender]] – Event used to render DX elements&lt;/div&gt;</summary>
		<author><name>Sybellex</name></author>
	</entry>
</feed>