Astrath: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Resource Astrath)
 
Line 1: Line 1:
= Astrath =
= Astrath =
''Astrath'' is a DirectX framework for MTA:SA developed by '''Magath'''.   
''Astrath'' is a DirectX framework for MTA:SA developed by '''Magath'''.   
It provides a simplified API for drawing custom interfaces, animations, and other DX-based visuals.
It provides tools to create custom interfaces, animations, and other DX-based visuals.
 
== Functions ==
=== Client functions ===
* [[#Astrath:createWindow|Astrath:createWindow]]
* [[#Astrath:drawImage|Astrath:drawImage]]
* [[#Astrath:animateText|Astrath:animateText]]
 
== Function Reference ==
 
=== Astrath:createWindow ===
{{FuncDef|element Astrath:createWindow ( float x, float y, float width, float height, string title )}}
Creates a new DX-based window element.
 
'''Returns:'''
: Returns an element representing the window.
 
'''Example:'''
<syntaxhighlight lang="lua">
local win = Astrath:createWindow(200, 200, 300, 200, "Example Window")
Astrath:show(win, true)
</syntaxhighlight>
 
---
 
=== Astrath:drawImage ===
{{FuncDef|bool Astrath:drawImage ( float x, float y, float w, float h, string path [, int color = 0xFFFFFFFF ] )}}
Draws a DX image on screen.
 
'''Returns:'''
: Returns true if successful, false otherwise.


'''Example:'''
== Client Functions ==
<syntaxhighlight lang="lua">
* [[Astrath:createWindow]] – Creates a new DX-based window element
Astrath:drawImage(100, 100, 128, 128, "img/logo.png")
* [[Astrath:drawImage]] – Draws an image on screen
</syntaxhighlight>
* [[Astrath:animateText]] – Animate text dynamically


---
== Server Functions ==
* [[Astrath:loadResources]] – Load resources or assets on server


== See Also ==
== See Also ==

Revision as of 18:48, 22 October 2025

Astrath

Astrath is a DirectX framework for MTA:SA developed by Magath. It provides tools to create custom interfaces, animations, and other DX-based visuals.

Client Functions

Server Functions

See Also