DgsGetLayer: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (DGS OOP Syntax changing)
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
string dgsGetLayer( element dgsElement )
string dgsGetLayer( element dgsElement )
</syntaxhighlight>
</syntaxhighlight>
{{DGS/OOP|
    Method = DGSElement:getLayer|
    Variable = alwaysOn|
    Counterpart = dgsSetLayer
}}


[[Image:DGSRenderLayer.png|300px|thumb|DGSRenderLayer]]
[[Image:DGSRenderLayer.png|300px|thumb|DGSRenderLayer]]
Line 31: Line 36:


==See Also==
==See Also==
{{DGSFUNCTIONS}}
 
===<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}}

Latest revision as of 19:07, 3 May 2021

This function allow us to set the render layer of a dgs element.

Syntax

string dgsGetLayer( element dgsElement )

DGS OOP Syntax Help! I don't understand this!

Method: DGSElement:getLayer(...)
Variable: .alwaysOn
Counterpart: dgsSetLayer
DGSRenderLayer

Required Arguments

  • dgsElement: The DGS element to get from.

Returns

Returns a string if succeed, false otherwise.

The string value can be as follows:

  • top
  • center
  • bottom

Example

DGS = exports.dgs

window1 = DGS:dgsCreateWindow(400,100,200,200,"DGS Window 1",false)	--Create window1
window2 = DGS:dgsCreateWindow(400,100,200,200,"DGS Window 2",false)	--Create window2
local layer = DGS:dgsGetLayer (window1)
outputChatBox(layer) -- The default layer is center

See Also

General Functions

General Events