Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 13,972 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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