Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (3run, miwok, AndrewAMD, Quad, TipmyPip, fairtrader, 1 invisible), 637 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
mouse map #296993
11/04/09 09:22
11/04/09 09:22
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Hello Folks,

I have A7.8 com. and am just starting to use lite_c.

Have a difficulty with the mouse map. I want to use my own mouse map which is a coloured hand with a pointing finger, using two maps I can make the finger 'move' (up and down as thought it has touched something).
In c_script it works fine, but when converted to lite_c, I have a problem.

BMAP* handmap1="handmap1.bmp"

function mouse_toggle()
{
mouse_map=handmap1;
etc.

I do not get MY mouse map(although it is in the work folder), only the standard 'white hand'.

Can anyone help please?

David

Re: mouse map [Re: DAVIDMORETON] #296994
11/04/09 09:29
11/04/09 09:29
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
Code:
BMAP* handmap1 = "handmap1.bmp";

function mouse_toggle()
{
mouse_map = handmap1;
mouse_mode = 2; // That one?
}



Re: mouse map [Re: Rasch] #297003
11/04/09 12:02
11/04/09 12:02
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Hi Rasch, thanks for reply.

Yes, the new code I'm using is from the lite_c manual under mouse curser.

The old code is one I cooked up for use in c_script, and it works fine in c_script. I now need to convert it to lite_c and the first problem is that although I 'call up' the 'handmap1' bitmap it does not appear! (see my first mailing above)

I do not understand this - am I missing something out?
David

Last edited by DAVIDMORETON; 11/04/09 12:11.
Re: mouse map [Re: DAVIDMORETON] #297006
11/04/09 12:21
11/04/09 12:21
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
Try that code

Code:
BMAP* handmap1 = "handmap1.bmp";

function mouse_toggle()
{
mouse_map = handmap1;
mouse_mode = 2; // That one?

while(1)
{
vec_set(mouse_pos,mouse_cursor);
wait(1);
}
}

function main()
{
mouse_toggle();
}



Re: mouse map [Re: Rasch] #297010
11/04/09 12:46
11/04/09 12:46
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Hi Rasch, Tried that, still won't work. Why can I not get MY bmap (handmap1)on the screen? it's in the A7 work folder- and seems to be stuck there!

Re: mouse map [Re: DAVIDMORETON] #297012
11/04/09 12:58
11/04/09 12:58
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
Try that.

Create a new folder on your desktop. Put your handmap image inside that. Copy my code in SED and save the .c file in the same new folder.

Try again!

Re: mouse map [Re: Rasch] #297051
11/04/09 18:44
11/04/09 18:44
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Here's what I use

Code:
BMAP* cross = "croix_blanc.pcx"; /



function my_mouse ()
{
	enable_mouse = 1;
	mouse_mode = 1; 
	mouse_map = cross; 


	mouse_range= 1500; // only near Entities are clickable
	
	mouse_spot.x = bmap_width(cross)/2; // hot spot in the middle
	mouse_spot.y = bmap_height(cross)/2; // hot spot in the middle


	
	while (mouse_mode > 0) // move it over the screen
	{ 
		mouse_pos.x = mouse_cursor.x;   
		mouse_pos.y = mouse_cursor.y;

		wait(1);
	}
}




Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C

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