Difference between revisions of "ctrlScrollValues"
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
− | {{Command | + | {{Command |
− | | arma3 | + | | arma3 |
− | |2.00 | + | |2.00 |
− | |gr1= GUI Control | + | |gr1= GUI Control |
| Returns scroll values for current scrollbars in range 0...1 (-1 if not applicable) for the following controls: | | Returns scroll values for current scrollbars in range 0...1 (-1 if not applicable) for the following controls: | ||
Line 16: | Line 16: | ||
* <tt>CT_XCOMBO</tt> | * <tt>CT_XCOMBO</tt> | ||
* <tt>CT_LISTNBOX</tt> | * <tt>CT_LISTNBOX</tt> | ||
− | * <tt>CT_LISTNBOX_CHECKABLE</tt> | + | * <tt>CT_LISTNBOX_CHECKABLE</tt> |
− | | [[ctrlScrollValues]] control | + | | [[ctrlScrollValues]] control |
− | |p1= control: [[Control]] | + | |p1= control: [[Control]] |
− | | [[Array]] - in format [vScrollValue, hScrollValue] | + | | [[Array]] - in format [vScrollValue, hScrollValue] |
− | |x1= <code>_scrollvalues = [[ctrlScrollValues]] _ctrl;</code> | + | |x1= <code>_scrollvalues = [[ctrlScrollValues]] _ctrl;</code> |
|x2= <code>// ControlsGroup | |x2= <code>// ControlsGroup | ||
Line 54: | Line 54: | ||
[[sleep]] 1; | [[sleep]] 1; | ||
[[uiNamespace]] [[getVariable]] ["_ctrl", [[controlNull]]] [[ctrlSetScrollValues]] [-1, 0.7]; | [[uiNamespace]] [[getVariable]] ["_ctrl", [[controlNull]]] [[ctrlSetScrollValues]] [-1, 0.7]; | ||
− | };</code> | + | };</code> |
− | | [[ctrlSetScrollValues]], [[sliderPosition]], [[progressPosition]] | + | | [[ctrlSetScrollValues]], [[sliderPosition]], [[progressPosition]] |
}} | }} |
Revision as of 00:28, 18 January 2021
Description
- Description:
- Returns scroll values for current scrollbars in range 0...1 (-1 if not applicable) for the following controls:
- CT_CONTROLS_TABLE
- CT_CONTROLS_GROUP
- CT_TREE
- CT_LISTBOX
- CT_COMBO
- CT_XCOMBO
- CT_LISTNBOX
- CT_LISTNBOX_CHECKABLE
- Groups:
- GUI Control
Syntax
- Syntax:
- ctrlScrollValues control
- Parameters:
- control: Control
- Return Value:
- Array - in format [vScrollValue, hScrollValue]
Examples
- Example 1:
_scrollvalues = ctrlScrollValues _ctrl;
- Example 2:
// ControlsGroup private _disp = findDisplay 46 createDisplay "RscDisplayEmpty"; private _ctrlGrp = _disp ctrlCreate ["RscControlsGroup", -1]; private _ctrl = _disp ctrlCreate ["RscTree", -1, _ctrlGrp]; _ctrl tvAdd [[], "Root"]; for "_i" from 1 to 25 do { _ctrl tvAdd [[0], format ["Tree Item %1", _i]]; }; _ctrl ctrlSetPosition [0,0,0.3,1.2]; _ctrl ctrlCommit 0; tvExpandAll _ctrl; _ctrlGrp ctrlSetPosition [0,0,0.2,0.3]; _ctrlGrp ctrlCommit 0; uiNamespace setVariable ["_ctrl", _ctrlGrp]; onEachFrame { hintSilent str ctrlScrollValues (uiNamespace getVariable ["_ctrl", controlNull]); }; [] spawn { sleep 1; uiNamespace getVariable ["_ctrl", controlNull] ctrlSetScrollValues [0.3, -1]; sleep 1; uiNamespace getVariable ["_ctrl", controlNull] ctrlSetScrollValues [-1, 0.3]; sleep 1; uiNamespace getVariable ["_ctrl", controlNull] ctrlSetScrollValues [0.7, -1]; sleep 1; uiNamespace getVariable ["_ctrl", controlNull] ctrlSetScrollValues [-1, 0.7]; };
Additional Information
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