ctrlMapMouseOver: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects? in MP|M...)
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(56 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


| arma2
|game1= arma2
|version1= 1.00


|1.00
|game2= arma2oa
|version2= 1.50
 
|game3= tkoh
|version3= 1.00
 
|game4= arma3
|version4= 0.50


|gr1= GUI Control - Map
|gr1= GUI Control - Map


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


| '''ctrlMapMouseOver''' control
|s1= [[ctrlMapMouseOver]] control


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


|p2=
|r1= [[Array]] - possible values:
 
|p3=
 
| [[Array]] - Possible values:
* ["unit", [[Object]]]
* ["unit", [[Object]]]
* ["vehicle", [[Object]]]
* ["vehicle", [[Object]]]
Line 28: Line 32:
* ["customMark"]
* ["customMark"]


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


|x1= <code>
_mouseover = if (count (ctrlMapMouseOver (uiNamespace getVariable "_map")) > 0) then
([[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"];
};
};
</code>
</sqf>
 
|x2= <code>[[onEachFrame]] {[[hintSilent]] [[str]] [[ctrlMapMouseOver]] ([[findDisplay]] 12 [[displayCtrl]] 51)};</code>


|x2= <sqf>onEachFrame {hintSilent str ctrlMapMouseOver (findDisplay 12 displayCtrl 51)};</sqf>


| [[findDisplay]], [[displayCtrl]]
|seealso= [[findDisplay]] [[displayCtrl]] [[BIS_fnc_createTooltip]]
 
|
}}
}}
<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}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 19:43, 3 September 2024

Hover & click on the images for description

Description

Description:
Returns description of map sign mouse cursor is over. Works with in-game map as well as 2D editor map in edit mode.
Groups:
GUI Control - Map

Syntax

Syntax:
ctrlMapMouseOver control
Parameters:
control: Control - map control
Return Value:
Array - possible values:

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:
findDisplay displayCtrl BIS_fnc_createTooltip

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