setScriptGfxAlign
SET_SCRIPT_GFX_ALIGN0xB8A850F20A067EB6The GTA V native SET_SCRIPT_GFX_ALIGN of the GRAPHICS namespace, as LS:MP client scripts call it: the global function setScriptGfxAlign, in JavaScript and in Lua.
setScriptGfxAlign(horizontalAlign: number, verticalAlign: number): voidsetScriptGfxAlign(horizontalAlign: integer, verticalAlign: integer)Usage
setScriptGfxAlign(horizontalAlign, verticalAlign);setScriptGfxAlign(horizontalAlign, verticalAlign)Parameters
| Parameter | Type | JavaScript | Lua | Description |
|---|---|---|---|---|
horizontalAlign | int | number | integer | The horizontal alignment. This can be 67 ('C'), 76 ('L'), or 82 ('R'). |
verticalAlign | int | number | integer | The vertical alignment. This can be 67 ('C'), 66 ('B'), or 84 ('T'). |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
This function anchors script draws to a side of the safe zone. This needs to be called to make the interface independent of the player's safe zone configuration.
These values are equivalent to alignX and alignY in common:/data/ui/frontend.xml, which can be used as a baseline for default alignment.
Using any other value (including 0) will result in the safe zone not being taken into account for this draw. The canonical value for this is 'I' (73).
For example, you can use setScriptGfxAlign(0, 84) to only scale on the Y axis (to the top), but not change the X axis.
To reset the value, use resetScriptGfxAlign.
Reference
- Namespace
- Graphics GRAPHICS
- In the game
void SET_SCRIPT_GFX_ALIGN(int horizontalAlign, int verticalAlign)- Hash
0xB8A850F20A067EB6- Formerly
_SET_SCREEN_DRAW_POSITION_SCREEN_DRAW_POSITION_BEGIN