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
0 registered members (), 17,416 guests, and 5 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
Problems with Buttons #141575
07/17/07 10:17
07/17/07 10:17
Joined: Jul 2004
Posts: 38
Germany, NRW
B
Black_Sheep Offline OP
Newbie
Black_Sheep  Offline OP
Newbie
B

Joined: Jul 2004
Posts: 38
Germany, NRW
Hi guys,
ive a problem with a button. The button will not be visible or clickable, no matter what iam changeing. I hope anyone can help me.
Here my code:

BMAP* pcx_btn_resume = "btn_resume.PCX";
...
PANEL* hautpmenu =
{
layer = 10;
pos_x = 50;
pos_y = 50;
//size_x = 100; // just for debugging
//size_y = 100; // just for debugging
//bmap = pcx_btn_resume; // just for debugging
//digits(0,0,4,fnt_century12,1,var_mainmenu_vis); // just for debugging
button = (0,0,pcx_btn_resume,NULL,NULL,NULL,NULL,NULL);
flags = VISIBLE | OVERLAY;
}

As u can see, i have tried many things.
Ive tried to get the panel a size, with no effect.
Ive include a bmap with the same pcx to see if i have decleared it right. And it works. With bmap the pcx is viewable.
If i uncomment the size lines, the bmap filled the 100x100 pixels.
The digits line worked too. It shows me easily a var.
Ive tried two different button lines:
button = (0,0,pcx_btn_resume,NULL,NULL,NULL,NULL,NULL); as shown above and
button (0,0,pcx_btn_resume,NULL,NULL,NULL,NULL,NULL); without the =
and ive tried to give the button a function. But nothing helped me.

I have no more ideas. Am i doing something wrong???
thx for help


A7 Commercial.
Re: Problems with Buttons [Re: Black_Sheep] #141576
07/17/07 10:38
07/17/07 10:38
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
From the Lite-C workshop:

Code:
#include <acknex.h>
#include <default.c>

BMAP* pcx_btn_resume = "btn_resume.pcx";
BMAP* mouse_pcx = "mouse.pcx";

PANEL* hautpmenu =
{
layer = 10;
pos_x = 50;
pos_y = 50;
//size_x = 100; // just for debugging
//size_y = 100; // just for debugging
//bmap = pcx_btn_resume; // just for debugging
//digits(0,0,4,fnt_century12,1,var_mainmenu_vis); // just for debugging
button = (0,0,pcx_btn_resume,pcx_btn_resume,pcx_btn_resume,NULL,quit_program,NULL);
flags |= (VISIBLE | OVERLAY);
}

function main()
{
video_mode = 7;
screen_color.blue = 150;
mouse_map = mouse_pcx;
mouse_mode = 2;
while (1)
{
mouse_pos.x = mouse_cursor.x;
mouse_pos.y = mouse_cursor.y;
wait (1);
}
}

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




smile
Re: Problems with Buttons [Re: D3D] #141577
07/17/07 11:24
07/17/07 11:24
Joined: Jul 2004
Posts: 38
Germany, NRW
B
Black_Sheep Offline OP
Newbie
Black_Sheep  Offline OP
Newbie
B

Joined: Jul 2004
Posts: 38
Germany, NRW
Thx for your quick answer! You realy helped me to solve my problem.

The problem was indeed the secound "NULL" in my Button define.
I have schwitched this:
button = (0,0,pcx_btn_resume,NULL,NULL,NULL,NULL,NULL);
to this:
button = (0,0,pcx_btn_resume,pcx_btn_resume,NULL,NULL,NULL,NULL);
and now the button is visible.


A7 Commercial.

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