BIS fnc 3DENShowMessage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *T([a-z ])" to "$1 - t$2")
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.58


|1.00|Game version=
|gr1= Eden Editor
____________________________________________________________________________________________


| ''N/A'' |Description=
|descr= Shows a pop-up message.
____________________________________________________________________________________________
In order to skip any optional parameter in between other parameters, send [[nil]] as parameter.
{{Feature|informative|The following [[Stringtable.xml|stringtable]] entries are useful to add custom [[Code]] but keep the default button texts:
* {{hl|"STR_DISP_OK"}}
* {{hl|"STR_DISP_CLOSE"}}
* {{hl|"STR_DISP_CANCEL"}}
}}
 
|s1= [text, title, buttonOK, buttonCancel, icon, parentDisplay] call [[BIS_fnc_3DENShowMessage]]
 
|p1= text: [[String]] - text to display


| <!-- [] call [[BIS_fnc_3DENShowMessage]]; --> |Syntax=
|p2= title: [[String]] - (Optional, default "") title header


|p1= |Parameter 1=
|p3= buttonOK: [[String]], [[Boolean]] or [[Array]] - (Optional, default "") can be one of:
* [[String]] - button's text
* [[Boolean]] - show button or not
* [[Array]] - in format [<nowiki/>[[String]] or [[Boolean]], [[Code]]]:
** [[String]] or [[Boolean]] - same as above
** [[Code]] - code executed when button is pressed


| |Return value=
|p4= buttonCancel: [[String]], [[Boolean]] or [[Array]] - (Optional, default "") can be one of:
____________________________________________________________________________________________
* [[String]] - button's text
* [[Boolean]] - show button or not
* [[Array]] - in format [<nowiki/>[[String]] or [[Boolean]], [[Code]]]:
** [[String]] or [[Boolean]] - same as above
** [[Code]] - code executed when button is pressed


|x1= <code></code> |Example 1=
|p5= icon: [[String]] - (Optional, default "") path to an icon which will be shown on the left side of the message
____________________________________________________________________________________________


| [[Eden Editor]],[[BIS_fnc_3DENCamera]],[[BIS_fnc_3DENControlsHint]],[[BIS_fnc_3DENDiagCreateList]],[[BIS_fnc_3DENDiagFonts]],[[BIS_fnc_3DENDiagMouseControl]],[[BIS_fnc_3DENDrawLocations]],[[BIS_fnc_3DENEntityMenu]],[[BIS_fnc_3DENExportAttributes]],[[BIS_fnc_3DENExportOldSQM]],[[BIS_fnc_3DENExportTerrainBuilder]],[[BIS_fnc_3DENFlashlight]],[[BIS_fnc_3DENGrid]],[[BIS_fnc_3DENIntel]],[[BIS_fnc_3DENInterface]],[[BIS_fnc_3DENListLocations]],[[BIS_fnc_3DENMissionPreview]],[[BIS_fnc_3DENModuleDescription]],[[BIS_fnc_3DENStatusBar]],[[BIS_fnc_3DENToolbar]],[[BIS_fnc_3DENTutorial]],[[BIS_fnc_3DENVisionMode]] |See also=
|p6= parentDisplay: [[Display]] - (Optional, default <sqf inline>findDisplay 313</sqf> (Eden Display)) display from which the window is opened
}}
 
|r1= [[Display]]
 
|x1= <sqf>["Message","Title of the Message"] call BIS_fnc_3DENShowMessage;</sqf>


<h3 style="display:none">Notes</h3>
|x2= <sqf>
<dl class="command_description">
[
<!-- Note Section BEGIN -->
"Are you sure you want to delete / modify the selected variables?",
"Delete / Modify",
[
"Yes",
{ BIS_Message_Confirmed = true }
],
[
"No",
{ BIS_Message_Confirmed = false }
],
"\A3\ui_f\data\map\markers\handdrawn\warning_CA.paa",
findDisplay 313
] call BIS_fnc_3DENShowMessage;
</sqf>


<!-- Note Section END -->
|x3= <sqf>
</dl>
// Only change the OK button's code
[
"Are you sure you want to delete / modify the selected variables?",
"Delete / Modify",
[
nil,
{ BIS_Message_Confirmed = true }
],
nil,
"\A3\ui_f\data\map\markers\handdrawn\warning_CA.paa",
findDisplay 313
] call BIS_fnc_3DENShowMessage;
</sqf>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[BIS_fnc_guiMessage]]
[[Category:Functions|{{uc:3DENShowMessage}}]]
}}
[[Category:{{Name|arma3}}: Functions|{{uc:3DENShowMessage}}]]
[[Category:Function Group: Eden Editor|{{uc:3DENShowMessage}}]]

Latest revision as of 15:50, 8 November 2023

Hover & click on the images for description

Description

Description:
Shows a pop-up message. In order to skip any optional parameter in between other parameters, send nil as parameter.
The following stringtable entries are useful to add custom Code but keep the default button texts:
  • "STR_DISP_OK"
  • "STR_DISP_CLOSE"
  • "STR_DISP_CANCEL"
Execution:
call
Groups:
Eden Editor

Syntax

Syntax:
[text, title, buttonOK, buttonCancel, icon, parentDisplay] call BIS_fnc_3DENShowMessage
Parameters:
text: String - text to display
title: String - (Optional, default "") title header
buttonOK: String, Boolean or Array - (Optional, default "") can be one of:
buttonCancel: String, Boolean or Array - (Optional, default "") can be one of:
icon: String - (Optional, default "") path to an icon which will be shown on the left side of the message
parentDisplay: Display - (Optional, default findDisplay 313 (Eden Display)) display from which the window is opened
Return Value:
Display

Examples

Example 1:
["Message","Title of the Message"] call BIS_fnc_3DENShowMessage;
Example 2:
[ "Are you sure you want to delete / modify the selected variables?", "Delete / Modify", [ "Yes", { BIS_Message_Confirmed = true } ], [ "No", { BIS_Message_Confirmed = false } ], "\A3\ui_f\data\map\markers\handdrawn\warning_CA.paa", findDisplay 313 ] call BIS_fnc_3DENShowMessage;
Example 3:
// Only change the OK button's code [ "Are you sure you want to delete / modify the selected variables?", "Delete / Modify", [ nil, { BIS_Message_Confirmed = true } ], nil, "\A3\ui_f\data\map\markers\handdrawn\warning_CA.paa", findDisplay 313 ] call BIS_fnc_3DENShowMessage;

Additional Information

See also:
BIS_fnc_guiMessage

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