Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 28,858 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rht, MaliceTheMaker, Haitao_Ren, JimSimons, julienp
19249 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
making panel sprite disappear #243237
12/28/08 22:31
12/28/08 22:31
Joined: Mar 2004
Posts: 71
Scotland
westray Offline OP
Junior Member
westray  Offline OP
Junior Member

Joined: Mar 2004
Posts: 71
Scotland
Say I have 20 sprites on screen all created by the pan_create command and all using a pointer called PANEL* temp .They are created in a for loop until all are created.I know you can use event to trigger a function when the panel is clicked upon.My question is how do you pass the correct panel pointer to this
function in order to use the command ptr_remove(the panel )

Last edited by westray; 12/28/08 22:42.
Re: making panel sprite disappear [Re: westray] #243258
12/29/08 01:12
12/29/08 01:12
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Define a array with your Panelpointer:
PANEL* my_pan[20];

Then create it:
for(i=0;i<20;i++)
{
my_pan[i] = pan_create(content, layer);
}

Re: making panel sprite disappear [Re: Widi] #243324
12/29/08 14:26
12/29/08 14:26
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Create all panels with "event=panel_click;" and this function elsewhere.
Code:
function panel_click(PANEL* me_panel)
{
   ptr_remove(me_panel);
}
with renaming or inserting code as you wish.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

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