Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
slide in panel #300787
12/05/09 08:38
12/05/09 08:38
Joined: Aug 2002
Posts: 164
Houston
Nicholas Offline OP
Member
Nicholas  Offline OP
Member

Joined: Aug 2002
Posts: 164
Houston
I want to do it just to be flashy I guess, but how can I implement something like this:

I'm guessing the header and the body will be 2 seperate panels, this will help with dragging it since I'd have to grab the header which would be more accurate


Black holes are where God divided by zero.
Re: slide in panel [Re: Nicholas] #300875
12/06/09 12:03
12/06/09 12:03
Joined: Apr 2009
Posts: 274
atari98 Offline
Member
atari98  Offline
Member

Joined: Apr 2009
Posts: 274
Würd ich auch gern wissen wie das funktioniert!


Gruss
Atari98 laugh


Meine Fun Websiten
www.free4-fun.de.tl

www.gamer-liga-live.de.tl

Meine Game-Projekt Websiten
www.gamer-projects.de.tl
Re: slide in panel [Re: atari98] #300911
12/06/09 20:49
12/06/09 20:49
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Hi, I thought about you're concept and i had a few ideas. I've made a little demo to showcase them...

http://rapidshare.com/files/317238008/SliderDemo.zip

If it's what you're looking for, great, tell me so I can make it a forum contribution.

PS, sorry about rapidshare, my normal host is doing server maintainence.

Re: slide in panel [Re: DJBMASTER] #300950
12/07/09 05:50
12/07/09 05:50
Joined: Aug 2002
Posts: 164
Houston
Nicholas Offline OP
Member
Nicholas  Offline OP
Member

Joined: Aug 2002
Posts: 164
Houston
That works great. I would reccomend adding it so everyone can use it. I do have a few suggestions though.
To make it not obvious that the buttons are gone, add them to the actual backdrop in a static state, the slider would have just the bar and the buttons would only show the "on" bmap, this way it wouldn't be "obvious" to the user that the buttons went away. You might just have to update that in the comment section.
One thing that would make it look better, but I'm not sure if it can be done or how, would be to make it size_y from the top and slide into place at the same rate. If there was a gradient or something like the border edge on your one it would look better, but I don't know how to do size_y from the top, not the bottom...

this is a very bad way to show it, but add this to the main() script at the end and once you hit the down arrow, you'll kind of see what I mean, unfortunately this is upside down... but it is one way to do it, now I just need to flip it. lol
this just loops it to show you easily.
Code:
while(1)
	{
		if(drop_open == 1)
		{
			while(DropDown.size_y < 146 && drop_moving ==2) // 146 = height of dropdown.png.
			{
				drop_moving =2;
				DropDown.size_y += drop_speed*time_step;
				DropDown.pos_y -= drop_speed*time_step;
				wait(1);
			}
			if(DropDown.size_y >= 146){drop_moving = 1;}
			while(DropDown.size_y > 1 && drop_moving ==1)
			{
				drop_moving =1;
				DropDown.size_y -= drop_speed*time_step;
				DropDown.pos_y += drop_speed*time_step;
				wait(1);
			}
			if(DropDown.size_y <= 1){drop_moving = 2;}
		}
		wait(1);
	}






thanks for the help, I didn't think the size thing would work because of scaling the background and text etc, but it just crops which is nice.
one way to fix the upside down problem would be to use something like mouse_spot but for panels to change it's default location away from vector(0,0)

p.s. it would be better to add a gradient to dropdown.png before hand to see my idea work better

Last edited by Nicholas; 12/07/09 06:03.

Black holes are where God divided by zero.
Re: slide in panel [Re: Nicholas] #300959
12/07/09 09:39
12/07/09 09:39
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
hmm ok, i'll look into how I can improve it later on.

BTW, can't you flip it upside down by setting panel.scale_y *= -1?

I don't have the time to test at the moment. Ultimately the best option would be to have JCL fix it so, panel elements are affected by size_x/y. I'm not quite sure why this isn't the default behaviour.

Thanks, DJB.

Last edited by DJBMASTER; 12/07/09 09:40.
Re: slide in panel [Re: DJBMASTER] #301003
12/07/09 17:10
12/07/09 17:10
Joined: Aug 2002
Posts: 164
Houston
Nicholas Offline OP
Member
Nicholas  Offline OP
Member

Joined: Aug 2002
Posts: 164
Houston
Great idea, I didn't even think of that. I just put that in the main code before the while loop and it works without even flipping the bitmap.
This way you don't even have to make the pos_y move at all except to follow the header. Nice.

Thanks for the help.

I'm looking forward to seeing your game editor, now you have an additional option in the panel editor. lol.


Black holes are where God divided by zero.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | 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