0 registered members (),
16,643
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Problems with Buttons
#141575
07/17/07 10:17
07/17/07 10:17
|
Joined: Jul 2004
Posts: 38 Germany, NRW
Black_Sheep
OP
Newbie
|
OP
Newbie
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
Serious User
|
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); }
|
|
|
Re: Problems with Buttons
[Re: D3D]
#141577
07/17/07 11:24
07/17/07 11:24
|
Joined: Jul 2004
Posts: 38 Germany, NRW
Black_Sheep
OP
Newbie
|
OP
Newbie
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.
|
|
|
|