<?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=Tasty</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=Tasty"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Tasty"/>
	<updated>2026-04-26T02:52:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:DGS&amp;diff=75282</id>
		<title>Resource:DGS</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:DGS&amp;diff=75282"/>
		<updated>2022-07-14T21:35:22Z</updated>

		<summary type="html">&lt;p&gt;Tasty: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pageclass class=&amp;quot;resource&amp;quot; subcaption=&amp;quot;Resource&amp;quot;&amp;gt;&amp;lt;/pageclass&amp;gt;&lt;br /&gt;
[[Image:DGS_Logo.png|400px|thumb|right|DGS Logo By [[User:Allerek|Allerek]]]]&lt;br /&gt;
This resource is designed to allow you to create directX GUI's as an alternative to the original MTA:SA GUI functions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#DD2222;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;This wiki is always for the latest DGS version!&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;padding:10px; border-radius:2px;font-size:14px;&amp;quot;&amp;gt;&lt;br /&gt;
'''Full Name''': Thisdp's DirectX Graphical User Interface System (DxGUI Lib)&lt;br /&gt;
&lt;br /&gt;
'''Developer Team''': [[User:thisdp|thisdp]], [[User:XNawaf|xLive]], KronoS Lettify, [𝐓𝐅] 𝓣𝓗𝓔 𝓕𝓘𝓧𝓔𝓡&lt;br /&gt;
&lt;br /&gt;
'''State''': &amp;lt;span style=&amp;quot;color:#FFFFFF;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;OpenSource&amp;lt;/span&amp;gt; &amp;amp; &amp;lt;span style=&amp;quot;color:#55FF55;text-shadow:black 0em 0em 0.3em;&amp;quot;&amp;gt;Work in progress&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GitHub Source''': https://github.com/thisdp/dgs/tree/master&lt;br /&gt;
&lt;br /&gt;
'''Server Discord''': https://discord.gg/QEs8q6W&lt;br /&gt;
&lt;br /&gt;
'''Current Version''': 3.517&lt;br /&gt;
&lt;br /&gt;
'''Update Log''': [[DGS Updates Log|Changes and Updates Log]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Auto Completion &amp;amp; Syntax  Highlight'''&lt;br /&gt;
&lt;br /&gt;
Official:&lt;br /&gt;
&lt;br /&gt;
Use the following command in server console to crawl and generate the latest auto completion (Only support NotePad++/Sublime/VSCode).&lt;br /&gt;
*'''g2d -crawl npp/sublime/vscode'''&lt;br /&gt;
&lt;br /&gt;
Or you can use the following link to download completed files instead of crawling by yourself.&lt;br /&gt;
*[https://drive.google.com/file/d/1H_PiG2gmEz1AyXqZN4956IVgtZOjgMi6/view?usp=sharing NotePad++]&lt;br /&gt;
*[https://drive.google.com/file/d/1_07WBEWjriTTucrNGI7jT-4SknALKG6B/view?usp=sharing Sublime]&lt;br /&gt;
*[https://drive.google.com/file/d/1J4qoSjzmXZz7yxHUZ2fExBu3zvCwRESn/view?usp=sharing VSCode]&lt;br /&gt;
&lt;br /&gt;
3rd Party Auto Completion:&lt;br /&gt;
*1. [http://www.mediafire.com/file/m6dm7815d5dihax/lua.zip NotePad++ By '''Ahmed Ly''']&lt;br /&gt;
*2. [https://marketplace.visualstudio.com/items?itemName=ERAGON.mtasa-dgs-lua Visual Studio Code By '''BW~ERAGON &amp;gt;''' ]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
&lt;br /&gt;
[[Image:DGSNetStatus.png|300px|thumb|right|DGS Network Monitor]]&lt;br /&gt;
&lt;br /&gt;
[[Image:DGSS.png|400px|thumb|right|]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How does it work?'''&lt;br /&gt;
*DGS is based on [[element]] system, which just likes the cegui system. To make DGS easier to use and understand, I choose to follow the usage of cegui's.&lt;br /&gt;
*DGS supports OOP syntax, if you don't like POP, then use OOP instead. But you should know that OOP is slower than POP.&lt;br /&gt;
*DGS elements are rendered in the event &amp;quot;onClientRender&amp;quot;. When &amp;quot;onClientRender&amp;quot; is called, every DGS elements will be looped and calculated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What's different from cegui?'''&lt;br /&gt;
*This resource is based on dx* functions, so its style will be more flexible than cegui, which means you can define the style by yourself.&lt;br /&gt;
*The latest '''Style System''' enables developer to define their own style such as changing color, loading images and even loading shaders with dgs elements on the server instead of using a lot of [[dgsSetProperty]]/[[dgsSetProperties]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Update System'''&lt;br /&gt;
*It have an update system that can inform you of keeping your DGS latest.&lt;br /&gt;
*When a newer version has been released, it will detecte the version changing periodically and then notice you.&lt;br /&gt;
*Execute command &amp;quot;'''updatedgs'''&amp;quot; to check the least version and update your DGS.&lt;br /&gt;
*Also, you can check the version of DGS by inputting the command &amp;quot;dgsver&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''You Should Know'''&lt;br /&gt;
*This project was started from 2014.&lt;br /&gt;
*Some of DGS elements use '''Render Target''', which means if you don't have enough video memory, '''Render Target won't be created''', and therefore those dgs elements won't be shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dx_7.PNG|400px|thumb|right|Example DGS Cmd]] &lt;br /&gt;
&lt;br /&gt;
'''Examples scripts'''&lt;br /&gt;
*1.https://community.multitheftauto.com/index.php?p=resources&amp;amp;s=details&amp;amp;id=14757 By ([[User:Ahmed Ly|Ahmed Ly]] ,Mahmod Algeriany)&lt;br /&gt;
*2. Also File test.lua its have more Examples You can See it .&lt;br /&gt;
*3. This Video show you how to play a video by using Dgs https://www.youtube.com/watch?v=ZIq24zS5byI&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Debug'''&lt;br /&gt;
* You can enter the debug mode by executing the command &amp;quot;'''debugdgs'''&amp;quot;.&lt;br /&gt;
* &amp;quot;'''debugdgs'''&amp;quot;: Simple debug mode. For basic information.&lt;br /&gt;
* &amp;quot;'''debugdgs 2 '''&amp;quot;: Render debug mode. To see dgs elements' scale with a rainbow border&lt;br /&gt;
* &amp;quot;'''debugdgs 3 '''&amp;quot;: Tracing debug mode. To trace something for example where the dgs elements' were created, and the tracing mode of some functions will be enabled to show the detail.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Notice'''&lt;br /&gt;
*It is recommended to change the resource name to 'dgs'.&lt;br /&gt;
*This is a resource, if you want to use the functions exported by this resource,  you should use an exported function prefix ('''exports.dgs:''') call in your code, such as&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
label = exports.dgs:dgsCreateLabel(0, 0, 0.5, 0.1, &amp;quot;text&amp;quot;, true)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*Here is a feasible way to shorten the name of an exported function:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs --shorten the export function prefix&lt;br /&gt;
label = DGS:dgsCreateLabel(0,0,0.5,0.1,&amp;quot;text&amp;quot;,true) --create a label&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*From the latest version, it no longer needs '''exports.dgs:''', instead we can do&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;
label = dgsCreateLabel(0,0,0.5,0.1,&amp;quot;text&amp;quot;,true) --create a label&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Object Oriented Programming'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
loadstring(exports.dgs:dgsImportOOPClass(true))()-- load OOP class&lt;br /&gt;
window = dgsWindow(0,0,0.5,0.1,&amp;quot;test&amp;quot;,true) --create a window with oop&lt;br /&gt;
label = window:dgsLabel(0,0,1,1,&amp;quot;label&amp;quot;,true) --create a label inside the window&lt;br /&gt;
label.text = &amp;quot;DGS OOP Test&amp;quot; --set text&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Special thanks to the following for their help (Respect the contributors)''':&lt;br /&gt;
* Axel, Senpai, ZoNe&lt;br /&gt;
* DiGiTal, #Dv^, maksam07&lt;br /&gt;
* Scorpyo, Kingleonide, Bullet(.el3tar)&lt;br /&gt;
* Allerek, Deihim007, OmarSwaitti(HankVoight)&lt;br /&gt;
* FlyingFork, Lettify, Ahmed Ly&lt;br /&gt;
* ᴛᴇᴍᴏɪꜱ&lt;br /&gt;
&lt;br /&gt;
='''DGS Tips'''=&lt;br /&gt;
*[[DGS Events and GUI Events]]&lt;br /&gt;
*[[DGS Functions and GUI Functions]]&lt;br /&gt;
*[[DGS Grid List]]&lt;br /&gt;
*[[DGS OOP Class]]&lt;br /&gt;
*[[DGS Custom Plugin]]&lt;br /&gt;
*[[DGS Style System]]&lt;br /&gt;
*[[G2D|DGS GUI To DGS]]&lt;br /&gt;
&lt;br /&gt;
='''DGS Element Properties'''=&lt;br /&gt;
{{DGSPROPERTIES}}&lt;br /&gt;
&lt;br /&gt;
='''Client Functions'''=&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;br /&gt;
&lt;br /&gt;
=Client Events=&lt;br /&gt;
{{DGSEVENTS}}&lt;br /&gt;
&lt;br /&gt;
=Last=&lt;br /&gt;
'''Everyone is welcome to make suggestions, test the script, help make adjustments/finish the wiki, etc.'''&lt;br /&gt;
[[Category:Resource]]&lt;br /&gt;
&lt;br /&gt;
[[ar:Dgs]]&lt;br /&gt;
[[ZH-CN:Dgs]]&lt;br /&gt;
[[PL:Dgs]]&lt;/div&gt;</summary>
		<author><name>Tasty</name></author>
	</entry>
</feed>