1 registered members (TipmyPip),
18,619
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
sliders initial value
#382397
09/07/11 21:27
09/07/11 21:27
|
Joined: Mar 2005
Posts: 514 Brazil
Carloos
OP
User
|
OP
User
Joined: Mar 2005
Posts: 514
Brazil
|
Hi.
Lets consider that I have a hslider ( maybe algo a Vslider ) :
PANEL* PhPanel = { Bmap = PhTGA; Pos_x = 0; Pos_y = 0; Layer = 1;
hslider(8,23,150,SlideTGA,0,10,brLong);
digits,180,23,4,"*",1000,vecBRwheel.x); flags = show; }
but, in this case, brLong variable is already "working" and has its value = 5.
I need that the hslider, when the level / panel load, is at the middle of the slider, representing its inicial value that isnt neither 0 or 10.
In other words, the hslider would start in the middel of the scale, not at the left.
Is it possible ?
Thanks in advance.
|
|
|
Re: sliders initial value
[Re: Carloos]
#382400
09/07/11 21:37
09/07/11 21:37
|
Joined: Mar 2005
Posts: 514 Brazil
Carloos
OP
User
|
OP
User
Joined: Mar 2005
Posts: 514
Brazil
|
the code
----------------------------------------------------------------------
var brLong; brLong = 5;
PANEL* PhPanel = { hslider(8,23,150,SlideTGA,0,10,brLong); digits,180,23,2,"*",1,brLong); flags = show; }
----------------------------------------------------------------------
It starts from the left, always.
|
|
|
Re: sliders initial value
[Re: Carloos]
#382403
09/07/11 22:02
09/07/11 22:02
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
you can't do assignment to global vars like that.
try var brLong = 5;
3333333333
|
|
|
Re: sliders initial value
[Re: Quad]
#382405
09/07/11 22:17
09/07/11 22:17
|
Joined: Mar 2005
Posts: 514 Brazil
Carloos
OP
User
|
OP
User
Joined: Mar 2005
Posts: 514
Brazil
|
Perfect. Now hslider starts in the desired iitial position. Thankyou a lot Quad.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|