Jump to content
cannonouscrash

Disabling the move map to player location

Recommended Posts

On the map, there is a button in the top right which moves the map to your current location, albeit zoomed out.

Does anyone know of way to disable this?

Share this post


Link to post
Share on other sites

h = [] spawn {
disableSerialization;
while {true} do {
	waitUntil { visibleMap };
	_display = uiNamespace getVariable "RSCDiary";
	_ctrl = _display displayCtrl 1202;
	_ctrl ctrlEnable false;
	_ctrl ctrlsettextcolor [0,0,0,0];
	_ctrl ctrlSetTooltip "";
	_ctrl ctrlCommit 0;
	waitUntil { !visibleMap };
};
};

Disables and hides the button. Needs to constantly run (like above) to remove the button each time the map is opened.

Edited by Larrow
updated code to remove buttons tooltip aswell
  • Like 1

Share this post


Link to post
Share on other sites

This is pretty awesome, I've been trying to get rid of that as well. Thanks for posting! :)

Share this post


Link to post
Share on other sites
3 hours ago, seacaptainjim said:

Thanks for this

Better off using some of the new event handlers nowadays rather than this while loop. See addMissionEventHandler Map.

Share this post


Link to post
Share on other sites

Like this?

addMissionEventHandler ["Map", 
	{_mapIsOpened;
	_display = uiNamespace getVariable "RSCDiary";
	_ctrl = _display displayCtrl 1202;
	_ctrl ctrlEnable false;
	_ctrl ctrlsettextcolor [0,0,0,0];
	_ctrl ctrlSetTooltip "";
	_ctrl ctrlCommit 0;
};
];

 

Share this post


Link to post
Share on other sites
addMissionEventHandler[ "Map", {
	params[ "_mapIsOpened" ];
	
	if ( _mapIsOpened ) then {
		_display = uiNamespace getVariable "RSCDiary";
		_ctrl = _display displayCtrl 1202;
		_ctrl ctrlEnable false;
		_ctrl ctrlSetTextColor [0,0,0,0];
		_ctrl ctrlSetTooltip "";
		_ctrl ctrlCommit 0;
	};
}];

untested

  • 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

×