Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 552 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 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