Page 1 of 1

RapaGUI: progressbar and "max" attribute

Posted: Sat Apr 28, 2018 11:28 pm
by bitRocky
Hi, If I change the "max" attribute to something higher or lower than the default 100, the shown procent value isn't correct, its the "level" value not the calculated procent of "level" from "max".

You can test it with the Dialogs example, just add a

Code: Select all

moai.Set("prgbar", "max", 1000)
at the beginning of p_DialogFunc(), and change the For-Loop to

Code: Select all

For Local k = 0 To moai.Get("prgbar", "max")
And if I add the

Code: Select all

max="1000"
into the Progress.xml, the scale-object underneath the bar doesn't exists!

Also setting the "hide" attribute to true on a progressbar definition, only hides the bar not the scale-object!
If I set it at run-time, both were hidden!
Well, this can be easily work-around by putting the progressbar in a own group and hide the group instead of the progressbar;)

btw, Andreas could you add a callback function, so one could show a custom string in the progress bar?

Re: RapaGUI: progressbar and "max" attribute

Posted: Sun May 06, 2018 12:01 am
by airsoftsoftwair
bitRocky wrote:Hi, If I change the "max" attribute to something higher or lower than the default 100, the shown procent value isn't correct, its the "level" value not the calculated procent of "level" from "max".

You can test it with the Dialogs example, just add a

Code: Select all

moai.Set("prgbar", "max", 1000)
at the beginning of p_DialogFunc(), and change the For-Loop to

Code: Select all

For Local k = 0 To moai.Get("prgbar", "max")
And if I add the

Code: Select all

max="1000"
into the Progress.xml, the scale-object underneath the bar doesn't exists!

Also setting the "hide" attribute to true on a progressbar definition, only hides the bar not the scale-object!
If I set it at run-time, both were hidden!
Well, this can be easily work-around by putting the progressbar in a own group and hide the group instead of the progressbar;)
Thanks for the report, this will be fixed.
btw, Andreas could you add a callback function, so one could show a custom string in the progress bar?
This is not likely to come because showing a string in the progress bar is only supported on MUI and RapaGUI aims to support features only if they are available on all platforms.

Re: RapaGUI: progressbar and "max" attribute

Posted: Sat Aug 01, 2020 9:57 pm
by airsoftsoftwair

Code: Select all

- Fix [Amiga]: The scale below the progress bar didn't appear in case Progressbar.Max was set to a value
  not equal to 100
- Fix [Amiga]: Area.Hide didn't work correctly on Progressbar widgets when used in the XML file
Concerning the wrong percent value... I don't know how to fix that. RapaGUI uses MUIA_Gauge_InfoText and this just takes the current value and stringifies it. I don't see how to add a divisor here that clamps it to a 0..100% range. There is MUIA_Gauge_Divide but I think it affects MUIA_Gauge_Current so it's not a solution either.

Re: RapaGUI: progressbar and "max" attribute

Posted: Sun Aug 02, 2020 11:21 am
by airsoftsoftwair
airsoftsoftwair wrote: Sat Aug 01, 2020 9:57 pm Concerning the wrong percent value... I don't know how to fix that. RapaGUI uses MUIA_Gauge_InfoText and this just takes the current value and stringifies it. I don't see how to add a divisor here that clamps it to a 0..100% range. There is MUIA_Gauge_Divide but I think it affects MUIA_Gauge_Current so it's not a solution either.
Oops, certainly not seeing the forest for the trees here. Obviously this is very easy to fix by just updating MUIA_Gauge_InfoText manually whenever MUIA_Gauge_Current changes. So this is fixed now too.

Code: Select all

- Fix [Amiga]: Percentage info text wasn't correct in case Progressbar.Max was set to something different to 100

Re: RapaGUI: progressbar and "max" attribute

Posted: Tue Aug 04, 2020 7:41 pm
by bitRocky
Thanks for not giving up!