Gamestudio Links
Zorro Links
Newest Posts
Zorro tutorial ideas?
by AndrewAMD. 09/21/26 14:50
Trades during a running bar
by Martin_HH. 09/21/26 12:03
Capital slider is not saving in Z12
by frutza. 09/17/26 13:36
Avoiding pop-up training parameter results
by Martin_HH. 09/16/26 21:31
What are you working on?
by rayp. 09/16/26 20:20
Future of ZorroHFT
by TipmyPip. 09/16/26 09:28
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 1,248 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
lopezsergio07, mistery, lokkalyansamiti, rahulbuilds, speedx
19237 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 | 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