Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Nymphodora, AndrewAMD, TipmyPip, Quad, Imhotep), 847 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Panel #341754
09/19/10 22:49
09/19/10 22:49
Joined: Sep 2010
Posts: 12
Iceland
B
bjarni Offline OP
Newbie
bjarni  Offline OP
Newbie
B

Joined: Sep 2010
Posts: 12
Iceland
I need fundamental understanding of panel

I need to set flag = SHOW later when panel already defined?.

and how to insert button in panel when created this way?.

function call_MainMenu()
{
PANEL* MainMenu = pan_create("flags=SHOW",999); //create a panel at 0,0 at runtime
BMAP* bmpMainMenu = "mainmenu.pcx"; //Set the bitmap

MainMenu.bmap = bmpMainMenu; // NOW add the bmap to the Panel
MainMenu.pos_x = (screen_size.x - bmap_width(bmpMainMenu)) / 2;

MainMenu.pos_y = 50;
// Need buttons here
}

Re: Panel [Re: bjarni] #341832
09/20/10 21:01
09/20/10 21:01
Joined: Mar 2004
Posts: 206
The Netherlands
R
Roy Offline
Member
Roy  Offline
Member
R

Joined: Mar 2004
Posts: 206
The Netherlands
For inserting buttons, take a look at the pan_setbutton command (in the manual)

I don't think you need to set flag=SHOW later; you can just set it directly, as you do now.

I don't know if you want to do this, but additionally, you can also set other settings (such as the bmap) instantly at creation:
PANEL* MainMenu = pan_create("bmap = bmpMainMenu.pcx; flags = SHOW;", 999);

Re: Panel [Re: Roy] #341884
09/21/10 12:56
09/21/10 12:56
Joined: Sep 2010
Posts: 12
Iceland
B
bjarni Offline OP
Newbie
bjarni  Offline OP
Newbie
B

Joined: Sep 2010
Posts: 12
Iceland
Hi Roy and thx, thought this topic was dead.

But yes if iam showing video/intro and after want to Show panel(mainMenu) i could change flag to flag=SHOW or something when intro is done. Maybe its me that are thinking Object Oriented. Like

Main
{ // Here 2 panels and changing visible states
SplashScreen.Show = true;

Wait(-10);

SplashScreen.Dispose();

MainMenu.Show = true;
}

and i will look into pan_setbutton command (in the manual) to night.

Re: Panel [Re: bjarni] #341885
09/21/10 13:27
09/21/10 13:27
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
With Lite-C, you can do :

function main()
{ // Here 2 panels and changing visible states
set(SplashScreen,SHOW); // or SplashScreen.flags |= SHOW ;

wait(-10);

reset(SplashScreen,SHOW); // or SplashScreen.flags &= ~SHOW ;
// or toggle( SplashScreen, SHOW) ;

// And finally
set(MainMenu,SHOW); // or MainMenu.flags |= SHOW ;
// or also toggle(MainMenu,SHOW); if mainmenu was not visible
}

regards.

Re: Panel [Re: 3dgs_snake] #341915
09/21/10 17:19
09/21/10 17:19
Joined: Sep 2010
Posts: 12
Iceland
B
bjarni Offline OP
Newbie
bjarni  Offline OP
Newbie
B

Joined: Sep 2010
Posts: 12
Iceland
3dgs_snake ,,very nice exactly what i needed. Have to throw me over the functions library.


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