Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/01/26 16:40
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (USER0328, Quad), 5,448 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Button problem #271210
06/11/09 19:10
06/11/09 19:10
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline OP
Expert
Rei_Ayanami  Offline OP
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Hello!
i am writing a script for lerning lite-c. I use lite-c at this moment. Here is my script:
Code:
PANEL* TIMEs_pan =
{
	digits(580, 300, 2, "Arial#150b", 1, sys_seconds); 
	flags = SHOW;
}
PANEL* TIMEm_pan =
{
	digits(580, 300, 2, "Arial#150b", 1, sys_minutes); 
}
function change()
{
	reset(TIMEs_pan, SHOW);
	set(TIMEm_pan, SHOW);
}
PANEL menu_pan =
{
	bmap = menu_back;
	pos_x = 128;
	pos_y = 128;
	button(256, 256, "off.bmp", "on.bmp", "over.bmp", change, NULL, NULL); 
	flags = SHOW;
}

Why this doesen´t work???
I get an error with the Button.

Re: Button problem [Re: Rei_Ayanami] #271211
06/11/09 19:14
06/11/09 19:14
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
PANEL -> PANEL*
if this doesnt work, try defining bmaps for button on, off and over pictures instead of defining them with ""



Ubi bene, ibi Patria.
Re: Button problem [Re: croman] #271213
06/11/09 19:22
06/11/09 19:22
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline OP
Expert
Rei_Ayanami  Offline OP
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Code:
/////////////////////////////////////////
#include <acknex.h>
#include <default.c>
/////////////////////////////////////////
BMAP* back = "background_01.bmp";
BMAP* back2 = "background_02.bmp";
BMAP* menu_back = "menu_back.bmp";
BMAP* on = "on.bmp";
BMAP* off = "off.bmp";
BMAP* over = "over.bmp";
/////////////////////////////////////////
PANEL* back_pan =
{
	bmap = back;
 	pos_x = 0;     
 	pos_y = 0;    
 	layer = 10;
	flags = OVERLAY | VISIBLE ;
}
PANEL* back2_pan =
{
	bmap = back2;
 	pos_x = 0;     
 	pos_y = 0;    
 	layer = 9;
	flags = OVERLAY | VISIBLE ;
}
PANEL* TIMEs_pan =
{
	digits(580, 300, 2, "Arial#150b", 1, sys_seconds); 
	flags = SHOW;
}
PANEL* TIMEm_pan =
{
	digits(580, 300, 2, "Arial#150b", 1, sys_minutes); 
}
function switch_min()
{
	reset(TIMEs_pan, SHOW);
	set(TIMEm_pan, SHOW);
}
PANEL* menu_pan =
{
	bmap = menu_back;
	pos_x = 128;
	pos_y = 128;
	button(256, 256, "off.bmp", "on.bmp", "over.bmp", switch_min, NULL, NULL); 
	flags = SHOW;
}
function main()
{
	video_mode = 10;
	screen_color.red = 150;
	mouse_mode = 1;
	while(1)
	{
		wait(-1);
		set(back_pan,SHOW);
		wait(-1);
		reset(back_pan,SHOW);
	}
}

Does not work. No it shows one problem more: "off.bmp not found" but it´s in the folder. and it still shows the butten problem...

Re: Button problem [Re: Rei_Ayanami] #271215
06/11/09 19:30
06/11/09 19:30
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline OP
Expert
Rei_Ayanami  Offline OP
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
OK, now i get no more Error. But it doesent work...

Re: Button problem [Re: Rei_Ayanami] #271241
06/11/09 22:48
06/11/09 22:48
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Try this (untested)
Code:
/////////////////////////////////////////
#include <acknex.h>
#include <default.c>
/////////////////////////////////////////
BMAP* back = "background_01.bmp";
BMAP* back2 = "background_02.bmp";
BMAP* menu_back = "menu_back.bmp";
BMAP* b_on = "on.bmp";
BMAP* b_off = "off.bmp";
BMAP* b_over = "over.bmp";
/////////////////////////////////////////
PANEL* back_pan =
{
	bmap = back;
 	pos_x = 0;     
 	pos_y = 0;    
 	layer = 10;
	flags = OVERLAY | VISIBLE ;
}
PANEL* back2_pan =
{
	bmap = back2;
 	pos_x = 0;     
 	pos_y = 0;    
 	layer = 9;
	flags = OVERLAY | VISIBLE ;
}
PANEL* TIMEs_pan =
{
	digits(580, 300, 2, "Arial#150b", 1, sys_seconds); 
	flags = SHOW;
}
PANEL* TIMEm_pan =
{
	digits(580, 300, 2, "Arial#150b", 1, sys_minutes); 
}
function switch_min()
{
	reset(TIMEs_pan, SHOW);
	set(TIMEm_pan, SHOW);
}
PANEL* menu_pan =
{
	bmap = menu_back;
	pos_x = 128;
	pos_y = 128;
	button(256, 256, b_on, b_off, b_over, switch_min, NULL, NULL); 
	flags = SHOW;
}
function main()
{
	video_mode = 10;
	screen_color.red = 150;
	mouse_mode = 1;
	while(1)
	{
		wait(-1);
		set(back_pan,SHOW);
		wait(-1);
		reset(back_pan,SHOW);
	}
}



"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Button problem [Re: EvilSOB] #271342
06/12/09 14:14
06/12/09 14:14
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline OP
Expert
Rei_Ayanami  Offline OP
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg

Why??? I have just copied your script into mine, now i have an unknown flag frown Ok this problem is no more, but there is still he problem with the off.bmp(i chnged the off button to the over button to make the script working) and that the butten is not working

Last edited by Rei_Ayanami; 06/12/09 16:10.
Re: Button problem [Re: Rei_Ayanami] #271365
06/12/09 16:13
06/12/09 16:13
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline OP
Expert
Rei_Ayanami  Offline OP
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Ok problem found! An other panal has an higher layer and was over it.

Last edited by Rei_Ayanami; 06/12/09 16:41.
Re: Button problem [Re: Rei_Ayanami] #271403
06/12/09 22:05
06/12/09 22:05
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Excellent that problem fixed, but that still doesnt explain the error with "off.bmp".
If its still a problem, try changing its filename to "b_off.bmp".
The words "on" and "off" are both engine "reserved words" and it
may be having troubles because of that.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Button problem [Re: EvilSOB] #272216
06/16/09 22:31
06/16/09 22:31
Joined: May 2005
Posts: 871
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 871
Chicago, IL
I could only get my buttons to work when I set "mouse_mode = 4"

For some reason mouse_mode set at 1 or 2 does not effect the buttons in my script. Any ideas?

Also, when I go full screen, mouse_mode 4 does not actually show the mouse pointer.

Re: Button problem [Re: Dooley] #272228
06/17/09 00:12
06/17/09 00:12
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Mouse Mode
Originally Posted By: MANUAL
4 - mouse pointer active and automatically moved

Mouse Pointer
Originally Posted By: MANUAL
In fullscreen mode the system cursors are not visible; only a mouse_map can be used for the fullscreen cursor.

should help

Page 1 of 2 1 2

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