LWJGL Forum

Archive => Resolved Bugs/RFE => Topic started by: arielsan on February 02, 2011, 16:31:46

Title: [FIXED] AppletLoader al_logo and al_progressbar parameters should not be required
Post by: arielsan on February 02, 2011, 16:31:46
AppletLoader al_logo and al_progressbar parameters should both have default values: appletlogo.png and appletprogress.gif, letting the user to avoid setting those on his <applet> tag unless he wants to override them. So, if someone uses default values, he will need less applet parameters.

The attached patch shows one possible impl.
Title: Re: [RFE] AppletLoader al_logo and al_progressbar parameters should not be required
Post by: arielsan on February 15, 2011, 13:56:38
Have you thought about this RFE?
Title: Re: [RFE] AppletLoader al_logo and al_progressbar parameters should not be required
Post by: kappa on February 16, 2011, 19:38:36
Yes, this was discussed briefly on IRC just after the 2.7 release but was a bit late to put it in.

I'm a tiny bit uncomfortable with hard coding file names into the code ("appletlogo.png" and "appletprogress.gif") and one of those supports animation (gif) and the others does not (maybe we can just make them both gif).

However the advantage here is pretty clear, it'll make the html code alot nicer and cleaner and it'll also be two parameters developers do not need to worry about until they are ready to customise the AppletLoader (making it easier to pick up).

Unless someone has good reasons why it shouldn't go in, I'd say it should go in.
Title: Re: [RFE] AppletLoader al_logo and al_progressbar parameters should not be required
Post by: arielsan on February 16, 2011, 20:51:01
The patch is wrong a bit, it should be:


// load logos, if value is "" then skip
logo = getImage(getParameter("al_logo", "appletlogo.png"));
progressbar = getImage(getParameter("al_progressbar", "appletprogress.gif"));


without the check of:


if (getParameter("al_logo").length() > 0) {


and:


if (getParameter("al_progressbar").length() > 0) {


Sorry for that.
Title: Re: [RFE] AppletLoader al_logo and al_progressbar parameters should not be required
Post by: kappa on March 06, 2011, 01:37:05
thx for the patch, this is now implemented.

al_logo and al_progress parameters are now optional and default to "appletlogo.gif" and "appletprogress.gif". This should make the appletloader easier and cleaner to use.
Title: Re: [FIXED] AppletLoader al_logo and al_progressbar parameters should not be required
Post by: arielsan on March 06, 2011, 19:45:25
Nice, thanks for adding this feature.