DgsSetFont: Difference between revisions
Jump to navigation
Jump to search
JavadOmidi (talk | contribs) No edit summary |
(DGS (OOP Syntax)/(Template Organization) Mission) |
||
Line 6: | Line 6: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool dgsSetFont( element dgsElement, mixed font ) | bool dgsSetFont( element dgsElement, mixed font ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DGS/OOP||DGSElement:setFont||font|dgsGetFont}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
Line 26: | Line 27: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=See Also= | |||
{{ | |||
==<span style="color:#eb3f00;text-shadow:0.05em 0.05em 0.2em #00000099;">General Functions</span>== | |||
{{DGS General Functions}} | |||
==<span style="color:#eb3f00;text-shadow:0.05em 0.05em 0.2em #00000099;">General Events</span>== | |||
{{DGS Events/General}} |
Revision as of 18:13, 19 April 2021
This function sets the font of a dgs element to be used when drawing text. a dgs font can be affected by dgsSetSystemFont
Syntax
bool dgsSetFont( element dgsElement, mixed font )
DGS OOP Syntax Help! I don't understand this!
Required Arguments
- dgsElement: The DGS element you wish to change the font of
- font: Either a custom dx font element or the name of a built-in dx font (see here Standard_DGS_Font_Names)
Returns
Returns true if the font has been successfully set on the dgs element, false otherwise.
Example
This example sets and gets the font of a pre-made gui element and outputs it to chat box.
DGS = exports.dgs -- We create a dummy gui label to get text of local dummyGUIElement = DGS:dgsCreateLabel ( 0.45, 0.48, 0.10, 0.04, "Hello world", true ) DGS:dgsSetFont ( dummyGUIElement, "clear" ) -- Output the font of the label to chat box outputChatBox ( "Font used in the DGS label: " .. DGS:dgsGetFont ( dummyGuiElement ) )
See Also
General Functions
- dgsGetPosition
- dgsSetPosition
- dgsSetParent
- dgsGetParent
- dgsGetChild
- dgsGetChildren
- dgsGetSize
- dgsSetSize
- dgsGetType
- dgsSetLayer
- dgsGetLayer
- dgsSetCurrentLayerIndex
- dgsGetCurrentLayerIndex
- dgsGetLayerElements
- dgsGetProperty
- dgsSetProperty
- dgsSetPropertyInherit
- dgsGetProperties
- dgsSetProperties
- dgsGetVisible
- dgsSetVisible
- dgsGetEnabled
- dgsSetEnabled
- dgsGetPositionAlignment
- dgsSetPositionAlignment
- dgsGetAlpha
- dgsSetAlpha
- dgsGetFont
- dgsSetFont
- dgsGetText
- dgsSetText
- dgsGetPostGUI
- dgsSetPostGUI
- dgsGetInputEnabled
- dgsSetInputEnabled
- dgsGetInputMode
- dgsSetInputMode
- dgsAttachToAutoDestroy
- dgsDetachFromAutoDestroy
- dgsFocus
- dgsBlur
- dgsCreateFont
- dgsBringToFront
- dgsMoveToBack
- dgsGetScreenSize
- dgsGetCursorPosition
- dgsGetMouseEnterGUI
- dgsGetMouseLeaveGUI
- dgsIsMouseWithinGUI
- dgsSetSystemFont
- dgsGetSystemFont
- dgsGetElementsInLayer
- dgsGetElementsFromResource
- dgsGetFocusedGUI
- dgsImportFunction
- dgsImportOOPClass
- dgsG2DLoadHooker
- dgsSetRenderSetting
- dgsGetRenderSetting
- dgsSimulateClick
- dgsGetRootElement
- dgsAddMoveHandler
- dgsRemoveMoveHandler
- dgsIsMoveHandled
- dgsAddSizeHandler
- dgsRemoveSizeHandler
- dgsIsSizeHandled
- dgsAttachElements
- dgsDetachElements
- dgsElementIsAttached
- dgsAddPropertyListener
- dgsRemovePropertyListener
- dgsGetListenedProperties
- dgsSetMultiClickInterval
- dgsGetMultiClickInterval
- dgsSetMouseStayDelay
- dgsGetMouseStayDelay
- dgsCenterElement
- dgsSetElementKeeperEnabled
- dgsGetElementKeeperEnabled
- dgsSetClickingSound
- dgsGetClickingSound
- dgsSetClickingSoundVolume
- dgsGetClickingSoundVolume
General Events
- onDgsBlur
- onDgsCreate
- onDgsCursorTypeChange
- onDgsCursorStateChange
- onDgsDestroy
- onDgsElementRender
- onDgsElementMove
- onDgsElementSize
- onDgsElementEnter
- onDgsElementLeave
- onDgsFocus
- onDgsKey
- onDgsPositionChange
- onDgsPreRender
- onDgsRender
- onDgsElementScroll
- onDgsSizeChange
- onDgsTextChange
- onDgsWindowClose
- onDgsPropertyChange