DxGUI/dxMove: Difference between revisions
Jump to navigation
Jump to search
Darth Poezd (talk | contribs) (Created page with "You can use this function to move dxGUI element. ==Syntax== <syntaxhighlight lang="lua"> dxMove (element dxElement, float xMove, float yMove) </syntaxhighlight> ===Required Arguments=== *'''dxElement:'...") |
(No difference)
|
Latest revision as of 11:18, 4 January 2014
You can use this function to move dxGUI element.
Syntax
dxMove (element dxElement, float xMove, float yMove)
Required Arguments
- dxElement: A dxGUI element.
- xMove: Position X, where dxGUI element move.
- yMove: Position Y, where dxGUI element move.
Returns
- false if dxElement, xMove, yMove are not set.
Example
This example moves dxGUI window to (0;0).
Click to collapse [-]
Clientlocal x, y = guiGetScreenSize() --Getting screen size addEventHandler("onClientResourceStart", resourceRoot, function() --Create dxGUI window with name "wind": wind = dxCreateWindow(x/2, y/2, 50, 50, "Window", tocolor(255,255,255,255),"default-bold","Lighter Black") end) --Move dxGUI to (0;0) when player joining. addEventHandler("onClientPlayerJoin", resourceRoot, function() dxMove(wind, 0, 0) end)