Dgs-dxwindow: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(8 intermediate revisions by the same user not shown)
Line 20: Line 20:
*'''alignY:''' Vertical alignment of the title text of the window. Can be "top", "center" or "bottom".
*'''alignY:''' Vertical alignment of the title text of the window. Can be "top", "center" or "bottom".


===image===
===borderSize===
The texture element(texture/render target/screen source/shader etc) of the background of the window.
This property determines the border size in pixels which is used to resize the window.
<syntaxhighlight lang="lua">dgsSetProperty(window,"image",image)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(window,"borderSize",borderSize)</syntaxhighlight>
*'''image:''' A texture element of the background of the window.
*'''borderSize:''' An integer of the size of the border of the window in pixels.


===color===
===color===
Line 30: Line 30:
*'''color:''' An integer of the color of the background of the window.
*'''color:''' An integer of the color of the background of the window.


===textColor===
===colorcoded===
The color which can be translated by [[tocolor]] of the title text of the window.
Whether the color code in the title text is enabled or not. ''Learn More [[dxDrawText]]''
<syntaxhighlight lang="lua">dgsSetProperty(window,"textColor",textColor)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(window,"colorcoded",colorcoded)</syntaxhighlight>
*'''textColor:''' An integer of the color of the title text of the window.
*'''colorcoded:''' Set to true to enable embedded #FFFFFF color codes.
 
===titleColorBlur===
The color which can be translated by [[tocolor]] of the title of the window when the window is blurred.
<syntaxhighlight lang="lua">dgsSetProperty(window,"titleColorBlur",titleColorBlur)</syntaxhighlight>
*'''titleColorBlur:''' An integer of the color of the title of the blurred window.
 
===titleColor===
The color which can be translated by [[tocolor]] of the title of the window when the window is focused.
<syntaxhighlight lang="lua">dgsSetProperty(window,"titleColor",titleColor)</syntaxhighlight>
*'''titleColor:''' An integer of the color of the title of the focused window.
 
===titleImage===
The texture element(texture/render target/screen source/shader etc) of the title background of the window.
<syntaxhighlight lang="lua">dgsSetProperty(window,"titleImage",titleImage)</syntaxhighlight>
*'''titleImage:''' A texture element of the title background of the window.
 
===text===
This is equivalent to [[dgsSetText]]/[[dgsGetText]].
<syntaxhighlight lang="lua">dgsSetProperty(window,"text",text)</syntaxhighlight>
*'''text:''' A string of the title text of the window.
 
===textColor===
The color which can be translated by [[tocolor]] of the text of the window.
<syntaxhighlight lang="lua">dgsSetProperty(window,"textColor",textColor)</syntaxhighlight>
*'''textColor:''' An integer of the color of the title text of the window.
 
===textSize===
The scale of the text of the window. ''Learn More [[dxDrawText]]''
<syntaxhighlight lang="lua">dgsSetProperty(window,"textSize",{scaleX,scaleY})</syntaxhighlight>
*'''scaleX:''' A float of the 2D X scale of the title text of the window.
*'''scaleY:''' A float of the 2D Y scale of the title text of the window.


===font===
===font===
Line 71: Line 40:
*'''font:''' A [[Element/DX_font|dx font element]] of the title text font of the window.
*'''font:''' A [[Element/DX_font|dx font element]] of the title text font of the window.


===colorcoded===
===ignoreTitle===
Whether the color code in the title text is enabled or not. ''Learn More [[dxDrawText]]''
This property determines whether to ignore the window title when calculating window's child elements (useful for gui to dgs).
<syntaxhighlight lang="lua">dgsSetProperty(window,"colorcoded",colorcoded)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(window,"ignoreTitle",ignoreTitle)</syntaxhighlight>
*'''colorcoded:''' Set to true to enable embedded #FFFFFF color codes.
*'''ignoreTitle:''' A bool of the state of whether to ignore the window title.
 
===image===
The texture element(texture/render target/screen source/shader etc) of the background of the window.
<syntaxhighlight lang="lua">dgsSetProperty(window,"image",image)</syntaxhighlight>
*'''image:''' A texture element of the background of the window.
 
===maxSize===
This property determines the maximum width and height of the window that users can resize to.
<syntaxhighlight lang="lua">dgsSetProperty(window,"maxSize",{maxWidth,maxHeight})</syntaxhighlight>
*'''maxWidth:''' An integer of the maximum width of the window.
*'''maxHeight:''' An integer of the maximum height of the window.


===movetyp===
===minSize===
This property determines the moving type of the window.
This property determines the minimum width and height of the window that users can resize to.
<syntaxhighlight lang="lua">dgsSetProperty(window,"movetyp",movetyp)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(window,"minSize",{minWidth,minHeight})</syntaxhighlight>
*'''movetyp:''' A boolean value indicating the state of the moving type.
*'''minWidth:''' An integer of the minimum width of the window.
**'''true:''' User can move the window by clicking anywhere of the window.
*'''minHeight:''' An integer of the minimum height of the window.
**'''false:''' User can move the window by only clicking the title of the window.


===movable===
===movable===
Line 87: Line 66:
<syntaxhighlight lang="lua">dgsSetProperty(window,"movable",movable)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(window,"movable",movable)</syntaxhighlight>
*'''movable:''' A boolean value indicating whether user can move the window or not.
*'''movable:''' A boolean value indicating whether user can move the window or not.
===moveType===
This property determines the moving type of the window.
<syntaxhighlight lang="lua">dgsSetProperty(window,"moveType",moveType)</syntaxhighlight>
*'''moveType:''' A boolean value indicating the state of the moving type.
**'''true:''' User can move the window by clicking anywhere of the window.
**'''false:''' User can move the window by only clicking the title of the window.


===sizable===
===sizable===
Line 93: Line 79:
*'''movable:''' A boolean value indicating whether user can resize the window or not.
*'''movable:''' A boolean value indicating whether user can resize the window or not.


===minSize===
===text===
This property determines the minimum width and height of the window that users can resize to.
This is equivalent to [[dgsSetText]]/[[dgsGetText]].
<syntaxhighlight lang="lua">dgsSetProperty(window,"minSize",{minWidth,minHeight})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(window,"text",text)</syntaxhighlight>
*'''minWidth:''' An integer of the minimum width of the window.
*'''text:''' A string of the title text of the window.
*'''minHeight:''' An integer of the minimum height of the window.
 
===textColor===
The color which can be translated by [[tocolor]] of the title text of the window.
<syntaxhighlight lang="lua">dgsSetProperty(window,"textColor",textColor)</syntaxhighlight>
*'''textColor:''' An integer of the color of the title text of the window.
 
===textSize===
The scale of the '''title''' ''text'' of the window. ''Learn More [[dxDrawText]]''
<syntaxhighlight lang="lua">dgsSetProperty(window,"textSize",{scaleX,scaleY})</syntaxhighlight>
*'''scaleX:''' A float of the 2D X scale of the title text of the window.
*'''scaleY:''' A float of the 2D Y scale of the title text of the window.


===maxSize===
===titleColor===
This property determines the maximum width and height of the window that users can resize to.
The color which can be translated by [[tocolor]] of the '''title''' of the window when the window is '''focused''' ( For '''blurred''', see [[#titleColorBlur|titleColorBlur]] ).
<syntaxhighlight lang="lua">dgsSetProperty(window,"maxSize",{maxWidth,maxHeight})</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(window,"titleColor",titleColor)</syntaxhighlight>
*'''maxWidth:''' An integer of the maximum width of the window.
*'''titleColor:''' An integer of the color of the title of the focused window.
*'''maxHeight:''' An integer of the maximum height of the window.


===borderSize===
===titleColorBlur===
This property determines the border size in pixels which is used to resize the window.
The color which can be translated by [[tocolor]] of the title of the window when the window is '''blurred'''.
<syntaxhighlight lang="lua">dgsSetProperty(window,"borderSize",borderSize)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(window,"titleColorBlur",titleColorBlur)</syntaxhighlight>
*'''borderSize:''' An integer of the size of the border of the window in pixels.
*'''titleColorBlur:''' An integer of the color of the title of the blurred window. Set to ''nil'' to disable blur color.


===titleHeight===
===titleHeight===
Line 115: Line 110:
*'''titleHeight:''' An integer of the size of the title of the window in pixels.
*'''titleHeight:''' An integer of the size of the title of the window in pixels.


===ignoreTitle===
===titleImage===
This property determines whether to ignore the window title when calculating window's child elements (useful for gui to dgs).
The texture element(texture/render target/screen source/shader etc) of the title background of the window.
<syntaxhighlight lang="lua">dgsSetProperty(window,"ignoreTitle",ignoreTitle)</syntaxhighlight>
<syntaxhighlight lang="lua">dgsSetProperty(window,"titleImage",titleImage)</syntaxhighlight>
*'''ignoreTitle:''' A bool of the state of whether to ignore the window title.
*'''titleImage:''' A texture element of the title background of the window.


==See Also==
==See Also==
{{DGSPROPERTIES}}
{{DGSPROPERTIES}}

Revision as of 15:28, 4 March 2021

DGS Properties is always used to change the gui style and make it more fantastic.

This page shows the properties of dgs-dxwindow that you could use.

Main Functions

Properties

alignment

Alignment of the title text of the window.

The functions as follows are based on this property.

dgsWindowSetHorizontalAlign/dgsWindowGetHorizontalAlign

dgsWindowSetVerticalAlign/dgsWindowGetVerticalAlign

dgsSetProperty(window,"alignment",{alignX,alignY})
  • alignX: Horizontal alignment of the title text of the windowl. Can be "left", "center" or "right".
  • alignY: Vertical alignment of the title text of the window. Can be "top", "center" or "bottom".

borderSize

This property determines the border size in pixels which is used to resize the window.

dgsSetProperty(window,"borderSize",borderSize)
  • borderSize: An integer of the size of the border of the window in pixels.

color

The color which can be translated by tocolor of the background of the window.

dgsSetProperty(window,"color",color)
  • color: An integer of the color of the background of the window.

colorcoded

Whether the color code in the title text is enabled or not. Learn More dxDrawText

dgsSetProperty(window,"colorcoded",colorcoded)
  • colorcoded: Set to true to enable embedded #FFFFFF color codes.

font

This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText

dgsSetProperty(window,"font",font)

ignoreTitle

This property determines whether to ignore the window title when calculating window's child elements (useful for gui to dgs).

dgsSetProperty(window,"ignoreTitle",ignoreTitle)
  • ignoreTitle: A bool of the state of whether to ignore the window title.

image

The texture element(texture/render target/screen source/shader etc) of the background of the window.

dgsSetProperty(window,"image",image)
  • image: A texture element of the background of the window.

maxSize

This property determines the maximum width and height of the window that users can resize to.

dgsSetProperty(window,"maxSize",{maxWidth,maxHeight})
  • maxWidth: An integer of the maximum width of the window.
  • maxHeight: An integer of the maximum height of the window.

minSize

This property determines the minimum width and height of the window that users can resize to.

dgsSetProperty(window,"minSize",{minWidth,minHeight})
  • minWidth: An integer of the minimum width of the window.
  • minHeight: An integer of the minimum height of the window.

movable

This is equivalent to dgsWindowSetMovable, which allows you to specify whether or not a user can move a DGS window.

dgsSetProperty(window,"movable",movable)
  • movable: A boolean value indicating whether user can move the window or not.

moveType

This property determines the moving type of the window.

dgsSetProperty(window,"moveType",moveType)
  • moveType: A boolean value indicating the state of the moving type.
    • true: User can move the window by clicking anywhere of the window.
    • false: User can move the window by only clicking the title of the window.

sizable

This is equivalent to dgsWindowSetSizable, which allows you to specify whether or not a user can resize a DGS window.

dgsSetProperty(window,"sizable",sizable)
  • movable: A boolean value indicating whether user can resize the window or not.

text

This is equivalent to dgsSetText/dgsGetText.

dgsSetProperty(window,"text",text)
  • text: A string of the title text of the window.

textColor

The color which can be translated by tocolor of the title text of the window.

dgsSetProperty(window,"textColor",textColor)
  • textColor: An integer of the color of the title text of the window.

textSize

The scale of the title text of the window. Learn More dxDrawText

dgsSetProperty(window,"textSize",{scaleX,scaleY})
  • scaleX: A float of the 2D X scale of the title text of the window.
  • scaleY: A float of the 2D Y scale of the title text of the window.

titleColor

The color which can be translated by tocolor of the title of the window when the window is focused ( For blurred, see titleColorBlur ).

dgsSetProperty(window,"titleColor",titleColor)
  • titleColor: An integer of the color of the title of the focused window.

titleColorBlur

The color which can be translated by tocolor of the title of the window when the window is blurred.

dgsSetProperty(window,"titleColorBlur",titleColorBlur)
  • titleColorBlur: An integer of the color of the title of the blurred window. Set to nil to disable blur color.

titleHeight

This property determines the title size in pixels which is also used to move the window.

dgsSetProperty(window,"titleHeight",titleHeight)
  • titleHeight: An integer of the size of the title of the window in pixels.

titleImage

The texture element(texture/render target/screen source/shader etc) of the title background of the window.

dgsSetProperty(window,"titleImage",titleImage)
  • titleImage: A texture element of the title background of the window.

See Also

General Properties

Unique Properties For DGS Core Elements

Extra Properties For DGS Plugins