Jump to content
cb65

How do you get script created markers to show in dialog map control

Recommended Posts

Hi everyone,

 

I don't know how to get script created markers to show up in my dialog's map control other then using "onMapSingleClick".

 

When I create a marker by script it shows up in the in-game map but when I open my dialog the marker does not show up in the dialog map control.

 

Can anyone help me out ?

 

I've searched the internet for any post about this but couldn't find anything.

 

Cheers.

Share this post


Link to post
Share on other sites

Depending on what is your dialog's map control. Some inheritance with RscMapControl ? Usually it works.

Share this post


Link to post
Share on other sites
11 hours ago, pierremgi said:

Depending on what is your dialog's map control. Some inheritance with RscMapControl ? Usually it works.

 

@pierremgi thanks mate, I check the map control settings and found that show markers was set to no. Plus I had a script error causing the problem.

 

Works fine now.

 

Cheers.

Share this post


Link to post
Share on other sites

Custom dialog using RscMapControl does show markers but not ones created with drawIcon command. For that you need to do something like:

if (!isNil "customMapEH") then
{
	(findDisplay IDD displayCtrl IDC) ctrlRemoveEventHandler ["Draw", customMapEH];
} else
{
	customMapEH = (findDisplay IDD displayCtrl IDC) ctrlAddEventHandler ["Draw", client_fnc_playerMarkers];
};

Slightly modified version from my keyDownHandler function. You probably won't need the !isNil check with custom map dialog as you can just terminate it when dialog closes. onUnload or whatever...

  • Like 1

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

×