Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 05:41
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AbrahamR, AndrewAMD), 1,278 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Setting flags for more panels #456006
11/05/15 13:24
11/05/15 13:24
Joined: Dec 2010
Posts: 224
NRW, Germany
NeoJones Offline OP
Member
NeoJones  Offline OP
Member

Joined: Dec 2010
Posts: 224
NRW, Germany
Hi,
do anyone knows, how I can setting flags for more panels in one line?
I look into acknex.h, but I dont know how can I edit that. Its not a big problem, but I think its something clearer.

Thats what I have (f.e.):
Code:
set(my_panel1, SHOW);
set(my_panel2, SHOW);
set(my_panel3, SHOW);


Thats what Iam searching for:
Code:
set(my_panel1 | my_panel2 | my_panel3, SHOW);


Regards, DF


Errors are the engine of progress.

Version: A8 Commercial
OS: Win 7 64bit
Models: Cinema 4D
Re: Setting flags for more panels [Re: NeoJones] #456062
11/07/15 22:24
11/07/15 22:24

M
Malice
Unregistered
Malice
Unregistered
M



A basic idea would be to build your own helper function however there are many ways and things you need to do. Do you just want to set/resest 3 panels or 20?

Code:
A panel array 
PANEL* p_panels[20];

function set_panels(PANEL* p_pan[20], var p_flags) // I have no idea if flags can be stored in a var...
{
 var i=0;
for(i=0; i<20; i++)
{
 p_pan[i].flags |= p_flags;
}
}

exapm set_panels(p_panles, SHOW | TRANSLUCENT);

function reset_panels(PANEL* p_pan[20], var p_flags)
{
 var i=0;
for(i=0; i<20; i++)
{
 p_pan[i].flags &= p_flags;
}
}

exapm reset_panels(p_panles, ~SHOW | ~TRANSLUCENT);




This is a idea to work with not , tested and or working code.





Last edited by Malice; 11/07/15 22:25.
Re: Setting flags for more panels [Re: ] #456064
11/07/15 22:59
11/07/15 22:59
Joined: Dec 2010
Posts: 224
NRW, Germany
NeoJones Offline OP
Member
NeoJones  Offline OP
Member

Joined: Dec 2010
Posts: 224
NRW, Germany
Thanks, nice idea Malice! I dont know exactly how many panels I need - between 10 and 20.
Yes, I use a panel array for that laugh


Errors are the engine of progress.

Version: A8 Commercial
OS: Win 7 64bit
Models: Cinema 4D

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