DgsProgressBarSetMode

From Multi Theft Auto: Wiki

This function sets bar image showing mode.

Syntax

bool dgsProgressBarSetMode ( element progressBar, bool mode )
The Effect Of Mode.

Required Arguments

  • progressBar: the Progress Bar that you want to operate.
  • mode: the mode to choose ( see effect in the the right side image ).

Returns

Returns true if succeed, false otherwise.

DGS = exports.dgs
local tex = dxCreateTexture("exampleImage.png")
pb1 = DGS:dgsCreateProgressBar(100,300,400,50,false)
DGS:dgsSetProperties(pb1,{barimg=tex,barcolor=tocolor(255,255,255,255)})
pb2 = DGS:dgsCreateProgressBar(100,370,400,50,false)
DGS:dgsSetProperties(pb2,{barimg=tex,barcolor=tocolor(255,255,255,255)})
DGS:dgsProgressBarSetMode(pb2,true)
addEventHandler("onClientRender",root,function()
	local tick = getTickCount()/20%360/180*math.pi
	local pos = (math.cos(tick)*100+100)/2
	DGS:dgsProgressBarSetProgress(pb1,pos)
	DGS:dgsProgressBarSetProgress(pb2,pos)
end)

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