Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by Grant. 02/24/26 22:21
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, Quad), 6,365 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How can I get number of Panel #293960
10/15/09 06:51
10/15/09 06:51
Joined: Mar 2009
Posts: 2
Russia
L
Lowfog Offline OP
Guest
Lowfog  Offline OP
Guest
L

Joined: Mar 2009
Posts: 2
Russia
Hello.
Please, help:
1. I create panel in cycle 0to20:
mypan[n]= pan_create("button=0,0,64,128,bmo,bmon,bmov,fon,frel,fov;");
2. How can I get number n in function fov?

Re: How can I get number of Panel [Re: Lowfog] #293961
10/15/09 07:36
10/15/09 07:36
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Is this what you mean?
Code:
.
   ...
   mypan[n] = pan_create("button=0,0,64,128,bmo,bmon,bmov,fon,frel,fov;");
   (mypan[n]).skill_x = n;
   ...



function fov(PANEL* pan)
{
   var panel_button_number = pan.skill_x;
   ...
}




"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: How can I get number of Panel [Re: Lowfog] #293962
10/15/09 07:36
10/15/09 07:36
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
first:
define fov like
function fov(var button_number,PANEL* panel)

second:
after creating your panel with
mypan[n]= pan_create("button=0,0,64,128,bmo,bmon,bmov,fon,frel,fov;");
put this line.
mypan[n].skill_x = n;

then in fov you can get this number back from the skill

like
function fov(var button_number,PANEL* panel){
if(panel.skill_x==2)//panel.skill_x is your "n"
}



:evilsob was faster

Last edited by Quadraxas; 10/15/09 07:37.

3333333333
Re: How can I get number of Panel [Re: Quad] #293963
10/15/09 07:54
10/15/09 07:54
Joined: Mar 2009
Posts: 2
Russia
L
Lowfog Offline OP
Guest
Lowfog  Offline OP
Guest
L

Joined: Mar 2009
Posts: 2
Russia
Thank you!!

Re: How can I get number of Panel [Re: Lowfog] #293965
10/15/09 08:13
10/15/09 08:13
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
DoH!

Quadraxas got me again.
I always forget to include the button_number parameter.
(it IS important, but I seldom use it)

Sorry, but the rest of my code should be ok,
cause Quadraxas's is the same I feel sure of that.


"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