GuiProgressBarGetProgress: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{client function}}
__NOTOC__
This function returns a float containing the progress of the progressbar
{{Client function}}
This function gets the progress of a progress bar as a percentage.


==Syntax==
==Syntax==
Line 9: Line 10:
===Required Arguments===
===Required Arguments===
*'''theProgressbar''': The progressbar you want to check.
*'''theProgressbar''': The progressbar you want to check.


===Returns===
===Returns===
Returns a [[float]] containing the progress of the progressbar your checking.
Returns a [[float]] ranging between 0 and 100.
 


==Example==
==Example==
Line 29: Line 28:
==See Also==
==See Also==
{{GUI_functions}}
{{GUI_functions}}
{{GUI_events}}

Latest revision as of 07:57, 5 August 2021

This function gets the progress of a progress bar as a percentage.

Syntax

float guiProgressBarGetProgress ( progressBar theProgressbar )

Required Arguments

  • theProgressbar: The progressbar you want to check.

Returns

Returns a float ranging between 0 and 100.

Example

This example gets the progress of a bar called "somebar" created with guiCreateProgressBar, and outputs it to the chatbox.

-- If the progressbar exsist then
if ( somebar ) then
	-- get the progress
	progress = guiProgressBarGetProgress(somebar)
	-- output to the chatbox
	outputChatBox ( "Current progress:" .. progress .. "%" )
end

See Also

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows

Input

GUI