DgsAddSizeHandler: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Client function}} __NOTOC__ This function can make dgs element sizable like a window. '''Note: If applying size handler on dgs window, the original size handler will be rep...") |
(DGS (OOP Syntax)/(Template Organization) Mission) |
||
Line 7: | Line 7: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool dgsAddSizeHandler( element dgsElement [, float left = 0,float right = 0, float top = 0, float bottom = 0, bool relativeLeft = true, bool relativeRight = true, bool relativeTop = true, bool relativeBottom = true ] ) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DGS/OOP||DGSElement:addSizeHandler|||dgsRemoveSizeHandler}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
Line 33: | Line 34: | ||
</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:22, 3 May 2021
This function can make dgs element sizable like a window.
Note: If applying size handler on dgs window, the original size handler will be replaced.
Syntax
bool dgsAddSizeHandler( element dgsElement [, float left = 0,float right = 0, float top = 0, float bottom = 0, bool relativeLeft = true, bool relativeRight = true, bool relativeTop = true, bool relativeBottom = true ] )
DGS OOP Syntax Help! I don't understand this!
Required Arguments
- dgsElement: The dgs element you want to add size handler to.
Optional Arguments
- left: A float of the left border size of the DGS size handler relative to the dgs element. This is affected by the relativeLeft argument.
- right: A float of the right border size of the DGS size handler relative to the dgs element. This is affected by the relativeRight argument.
- top: A float of the top border size of the DGS size handler. This is affected by the relativeTop argument.
- bottom: A float of the bottom border size of the DGS size handler. This is affected by the relativeBottom argument.
- relativeLeft: This is whether left border size is relative. If this is true, then value must be between 0 and 1, representing value relative to the parent.
- relativeRight: This is whether right border size is relative. If this is true, then value floats must be between 0 and 1, representing value relative to the parent.
- relativeTop: This is whether top border size is relative. If this is true, then value floats must be between 0 and 1, representing value relative to the parent.
- relativeBottom: This is whether bottom border is relative. If this is true, then value floats must be between 0 and 1, representing value relative to the parent.
Returns
Returns true if succeed, false otherwise
Example
DGS = exports.dgs local button = DGS:dgsCreateButton(0.2,0.2,0.2,0.1,"test",true) DGS:dgsAddSizeHandler(button,0.2,0.2,0.2,0.2)
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