dyna-menu functionality on map

This commit is contained in:
DESKTOP-UH65DCE\MusTanG 2017-10-02 11:49:27 -05:00
parent a73b6e5008
commit 9029bc7524
3 changed files with 29 additions and 6 deletions

View File

@ -33,14 +33,18 @@ _hasTarget = !(dyna_cursorTarget isEqualTo objNull);
if (isNull _display && dialog) exitWith {false call Epoch_dynamicMenuCleanup; false};
if (isNull _display) then {
if (_hasTarget) then {
createDialog "rmx_dynamenu";
if!(visibleMap)then{
if (_hasTarget) then {
createDialog "rmx_dynamenu";
} else {
findDisplay 46 createDisplay "rmx_dynamenu";
}
} else {
findDisplay 46 createDisplay "rmx_dynamenu";
findDisplay 12 createDisplay "rmx_dynamenu";
};
};
_selfOrTarget = if !(_hasTarget) then {"self"} else {"target"};
_selfOrTarget = if!(visibleMap)then{ if !(_hasTarget) then {"self"} else {"target"} } else {"map"};
_checkConfigs = {
_config = switch (_in) do {
@ -100,7 +104,7 @@ _checkConfigs = {
{
if (call compile (getText(_x >> "condition"))) then {
if (_selfOrTarget isEqualTo "self" || dyna_distance) then {
if (_selfOrTarget in ["self","map"] || dyna_distance) then {
_subclasses = configProperties [_x, "isClass _x",true];
@ -145,7 +149,7 @@ _checkConfigs = {
};
call _checkConfigs;
if (_buttonSettings isEqualTo []) then {_selfOrTarget = "self"; call _checkConfigs;};
if (_buttonSettings isEqualTo []) then {_selfOrTarget = if!(visibleMap)then{"self"}else{"map"}; call _checkConfigs;};
_entries = count _buttonSettings;
if !(_entries <= 0) then {

View File

@ -62,4 +62,9 @@ class CfgActionMenu
{
#include "CfgActionMenu_target.hpp"
};
class map
{
#include "CfgActionMenu_map.hpp"
};
};

View File

@ -0,0 +1,14 @@
/*
Author: Raimonds Virtoss - EpochMod.com
Contributors: DirtySanchez
Description:
Action Menu Map Config
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_map.hpp
*/