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
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 (NnamueN, 1 invisible), 1,489 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Almost got it, please help. #271043
06/10/09 23:26
06/10/09 23:26
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
Hi, Ive created an image (im new to this so im starting small). Im now trying to add a button to it to end the program. When i click it the program ends like i want it to, but the image doesnt change.

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


BMAP* firebackground = "awesome-fire-dragon-ablaze.jpg"; // dragon fire background with button on it

PANEL* first_pan = // my first panel
{
pos_x = -40;
pos_y = 0;
layer = 1;
bmap = firebackground;
flags = OVERLAY | VISIBLE;
}
BMAP* pngRobot = "LDDScreenShot1.png"; // robot in foreground

PANEL* second_panel =
{
pos_x = -270;
pos_y = -100;
layer = 2;
bmap = pngRobot;
flags = OVERLAY | VISIBLE;
}
PANEL* button_panel = //panel for button
{
pos_x = 30;
pos_y = 0;
layer = 3;
button (270, 0, "stopclicked.jpg", "stopnormal.jpg", "stopnormal.jpg", quit_program, NULL, NULL);
flags = OVERLAY | VISIBLE;
}

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

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

function quit_program()
{
sys_exit(NULL);
}




Last edited by gamingfan101; 06/11/09 01:10.

Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: Almost got it, please help. [Re: gamingfan101] #271227
06/11/09 20:41
06/11/09 20:41
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
does disabling the quit function make the button change when you click it?


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