DgsGetCurrentLayerIndex

From Multi Theft Auto: Wiki

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

Syntax

integer dgsGetCurrentLayerIndex( element dgsElement )
DGSRenderLayer

Required Arguments

  • dgsElement: The DGS element to set.

Returns

Returns an integer if succeed, false otherwise.

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 index1 = DGS:dgsGetCurrentLayerIndex (window1) --Get the layer index of window1
local index2 = DGS:dgsGetCurrentLayerIndex (window2) --Get the layer index of window2
outputChatBox(index1) --Because window 1 is created earlier than window2, so its index should be smaller than index2
outputChatBox(index2)

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Arrow List

Browser

Button

Check Box

Combo Box

Edit

Ellipse Detect Area

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Switch Button

Tab Panel

Window

Plugin

Media Browser

Rounded Rectangle

Color Picker

Blur Box

Effect 3D