DgsProgressBarSetMode

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

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

Custom Cursor Functions

Multi Language Supports

Animation

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

Label

Line

Progress Bar

Radio Button

Scale Pane

Scroll Bar

Scroll Pane

Selector

Style

Switch Button

Tab Panel

Window

Plugin

Blur Box

Color Picker

Canvas

Circle

Effect 3D

Media Browser

Mask

Nine Slice

Object Preview Supports

Paste Handler

QRCode

Remote Image

Rounded Rectangle