PDA

View Full Version : GuiTextEditSliderCtrl bug


napo_p2p
10-05-2007, 06:05 AM
I came across some strange behavior when playing around with GuiTextEditSliderCtrl.

It works just fine if you do not set a format, or have:
format = "$d something";

However, the text does not update properly when you have something before $d, like:
format = "something $d";

NOTE: Replace $ with the percent sign. For whatever reason, I get a bad request error from the server when I try to post with the percent sign, which may very well be another bug...

Crow
10-05-2007, 02:55 PM
I came across some strange behavior when playing around with GuiTextEditSliderCtrl.

It works just fine if you do not set a format, or have:
format = "$d something";

However, the text does not update properly when you have something before $d, like:
format = "something $d";

NOTE: Replace $ with the percent sign. For whatever reason, I get a bad request error from the server when I try to post with the percent sign, which may very well be another bug...

Yea, the forum somehow blocks the percent symbol.
About the GuiTextEditSlider, thats infact pretty weird :confused:

Admins
10-05-2007, 10:07 PM
How its not updating properly? What text do you see ?

napo_p2p
10-05-2007, 10:53 PM
How its not updating properly? What text do you see ?

When the arrows are pushed, the text just remains the same.

For example, if you take the example code off of the wiki:
new GuiTextEditSliderCtrl("Test_EditSlider") {
profile = GuiBlueTextEditSliderProfile;
x = 10;
y = 10;
width = 160;
height = 20;
format = "Edit $d Slider";
range = {1,200};
value = 123;
}

The slider says "Edit 1 slider" no matter what. If you change format to:
format = "$d Slider";
Then it is working fine.


(Again, replace $ with the percent sign).

Admins
10-08-2007, 02:32 PM
Ok fixed in my version, some part of the code was expecting the number to be always in the front.