lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO Libraries

Category: LotRO Libraries[Class] ProgressBar
Interface Information
Download
Thurallor's Portal Bug Reports Feature Requests
How do I install this? (FAQ)
Name: [Class] ProgressBar   Popular!
Author:
Date: 03-31-2022 11:11 PM
Size: 11.48 Kb
Version: 1.00
Rate File:  out of 5 with 0 votes  
Pictures
Click to enlarge 

Views: 0
Size: 122.97 Kb
Dimensions: 426 x 205
ProgressBar demo, with a target frame rate of 10 FPS
 
Description
Introduction

This class is a progress bar that allows you to automatically split up a large job into small chunks, so the client won't freeze for a long time while performing it. You specify a target frame rate (e.g. 10 FPS) and a work function (workFunc). The amount of work requested (workToDo) is adjusted automatically up and down to achieve the desired frame rate.

How to Use

When instantiating the ProgressBar class, you supply a work function (workFunc) and a target frame rate (targetFrameRate). At each frame update, your work function is called with a single integer argument: workToDo. This is the number of iterations of your "work" (whatever that may be) that you should complete before returning. Your function should then return a number between 0 and 1 indicating the total progress completed so far. (After your function returns 1, it will not be called again.)

Based on the amount of time elapsed, the workToDo argument will be adjusted up or down, and workFunc will be called again. (workToDo will always be at least 1.)

Displaying the progress bar is optional; to do so, call SetParent() to add it to a window. You can set the position and size as usual. To modify the appearance, see ProgressBar.lua; it is quite simple to understand and customize.

If you would like notifications when the progress bar updates, you may register a ProgressChanged event handler.

Example plugin included. See the source code for more details.

Revision History
  • Version 1.00 (31-Mar-2022): Initial release.
File Statistics
User Rating:
 out of 5 with 0 votes
Downloads: 6277
Views: 13789
Favorites: 2
Uploaded By:
 
Last Modified: 04-01-2022 08:24 AM by Thurallor    

View Pictures. Download Now! Post A Comment

There have been no comments posted to this file.
Be the first to add one.

 
Category Jump:
Search this Category:
 

All times are GMT -5. The time now is 04:13 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui