DgsEasingFunctionExists

From Multi Theft Auto: Wiki

This function checks whether the easing function exists (built-in easing functions and those who were created by dgsAddEasingFunction).

Syntax

bool dgsEasingFunctionExists ( string name )

Required Arguments

  • name: The name of easing function to be checked.

Returns

Returns a true if the easing function exists, false otherwise.

Example

DGS = exports.dgs

if not DGS:dgsEasingFunctionExists("test") then --Check whether easing function named "test" exists,if not, then create one.
	DGS:dgsAddEasingFunction("test",[[
		return math.abs(progress^2-0.5)*2
	]]) --Add easing function named as "test"
end

parent = DGS:dgsCreateWindow(200,100,400,400,"DGS Parent Window",false)	--Create a window
DGS:dgsSetAlpha(parent,0)
DGS:dgsAlphaTo(parent,1,false,"test",2000)  --set animation with easing function that we added.

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Arrow List

Browser

Button

Check Box

Combo Box

Custom Renderer

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

Nine Slice