Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,382 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 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