ctrlMapMouseOver: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
(31 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2 |= Game name
| arma2


|1.00|= Game version
|1.00
____________________________________________________________________________________________


| Returns description of map sign mouse cursor is over. |= Description
|gr1= GUI Control - Map
____________________________________________________________________________________________


| '''ctrlMapMouseOver''' control |= Syntax
| Returns description of map sign mouse cursor is over. Works with in-game map as well as 2D editor map in edit mode.


|p1= control: [[Control]] -  |= PARAMETER1
| '''ctrlMapMouseOver''' control


|p2= |= PARAMETER2
|p1= control: [[Control]] - map control


|p3= |= PARAMETER3
| [[Array]] - Possible values:
* ["unit", [[Object]]]
* ["vehicle", [[Object]]]
* ["vehicleGroup", [[Object]]]
* ["object", [[Object]]]
* ["waypoint", [[Waypoint]]]
* ["trigger", [[Object]]]
* ["marker", [[String]]]
* ["task", [[Task]]]
* ["customMark"]


| [[Array]] |= RETURNVALUE
|x1= <code>([[uiNamespace]] [[getVariable]] "_map") [[ctrlMapCursor]] ["Track","HC_overFriendly"];


 
_mouseover = [[if]] ([[count]] ([[ctrlMapMouseOver]] (uiNamespace getVariable "_map")) > 0) [[then]]
|x1= <pre>
(uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overFriendly"];
 
_mouseover = if (count (ctrlMapMouseOver (uiNamespace getVariable "_map")) > 0) then
{
{
ctrlMapMouseOver (uiNamespace getVariable "_map")
[[ctrlMapMouseOver]] ([[uiNamespace]] [[getVariable]] "_map")
}
}
else
[[else]]
{
{
[""]
[""]
};
};


if (_mouseover select 0 == "task" && str(_logic getVariable "onTaskAssigned") != str{}) then
[[if]] (_mouseover [[select]] 0 [[==]] "task" [[&&]] [[str]](_logic [[getVariable]] "onTaskAssigned") != [[str]]{}) [[then]]
{
{
//--- Task
//--- Task
(uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overMission"];
([[uiNamespace]] [[getVariable]] "_map") [[ctrlMapCursor]] ["Track","HC_overMission"];
}
}
else
else
{
{
//--- Waypoint
//--- Waypoint
(uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_move"];
([[uiNamespace]] [[getVariable]] "_map") [[ctrlMapCursor]] ["Track","HC_move"];
};
};
</pre>|= EXAMPLE1
</code>


____________________________________________________________________________________________
|x2= <code>[[onEachFrame]] {[[hintSilent]] [[str]] [[ctrlMapMouseOver]] ([[findDisplay]] 12 [[displayCtrl]] 51)};</code>


| |= SEEALSO
|seealso= [[findDisplay]], [[displayCtrl]]
 
|  |= MPBEHAVIOUR
____________________________________________________________________________________________
}}
}}


<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>


<h3 style='display:none'>Bottom Section</h3>
{{GameCategory|arma2|Scripting Commands}}
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Revision as of 00:29, 17 February 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
GUI Control - Map

Syntax

Syntax:
Syntax needed
Parameters:
control: Control - map control
Return Value:
Return value needed

Examples

Example 1:
(uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overFriendly"]; _mouseover = if (count (ctrlMapMouseOver (uiNamespace getVariable "_map")) > 0) then { ctrlMapMouseOver (uiNamespace getVariable "_map") } else { [""] }; if (_mouseover select 0 == "task" && str(_logic getVariable "onTaskAssigned") != str{}) then { //--- Task (uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overMission"]; } else { //--- Waypoint (uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_move"]; };
Example 2:
onEachFrame {hintSilent str ctrlMapMouseOver (findDisplay 12 displayCtrl 51)};

Additional Information

See also:
findDisplaydisplayCtrl

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note