Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,546 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
sliders initial value #382397
09/07/11 21:27
09/07/11 21:27
Joined: Mar 2005
Posts: 514
Brazil
Carloos Offline OP
User
Carloos  Offline 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] #382398
09/07/11 21:30
09/07/11 21:30
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
well i think it would start in the middle if the variable is set to 5 and:

lower limit = 0
upper limit = 10

I think the variable would have to be at 5 before the slider is setup though, am not sure what happens if you change the variable after the slider is created ?

Re: sliders initial value [Re: darkinferno] #382399
09/07/11 21:32
09/07/11 21:32
Joined: Mar 2005
Posts: 514
Brazil
Carloos Offline OP
User
Carloos  Offline OP
User

Joined: Mar 2005
Posts: 514
Brazil
wow, thats a fast reply... Thankyou.

In fact I´m setting the variable before of Panel creation, but the slider atarts at the left side.

Re: sliders initial value [Re: Carloos] #382400
09/07/11 21:37
09/07/11 21:37
Joined: Mar 2005
Posts: 514
Brazil
Carloos Offline OP
User
Carloos  Offline 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 Offline
Senior Expert
Quad  Offline
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] #382404
09/07/11 22:14
09/07/11 22:14
Joined: Mar 2005
Posts: 514
Brazil
Carloos Offline OP
User
Carloos  Offline OP
User

Joined: Mar 2005
Posts: 514
Brazil
Thankyou, Quad.

I´m very new to LiteC.

Re: sliders initial value [Re: Quad] #382405
09/07/11 22:17
09/07/11 22:17
Joined: Mar 2005
Posts: 514
Brazil
Carloos Offline OP
User
Carloos  Offline OP
User

Joined: Mar 2005
Posts: 514
Brazil
Originally Posted By: Quad

var brLong = 5;


Perfect.

Now hslider starts in the desired iitial position.

Thankyou a lot Quad.


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1