Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, AndrewAMD), 846 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
show/ hide an image ( panel) #305275
01/13/10 22:03
01/13/10 22:03
Joined: Jan 2010
Posts: 44
Galati, Romania
CItrok Offline OP
Newbie
CItrok  Offline OP
Newbie

Joined: Jan 2010
Posts: 44
Galati, Romania
Hi guys. I am newbie in lite-c and 3GS. I want to build an application in which a image to appear if pressing , let's say "S" and hide if pressing, "H".

I imagine is a function which handles this. Which is the function that show/hide a panel?

Thanks a lot!

---------------------------------

Bellow you may find the code from lite-c tutorials.



#include <acknex.h>
#include <default.c>

////////////////////////////////////////////////////////////////////

BMAP* first_pcx = "first.pcx"; // my first bmap

PANEL* first_pan = // my first panel
{
pos_x = 0;
pos_y = 0;
layer = 1;
bmap = first_pcx;
flags = OVERLAY | VISIBLE;
}

/////////////////////////////////////////////////////////////////////

function main()
{
video_mode = 7;
screen_color.blue = 150;
}

Re: show/ hide an image ( panel) [Re: CItrok] #305279
01/13/10 22:21
01/13/10 22:21
Joined: Dec 2008
Posts: 271
Saturnus Offline
Member
Saturnus  Offline
Member

Joined: Dec 2008
Posts: 271
first_pan->flags |= SHOW; // show the panel
first_pan->flags &= ~SHOW; // hide the panel

You can also use the macros set and reset.
They do the very same thing but are probably easier to memorize:
set(first_pan, SHOW);
reset(first_pan, SHOW);

Search the manual for "Input events". There you will see how to assign functions to keys and so on (basically it's just 'on_key = function').

Re: show/ hide an image ( panel) [Re: Saturnus] #305280
01/13/10 22:26
01/13/10 22:26
Joined: Jan 2010
Posts: 44
Galati, Romania
CItrok Offline OP
Newbie
CItrok  Offline OP
Newbie

Joined: Jan 2010
Posts: 44
Galati, Romania
Saturnus, Thank you very much. It works!

Danke schon!


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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