GefrManny 0 Posted May 17, 2007 Hi everyone, I'm a little bit confused by the progress bar dialog control. Creating and adding one isn't exactly my problem, but I wonder how to actually use it. I was unable to find a function that lets me set/move the progress bar's current progress. Has anyone worked with this control and wants to share experience? -- Manny Share this post Link to post Share on other sites
crashdome 3 Posted May 17, 2007 The progress bar never worked in OFP. I fear it may be the same problem here in ArmA. [EDIT] In my older dialogs, I built my own progress bar control using a standard text field. What I did was set the text and highlight to the same color. You could then create a box and use spaces to make it appear to fill across. Share this post Link to post Share on other sites
raedor 8 Posted May 18, 2007 Afaik progress bars are controlled by "hardcode" Share this post Link to post Share on other sites
GefrManny 0 Posted May 18, 2007 That's what I feared, when I saw all those "external reference" remarks in the decompiled config.bin files :-( Ah well, I'll just add it to the endless list of the ArmA feature requests tracker then. Share this post Link to post Share on other sites
Spinor 0 Posted May 18, 2007 Using the new command ctrlSetPosition, you can easily emulate a progress bar with a plain old colored background control. Lets say you want the progress bar at screen position _x,_y with fixed height _h and a full width _w, you can display a progress bar with: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_ctrl ctrlSetPosition[_x,_y,_progress*_w,_h]; _ctrl ctrlCommit 0.0 where _progress is a number between 0.0 and 1.0. Using a different commit time other than 0, you can also animate the bar. Share this post Link to post Share on other sites
GefrManny 0 Posted May 18, 2007 I'm aware of that, but thanks I was just trying to get behind the secrets of the progress bar itself for the Biki, which lacks some information about dialogs. Share this post Link to post Share on other sites
Lolsav 0 Posted May 19, 2007 In ofp a squad mate managed to get a progress bar in a mission called "Rescue RaH". Never investigated how he managed to do it, but i will ask him. Edit: Ok ive talk to him and he told me it was done by hint. I guess the same principle could be applyed to a dialog. Edit2: He replyed. Share this post Link to post Share on other sites
Junker 0 Posted May 19, 2007 i use something like this to display a progress from 100% > 0% <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0 _i = 100 _b = 0.5 #start Hint Format ["Downloading %1 ", _i] #loop ? _i < 0:Hint "Download Complete"; Exit _i = _i - 1 ~_b goto "start" You could use the RSC to display a bar at every 10% completed. Share this post Link to post Share on other sites