ctrlMapMouseOver: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " \{\{GameCategory *\| *arma2 *\| *(New )?Scripting Commands\}\}" to "") |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(42 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma2 | |game1= arma2 | ||
|1.00 | |version1= 1.00 | ||
|game2= arma2oa | |game2= arma2oa | ||
Line 15: | Line 15: | ||
|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. | ||
|s1= | |s1= [[ctrlMapMouseOver]] control | ||
|p1= control: [[Control]] - map control | |p1= control: [[Control]] - map control | ||
| [[Array]] - | |r1= [[Array]] - possible values: | ||
* ["unit", [[Object]]] | * ["unit", [[Object]]] | ||
* ["vehicle", [[Object]]] | * ["vehicle", [[Object]]] | ||
Line 32: | Line 32: | ||
* ["customMark"] | * ["customMark"] | ||
|x1= < | |x1= <sqf> | ||
(uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overFriendly"]; | |||
_mouseover = | _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 | //--- Task | ||
( | (uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_overMission"]; | ||
} | } | ||
else | else | ||
{ | { | ||
//--- Waypoint | //--- Waypoint | ||
( | (uiNamespace getVariable "_map") ctrlMapCursor ["Track","HC_move"]; | ||
}; | }; | ||
</ | </sqf> | ||
|x2= < | |x2= <sqf>onEachFrame {hintSilent str ctrlMapMouseOver (findDisplay 12 displayCtrl 51)};</sqf> | ||
|seealso= [[findDisplay]] | |seealso= [[findDisplay]] [[displayCtrl]] [[BIS_fnc_createTooltip]] | ||
}} | }} | ||
Latest revision as of 19:43, 3 September 2024
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:
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