DgsWindowGetCloseButtonSize

From Multi Theft Auto: Wiki
Revision as of 04:13, 29 July 2019 by Thisdp (talk | contribs) (Created page with "{{Client function}} __NOTOC__ This functions gets the size of dgs-dxwindow close(off) button. ==Syntax== <syntaxhighlight lang="lua"> bool dgsWindowGetCloseButtonSize( eleme...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This functions gets the size of dgs-dxwindow close(off) button.

Syntax

bool dgsWindowGetCloseButtonSize( element dgsElement [, bool relative ] )

Required Arguments

  • dgsElement: The DGS window element you wish to get close button size.

Optional Arguments

  • relative: This is whether sizes and positioning are relative. If this is true, then all width,height floats must be between 0 and 1, representing sizes/positions as a fraction of the window size. If false, then the size and co-ordinates are based on client's resolution.

Returns

Returns two floats, which indicate the length and height of the close button

Example

DGS = exports.dgs
local dgsWindow = DGS:dgsCreateWindow(200,200,400,400,"dgs window",false)
local width,height = DGS:dgsWindowGetCloseButtonSize(dgsWindow,false)
outputChatBox("width:"..width.."; height:"..height)

See Also

Custom Cursor Functions

Multi Language Supports

Animation

3D Element

3D Interface

3D Line

3D Image

3D Text

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Detect Area

Drag'N Drop

Grid List

Image

Memo

Menu

Label

Layout

Line

Progress Bar

Radio Button

Scale Pane

Scroll Bar

Scroll Pane

Selector

Style

Switch Button

Tab Panel

Window

Basic Shape Plugins

Circle

Quadrilateral

Rounded Rectangle

Other Plugins

Blur Box

Canvas

Chart

Color Picker

Effect 3D

Gradient

Mask

Media Browser

Nine Slice

Object Preview Supports

Paste Handler

QRCode

Remote Image

Screen Source

SVG

Tooltips