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
3 registered members (NnamueN, Akow, 1 invisible), 1,421 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
can anyone please help? #270804
06/10/09 05:42
06/10/09 05:42
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
Ive got an image that has 2 layers, the backgound and foreground. Im trying to add a button to the top of the picture, and the code ive got doesnt show the button. Any advice?

////////////////////////////////////////////////////////////////////
#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;
button(-270, -100, "stopclicked.jpg", "stopnormal.jpg", "stopnormal.jpg", quit_program, NULL, NULL);
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;
}

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

function main ()
{
video_mode = 7;
screen_color.red = 100;
}

function quit_program()
{
while (key_any) {wait (1);}
sys_exit(NULL);
}


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: can anyone please help? [Re: gamingfan101] #270808
06/10/09 06:56
06/10/09 06:56
Joined: Apr 2006
Posts: 624
DEEP 13
badapple Offline
User
badapple  Offline
User

Joined: Apr 2006
Posts: 624
DEEP 13
your buttons x position is -270 , thats probably why you dont see it , try changeing it to 0 and see if it shows up

Re: can anyone please help? [Re: badapple] #270820
06/10/09 07:33
06/10/09 07:33
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
Originally Posted By: badapple
your buttons x position is -270 , thats probably why you dont see it , try changeing it to 0 and see if it shows up


Nope, still wont be visible :P
the x of the panel is at -40 already, so the button actually is at -310 (-270 + -40).

Badapple was right though, you need to set it to the right position (being a positive instead of negative value).

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/

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