Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 919 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
close several panels with one click, but how ? #319611
04/16/10 07:14
04/16/10 07:14
Joined: Apr 2005
Posts: 274
austria
Ascalon Offline OP
Member
Ascalon  Offline OP
Member

Joined: Apr 2005
Posts: 274
austria
hi,
how can i close several panels with different names with one click ?


my webside : www.ascalon.jimdo.de
Re: close several panels with one click, but how ? [Re: Ascalon] #319613
04/16/10 07:44
04/16/10 07:44
Joined: Jul 2007
Posts: 53
Germany
Henning Offline
Junior Member
Henning  Offline
Junior Member

Joined: Jul 2007
Posts: 53
Germany
Hi,

do it with a function like this, actvated by a mouse click:

function resetAllDrawPan () {
reset (dAnnoTxt, SHOW);
reset (dLinesPan, SHOW);
reset (dAreasPan1, SHOW);
reset (dAreasPan2, SHOW);

}

Re: close several panels with one click, but how ? [Re: Henning] #319614
04/16/10 07:50
04/16/10 07:50
Joined: Apr 2005
Posts: 274
austria
Ascalon Offline OP
Member
Ascalon  Offline OP
Member

Joined: Apr 2005
Posts: 274
austria
thanks for your info, but there must be a faster way instead to write all panel names and reset them one by one, or ?


my webside : www.ascalon.jimdo.de
Re: close several panels with one click, but how ? [Re: Ascalon] #319615
04/16/10 08:07
04/16/10 08:07
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
Originally Posted By: Ascalon
thanks for your info, but there must be a faster way instead to write all panel names and reset them one by one, or ?


It's the easiest way.
You could write a whole custom panel handler, that stores any panel in an a linkedlist or array, and walk through that to reset them that way... but that's more work.


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: close several panels with one click, but how ? [Re: Ascalon] #319616
04/16/10 08:30
04/16/10 08:30
Joined: Oct 2009
Posts: 110
Porto-Portugal
Elektron Offline
Member
Elektron  Offline
Member

Joined: Oct 2009
Posts: 110
Porto-Portugal
I did not tested but maybe you can make array of panels and close all on a for loop.

I hope it helps


Carlos Ribeiro aka Elektron
Check my blog: http://indiegamedeveloper71.wordpress.com/
Re: close several panels with one click, but how ? [Re: Elektron] #319656
04/16/10 13:33
04/16/10 13:33
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
Quote:

You could write a whole custom panel handler, that stores any panel in an a linkedlist or array, and walk through that to reset them that way... but that's more work.


Actually, panels are already in a linked list. You can find the first panel with ptr_first (void* object); and find the next with yourpanel.link.next.

You can hide all panels like this:
Code:
PANEL* pan_temp = ptr_first(pan_temp);
while (pan_temp)
{
  pan_temp.flags &= ~SHOW;
  pan_temp = pan_temp.link.next;
}


I think this is the easiest way.


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