Merge pull request #6027 from acemod/cleanupMarkers

Cleanup markers
This commit is contained in:
commy2 2018-01-06 15:00:18 +01:00 committed by GitHub
commit 0eb809fb91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 28 deletions

View File

@ -6,6 +6,8 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
#include "initSettings.sqf"
// init marker types
if (isNil QGVAR(MarkersCache)) then {
GVAR(MarkersCache) = [];
@ -54,28 +56,4 @@ if (isNil QGVAR(MarkerColorsCache)) then {
//Server Sync JIP markers:
[QGVAR(sendMarkersJIP), FUNC(sendMarkersJIP)] call CBA_fnc_addEventHandler;
// settings
[
QGVAR(moveRestriction), "LIST",
[LSTRING(MoveRestriction), LSTRING(MoveRestriction_Description)],
format ["ACE %1", localize ELSTRING(map,Module_DisplayName)],
[
[
MOVE_RESTRICTION_NOBODY,
MOVE_RESTRICTION_ALL,
MOVE_RESTRICTION_ADMINS,
MOVE_RESTRICTION_GROUP_LEADERS,
MOVE_RESTRICTION_GROUP_LEADERS_ADMINS
],
[
LSTRING(MoveRestriction_Nobody),
LSTRING(MoveRestriction_All),
LSTRING(MoveRestriction_Admins),
LSTRING(MoveRestriction_GroupLeaders),
LSTRING(MoveRestriction_GroupLeadersAndAdmins)
],
1
]
] call cba_settings_fnc_init;
ADDON = true;

View File

@ -16,7 +16,7 @@
*/
#include "script_component.hpp"
(_this select 0) params ["_marker", "_ctrlMap", "_originalPos", "_originalAlpha", "_mapGesturesEnabled"];
(_this select 0) params ["_marker", "_ctrlMap", "_originalPos", "_originalAlpha"];
if (isNull _ctrlMap || !GVAR(moving)) exitWith {
(_this select 1) call CBA_fnc_removePerFrameHandler;

View File

@ -15,7 +15,7 @@
* None
*
* Example:
* [CONTROL, 2, 0, 0, true, false, false] call ace_markers_fnc_onMouseButtonDownMap
* [CONTROL, 2, 0, 0, true, false, false] call ace_markers_fnc_onMouseButtonDown
*
* Public: No
*/
@ -37,5 +37,5 @@ if (_type == "marker" && {_marker find "_USER_DEFINED" != -1 && {call FUNC(canMo
GVAR(moving) = true;
_marker setMarkerAlphaLocal 0.5;
[FUNC(movePFH), 0, [_marker, _ctrlMap, _originalPos, _originalAlpha, _mapGesturesEnabled]] call CBA_fnc_addPerFrameHandler;
[FUNC(movePFH), 0, [_marker, _ctrlMap, _originalPos, _originalAlpha]] call CBA_fnc_addPerFrameHandler;
};

View File

@ -15,7 +15,7 @@
* None
*
* Example:
* [CONTROL, 2] call ace_markers_fnc_onMouseButtonUpMap
* [CONTROL, 2] call ace_markers_fnc_onMouseButtonUp
*
* Public: No
*/

View File

@ -0,0 +1,22 @@
[
QGVAR(moveRestriction), "LIST",
[LSTRING(MoveRestriction), LSTRING(MoveRestriction_Description)],
format ["ACE %1", localize ELSTRING(map,Module_DisplayName)],
[
[
MOVE_RESTRICTION_NOBODY,
MOVE_RESTRICTION_ALL,
MOVE_RESTRICTION_ADMINS,
MOVE_RESTRICTION_GROUP_LEADERS,
MOVE_RESTRICTION_GROUP_LEADERS_ADMINS
],
[
LSTRING(MoveRestriction_Nobody),
LSTRING(MoveRestriction_All),
LSTRING(MoveRestriction_Admins),
LSTRING(MoveRestriction_GroupLeaders),
LSTRING(MoveRestriction_GroupLeadersAndAdmins)
],
1
]
] call cba_settings_fnc_init;