DgsAddEasingFunction

From Multi Theft Auto: Wiki
(Redirected from AddEasingFunction)

This function allow us to add easing functions for DGS animation.

Syntax

bool dgsAddEasingFunction ( string name, string functionStr )

Required Arguments

  • name: The name of easing function.
  • functionStr: The string of function to load.

Returns

Returns a true if succeed, false otherwise.

Example

DGS = exports.dgs

DGS:dgsAddEasingFunction("test",[[
	return math.abs(progress^2-0.5)*2
]]) --Add easing function named as "test"

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

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