Dgs-dx3dtext: Difference between revisions
(7 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
==Properties== | ==Properties== | ||
===alignment=== | |||
Alignment of the text within the 3d text. | |||
<syntaxhighlight lang="lua">dgsSetProperty(text3D,"alignment",{alignX,alignY})</syntaxhighlight> | |||
*'''alignX''' : Horizontal alignment of the text within the 3d text. Can be "left", "center" or "right". | |||
*'''alignY''' : Vertical alignment of the text within the 3d text. Can be "top", "center" or "bottom". | |||
===canBeBlocked=== | |||
This property determines what can block the 3d text, see [[isLineOfSightClear]]. | |||
<syntaxhighlight lang="lua">dgsSetProperty(text3D,"canBeBlocked",canBeBlocked)</syntaxhighlight> | |||
*'''canBeBlocked:''' A table or bool that determines what can block the 3d text, available options are as follows: | |||
**'''true:''' Everything can block the 3d text. | |||
**'''false:''' Nothing can block the 3d text. | |||
**''table'' has following keys: | |||
***'''checkBuildings:''' Allow the line of sight to be blocked by GTA's internally placed buildings, i.e. the world map. | |||
***'''checkVehicles:''' Allow the line of sight to be blocked by [[Vehicle|vehicles]]. | |||
***'''checkPeds:''' Allow the line of sight to be blocked by peds, i.e. [[Player|players]]. | |||
***'''checkObjects:''' Allow the line of sight to be blocked by [[Object|objects]]. | |||
***'''checkDummies:''' Allow the line of sight to be blocked by GTA's internal dummies. These are not used in the current MTA version so this argument can be set to ''false''. | |||
***'''seeThroughStuff:''' Allow the line of sight to '''pass through''' collision materials that have this flag enabled (By default material IDs 52, 55 and 66 which are some fences). This flag originally allows some objects to be walked on but you can shoot throug them. | |||
***'''ignoreSomeObjectsForCamera:''' Allow the line of sight to '''pass through''' objects that have (K) property enabled in "object.dat" data file. (i.e. Most dynamic objects like boxes or barrels) | |||
===color=== | ===color=== | ||
The color which can be translated by [[tocolor]] of the dx 3d text. | The color which can be translated by [[tocolor]] of the dx 3d text. | ||
<syntaxhighlight lang="lua">dgsSetProperty( | <syntaxhighlight lang="lua">dgsSetProperty(text3D,"color",color)</syntaxhighlight> | ||
*'''color:''' An integer of the color of the dx 3d text. | *'''color:''' An integer of the color of the dx 3d text. | ||
===dimension=== | ===dimension=== | ||
The dimension of dx 3d text. Players can't see the dx 3d text in different dimensions. | The dimension of dx 3d text. Players can't see the dx 3d text in different dimensions. | ||
<syntaxhighlight lang="lua">dgsSetProperty( | <syntaxhighlight lang="lua">dgsSetProperty(text3D,"dimension",dimension)</syntaxhighlight> | ||
*'''dimension:''' An integer of the dimension of dx 3d text. | *'''dimension:''' An integer of the dimension of dx 3d text. | ||
===fadeDistance=== | ===fadeDistance=== | ||
The distance of which 3D text starts to fading. | The distance of which 3D text starts to fading. | ||
<syntaxhighlight lang="lua">dgsSetProperty( | <syntaxhighlight lang="lua">dgsSetProperty(text3D,"fadeDistance",fadeDistance)</syntaxhighlight> | ||
*'''fadeDistance:''' A float of the fade distance. | *'''fadeDistance:''' A float of the fade distance. | ||
===fixTextSize=== | ===fixTextSize=== | ||
This property keeps the text size on screen rather than let the text size change with distance. | This property keeps the text size on screen rather than let the text size change with distance. | ||
<syntaxhighlight lang="lua">dgsSetProperty( | <syntaxhighlight lang="lua">dgsSetProperty(text3D,"fixTextSize",fixTextSize)</syntaxhighlight> | ||
*'''fixTextSize:''' A bool of whether fix the text size. | *'''fixTextSize:''' A bool of whether fix the text size. | ||
===font=== | ===font=== | ||
This is equivalent to [[dgsSetFont]]/[[dgsGetFont]]. ''Learn More [[dxDrawText]]'' | This is equivalent to [[dgsSetFont]]/[[dgsGetFont]]. ''Learn More [[dxDrawText]]'' | ||
<syntaxhighlight lang="lua">dgsSetProperty( | <syntaxhighlight lang="lua">dgsSetProperty(text3D,"font",font)</syntaxhighlight> | ||
*'''font''' : A string or a [[Element/DX_font|dx font element]] of the text font of the dx 3d text. | *'''font''' : A string or a [[Element/DX_font|dx font element]] of the text font of the dx 3d text. | ||
===interior=== | ===interior=== | ||
The interior of dx 3d text. Players can't see the dx 3d text in different interiors. | The interior of dx 3d text. Players can't see the dx 3d text in different interiors. | ||
<syntaxhighlight lang="lua">dgsSetProperty( | <syntaxhighlight lang="lua">dgsSetProperty(text3D,"interior",interior)</syntaxhighlight> | ||
*'''interior:''' An integer of the interior of dx 3d text. | *'''interior:''' An integer of the interior of dx 3d text. | ||
===isBlocked=== | |||
This property indicates whether the 3d text is blocked or not, which is only recommended to read. | |||
<syntaxhighlight lang="lua">dgsSetProperty(text3D,"isBlocked",isBlocked)</syntaxhighlight> | |||
*'''isBlocked:''' A bool value indicates whether the 3d text is blocked. | |||
===isOnScreen=== | |||
This property indicates whether the 3d text is on screen or not, which is only recommended to read. | |||
<syntaxhighlight lang="lua">dgsSetProperty(text3D,"isOnScreen",isOnScreen)</syntaxhighlight> | |||
*'''isOnScreen:''' A bool value indicates whether the 3d text is on screen. | |||
===maxDistance=== | ===maxDistance=== | ||
The maximum visible distance in the world. | The maximum visible distance in the world. | ||
<syntaxhighlight lang="lua">dgsSetProperty( | <syntaxhighlight lang="lua">dgsSetProperty(text3D,"maxDistance",maxDistance)</syntaxhighlight> | ||
*'''maxDistance:''' A float of the distance. | *'''maxDistance:''' A float of the distance. | ||
===text=== | |||
This property stores the text of 3d text. | |||
<syntaxhighlight lang="lua">dgsSetProperty(text3D,"text",text)</syntaxhighlight> | |||
*'''text''' : A string of the text of 3d text | |||
===textOffset=== | |||
The offset of the 3d text. | |||
<syntaxhighlight lang="lua">dgsSetProperty(text3D,"textOffset",{offsetX,offsetY})</syntaxhighlight> | |||
*'''offsetX''' : A float of the 2D X offset relative to the position of the 3d text. | |||
*'''offsetY''' : A float of the 2D Y offset relative to the position of the 3d text. | |||
===textSize=== | ===textSize=== | ||
The scale of the text of the dx 3d text. ''Learn More [[dxDrawText]]'' | The scale of the text of the dx 3d text. ''Learn More [[dxDrawText]]'' | ||
<syntaxhighlight lang="lua">dgsSetProperty( | <syntaxhighlight lang="lua">dgsSetProperty(text3D,"textSize",{scaleX,scaleY})</syntaxhighlight> | ||
*'''scaleX''' : A float of the 2D X scale of the text of the dx 3d text. | *'''scaleX''' : A float of the 2D X scale of the text of the dx 3d text. | ||
*'''scaleY''' : A float of the 2D Y scale of the text of the dx 3d text. | *'''scaleY''' : A float of the 2D Y scale of the text of the dx 3d text. | ||
Line 51: | Line 93: | ||
===position=== | ===position=== | ||
A table stores x,y,z coordinate of the dx 3d text in the world. | A table stores x,y,z coordinate of the dx 3d text in the world. | ||
<syntaxhighlight lang="lua">dgsSetProperty( | <syntaxhighlight lang="lua">dgsSetProperty(text3D,"position",{x,y,z})</syntaxhighlight> | ||
*'''x:''' The x coordinate of the destination. | *'''x:''' The x coordinate of the destination. | ||
*'''y:''' The y coordinate of the destination. | *'''y:''' The y coordinate of the destination. |
Latest revision as of 06:49, 9 December 2021
DGS Properties is always used to change the gui style and make it more fantastic.
This page shows the properties of dgs-dx3dtext that you could use.
Main Functions
Properties
alignment
Alignment of the text within the 3d text.
dgsSetProperty(text3D,"alignment",{alignX,alignY})
- alignX : Horizontal alignment of the text within the 3d text. Can be "left", "center" or "right".
- alignY : Vertical alignment of the text within the 3d text. Can be "top", "center" or "bottom".
canBeBlocked
This property determines what can block the 3d text, see isLineOfSightClear.
dgsSetProperty(text3D,"canBeBlocked",canBeBlocked)
- canBeBlocked: A table or bool that determines what can block the 3d text, available options are as follows:
- true: Everything can block the 3d text.
- false: Nothing can block the 3d text.
- table has following keys:
- checkBuildings: Allow the line of sight to be blocked by GTA's internally placed buildings, i.e. the world map.
- checkVehicles: Allow the line of sight to be blocked by vehicles.
- checkPeds: Allow the line of sight to be blocked by peds, i.e. players.
- checkObjects: Allow the line of sight to be blocked by objects.
- checkDummies: Allow the line of sight to be blocked by GTA's internal dummies. These are not used in the current MTA version so this argument can be set to false.
- seeThroughStuff: Allow the line of sight to pass through collision materials that have this flag enabled (By default material IDs 52, 55 and 66 which are some fences). This flag originally allows some objects to be walked on but you can shoot throug them.
- ignoreSomeObjectsForCamera: Allow the line of sight to pass through objects that have (K) property enabled in "object.dat" data file. (i.e. Most dynamic objects like boxes or barrels)
color
The color which can be translated by tocolor of the dx 3d text.
dgsSetProperty(text3D,"color",color)
- color: An integer of the color of the dx 3d text.
dimension
The dimension of dx 3d text. Players can't see the dx 3d text in different dimensions.
dgsSetProperty(text3D,"dimension",dimension)
- dimension: An integer of the dimension of dx 3d text.
fadeDistance
The distance of which 3D text starts to fading.
dgsSetProperty(text3D,"fadeDistance",fadeDistance)
- fadeDistance: A float of the fade distance.
fixTextSize
This property keeps the text size on screen rather than let the text size change with distance.
dgsSetProperty(text3D,"fixTextSize",fixTextSize)
- fixTextSize: A bool of whether fix the text size.
font
This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText
dgsSetProperty(text3D,"font",font)
- font : A string or a dx font element of the text font of the dx 3d text.
interior
The interior of dx 3d text. Players can't see the dx 3d text in different interiors.
dgsSetProperty(text3D,"interior",interior)
- interior: An integer of the interior of dx 3d text.
isBlocked
This property indicates whether the 3d text is blocked or not, which is only recommended to read.
dgsSetProperty(text3D,"isBlocked",isBlocked)
- isBlocked: A bool value indicates whether the 3d text is blocked.
isOnScreen
This property indicates whether the 3d text is on screen or not, which is only recommended to read.
dgsSetProperty(text3D,"isOnScreen",isOnScreen)
- isOnScreen: A bool value indicates whether the 3d text is on screen.
maxDistance
The maximum visible distance in the world.
dgsSetProperty(text3D,"maxDistance",maxDistance)
- maxDistance: A float of the distance.
text
This property stores the text of 3d text.
dgsSetProperty(text3D,"text",text)
- text : A string of the text of 3d text
textOffset
The offset of the 3d text.
dgsSetProperty(text3D,"textOffset",{offsetX,offsetY})
- offsetX : A float of the 2D X offset relative to the position of the 3d text.
- offsetY : A float of the 2D Y offset relative to the position of the 3d text.
textSize
The scale of the text of the dx 3d text. Learn More dxDrawText
dgsSetProperty(text3D,"textSize",{scaleX,scaleY})
- scaleX : A float of the 2D X scale of the text of the dx 3d text.
- scaleY : A float of the 2D Y scale of the text of the dx 3d text.
position
A table stores x,y,z coordinate of the dx 3d text in the world.
dgsSetProperty(text3D,"position",{x,y,z})
- x: The x coordinate of the destination.
- y: The y coordinate of the destination.
- z: The z coordinate of the destination.
See Also
General Properties
Unique Properties For DGS Core Elements
- dgs-dx3dinterface
- dgs-dx3dimage
- dgs-dx3dtext
- dgs-dx3dline
- dgs-dxbutton
- dgs-dxcheckbox
- dgs-dxcombobox
- dgs-dxdetectarea
- dgs-dxedit
- dgs-dxgridlist
- dgs-dximage
- dgs-dxlabel
- dgs-dxline
- dgs-dxmemo
- dgs-dxprogressbar
- dgs-dxradiobutton
- dgs-dxscrollbar
- dgs-dxscrollpane
- dgs-dxselector
- dgs-dxswitchbutton
- dgs-dxtabpanel
- dgs-dxtab
- dgs-dxwindow