GuiProgressBarGetProgress: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: {{client function}} This function returns a float containing the progress of the progressbar <section name="Client" class="client" show="true"> <syntaxhighlight lang="lua"> float guiProgressBarGetProgre...)
 
No edit summary
Line 2: Line 2:
This function returns a float containing the progress of the progressbar
This function returns a float containing the progress of the progressbar


<section name="Client" class="client" show="true">
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
float guiProgressBarGetProgress ( progressBar theProgressbar )
float guiProgressBarGetProgress ( progressBar theProgressbar )
Line 13: Line 13:
===Returns===
===Returns===
Returns a [[float]] containing the progress of the progressbar your checking.
Returns a [[float]] containing the progress of the progressbar your checking.
</section>




<section name="Example" class="client" show="true">
==Example==
This example gets the progress of a bar called "somebar" created with [[guiCreateProgressBar]], and outputs it to the chatbox.
This example gets the progress of a bar called "somebar" created with [[guiCreateProgressBar]], and outputs it to the chatbox.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
Line 27: Line 26:
end
end
</syntaxhighlight>
</syntaxhighlight>
</section>


==See Also==
==See Also==
{{GUI_functions}}
{{GUI_functions}}

Revision as of 15:09, 6 November 2007

This function returns a float containing the progress of the progressbar

Syntax

float guiProgressBarGetProgress ( progressBar theProgressbar )

Required Arguments

  • theProgressbar: The progressbar you want to check.


Returns

Returns a float containing the progress of the progressbar your checking.


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