Jump to content
Sign in to follow this  
gc8

Draw on map?

Recommended Posts

Hi

Is it possible to draw on the map? I have seen some missions draw on custom map control but Idk about main map. how would this be done?

i just need to draw a circle.

(using drawEllipse)

thx

Share this post


Link to post
Share on other sites

If you just need an ellipse on the main map you can create a local marker

Share this post


Link to post
Share on other sites

That could be alright. But how do I mouse position etc?

Share this post


Link to post
Share on other sites

do you mean you want to have, say, the player draw on the map?

afaik you can get the mouse position by handling the 'onMouseMoving' event for the main display.

http://community.bistudio.com/wiki/displayAddEventHandler

http://community.bistudio.com/wiki/User_Interface_Event_Handlers

but it may be easier to use the onMapSingleClick function, depending on what you're trying to achieve

Share this post


Link to post
Share on other sites

Thats just what i need.

But i get event triggered only on key press for the map. but not on mouseMouse


(findDisplay 46) displayAddEventHandler ["onMouseMoving", "hint str _this;"]; // does not trigger
(findDisplay 46) displayAddEventHandler ["keyDown", "hint str _this;"];

Share this post


Link to post
Share on other sites

ok well if theres a way to get mouse pos thats all i need.

mouse click pos wont do, need moving mouse pos on the map.

Share this post


Link to post
Share on other sites

still havent found a way to get mouse pos on map.

does anyone one know map control id? and display id?

where are the guis defined?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×