BIS fnc configViewer: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "|gr1 = Debug |GROUP1=" to "|gr1 = Diagnostic |GROUP1=")
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function|Comments=
____________________________________________________________________________________________
| arma2oa |Game name=
|1.00|Game version=


{{Function|= Comments
|gr1 = Diagnostic |GROUP1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2oa |= Game name
| Splendid™ Config Viewer. |DESCRIPTION=
____________________________________________________________________________________________


|1.00|= Game version
| [parent, cfg, showOk, onSelect, onAdd, header] call [[BIS_fnc_configViewer]] |SYNTAX=
____________________________________________________________________________________________


| <pre>/*
|p1= parent: [[Display]] - (Optional, default mission display) parent display |PARAMETER1=


Description:
|p2= cfg: [[Config]] - (Optional, default all configs) root config |PARAMETER2=
Splendid config viewer


Parameter(s):
|p3= showOk: [[Boolean]] - (Optional, default [[false]]) true to display OK button. Script will then wait until viewer is closed and return selected class and param |PARAMETER3=
0 (Optional): DISPLAY - parent display (mission display by default)
1 (Optional): CONFIG - root config (all configs displayed by default)
2 (Optional): BOOL - true to display OK button. Script will then wait until viewer is closed and return selected class and param
3 (Optional): CODE - executed upon selecting a class. Has to return STRING, which will be shown as structured text instead of params.
3 (Optional): CODE - executed upon adding a class to list. Returned value (STRING) is item text. Empty string will skip the item.
5 (Optional): TEXT - custom header. Use %1 to refer to original name ("Splendid Config Viewer")


Returns:
|p4= onSelect: [[Code]] - (Optional, default {}) executed upon selecting a class. '''Must return [[String]]''', which will be shown as structured text instead of params. |PARAMETER4=
ARRAY
- when OK button is not displayed, empty array is returned
- when OK button is displayed, array of currently selected entries in format [class (CONFIG), param (STRING)] is returned.
*/
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_configviewer]]; --> |= Syntax
|p5= onAdd: [[Code]] - (Optional, default {}) executed upon adding a class to list. Returned value (STRING) is item text. Empty string will skip the item. |PARAMETER5=


|p1= |= Parameter 1
|p6= header: [[String]] - (Optional, default "%1") custom header. Use %1 to refer to original name ("Splendid Config Viewer") |PARAMETER6=


| |= Return value
| [[Array]]
* when OK button is not displayed, empty array is returned
* else, an array of currently selected entries in format [class ([[Config]]), param ([[String]])] is returned. |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>[[call]] [[BIS_fnc_configViewer]];</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[BIS_fnc_animViewer]], [[BIS_fnc_help]] |SEEALSO=
 
}}
}}


Line 51: Line 45:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Debug|{{uc:configviewer}}]]
[[Category:Functions|{{uc:configViewer}}]]
[[Category:Functions|{{uc:configviewer}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:configViewer}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:configviewer}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:configViewer}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:configviewer}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:configViewer}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:configviewer}}]]

Revision as of 17:38, 11 October 2020

Hover & click on the images for description

Description

Description:
Splendid™ Config Viewer.
Execution:
call
Groups:
Diagnostic

Syntax

Syntax:
[parent, cfg, showOk, onSelect, onAdd, header] call BIS_fnc_configViewer
Parameters:
parent: Display - (Optional, default mission display) parent display
cfg: Config - (Optional, default all configs) root config
showOk: Boolean - (Optional, default false) true to display OK button. Script will then wait until viewer is closed and return selected class and param
onSelect: Code - (Optional, default {}) executed upon selecting a class. Must return String, which will be shown as structured text instead of params.
onAdd: Code - (Optional, default {}) executed upon adding a class to list. Returned value (STRING) is item text. Empty string will skip the item.
header: String - (Optional, default "%1") custom header. Use %1 to refer to original name ("Splendid Config Viewer")
Return Value:
Array
  • when OK button is not displayed, empty array is returned
  • else, an array of currently selected entries in format [class (Config), param (String)] is returned.

Examples

Example 1:
call BIS_fnc_configViewer;

Additional Information

See also:
BIS_fnc_animViewerBIS_fnc_help

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

Notes

Bottom Section