Difference between revisions of "VN fnc artillery menu"

From Savage Game Design Wiki
Jump to navigation Jump to search
m (Text replacement - " |e=" to " |a= |e=")
(Page filling)
Line 1: Line 1:
 
 
{{Function
 
{{Function
  
Line 8: Line 7:
 
|a=
 
|a=
  
|e=
+
|e= local
  
 
|g1= artillery_functions
 
|g1= artillery_functions
  
|d= <pre>/*
+
|d= Artillery Menu master function
    File: fn_artillery_menu.sqf
 
    Author: Ethan Johnson
 
    Date: 2020-04-29
 
    Last Update: 2020-06-09
 
    Public: Yes
 
 
 
    Description:
 
    Artillery master fuction for the menu
 
 
 
    Parameter(s):
 
    _mode - Mode to call for the menu [STRING, defaults to ""]
 
    _params - Mode to call for the menu [ARRAY, defaults to []]
 
 
 
    Returns:
 
    Function reached the end [BOOL]
 
 
 
    Example(s):
 
    ["init"] call vn_fnc_artillery_menu
 
*/
 
 
 
#define DISPLAY (uiNamespace getVariable ["vn_artillery_display",displayNull])
 
 
 
#define TITLE    (DISPLAY displayctrl 350)
 
 
 
#define CALLSIGN_LIST    (DISPLAY displayctrl 102)
 
#define AMMO_LIST    (DISPLAY displayctrl 103)
 
#define AMMO_DESCRIPTION    (DISPLAY displayctrl 203)
 
#define AMOUNT_COMBO    (DISPLAY displayctrl 104)
 
#define BUTTON  (DISPLAY displayctrl 105)
 
#define MAP    (DISPLAY displayctrl 7001)
 
 
 
#define AMMO_INDEX    (lbCurSel AMMO_LIST)
 
#define CALLSIGN_INDEX    (lbCurSel CALLSIGN_LIST)
 
#define CALLSIGN_VALUE    (CALLSIGN_LIST lbValue (lbCurSel CALLSIGN_LIST))
 
#define AMOUNT_INDEX    (lbCurSel AMOUNT_COMBO)
 
 
 
</pre><small>''(Placeholder description extracted from the function header by '''LM_exportFunctionsToWiki.sqf''')''</small>
 
  
|s= [] call [[VN_fnc_artillery_menu]];
+
|s= [mode, params] call [[VN_fnc_artillery_menu]]
  
|p1n=
+
|p1n= mode
|p1t=
+
|p1t= string
|p1d=
+
|p1d= mode to call for the menu. Case-insensitive. Can be one of:
|p1v=
+
<div style="columns: 4">
 +
* <tt>"init"</tt>
 +
* <tt>"draw"</tt>
 +
* <tt>"radio:type"</tt>
 +
* <tt>"onLoad"</tt>
 +
* <tt>"onUnload"</tt>
 +
* <tt>"lbSelChanged"</tt>
 +
* <tt>"mouseButtonDown"</tt>
 +
* <tt>"mouseButtonUp"</tt>
 +
* <tt>"mouseMoving"</tt>
 +
* <tt>"gui:setup"</tt>
 +
* <tt>"gui:clear"</tt>
 +
* <tt>"gui:combo:ammo"</tt>
 +
* <tt>"gui:combo:callsign"</tt>
 +
* <tt>"gui:combo:amount"</tt>
 +
* <tt>"gui:combo:callsign"</tt>
 +
* <tt>"gui:button:bombardment"</tt>
 +
</div>
 +
|p1v= ""
  
|p2n=
+
|p2n= params
|p2t=
+
|p2t= array
|p2d=
+
|p2d= arguments. Can be:
|p2v=
+
* for <tt>"init"</tt> and <tt>"onLoad"</tt>: [{{Biki|Display}}]
 +
* for <tt>"lbSelChanged"</tt>: {{Biki|Array}} of {{Biki|Number|Numbers}}, format [ctrlIndex, lbIndex]
 +
* for <tt>"mouseButtonDown"</tt> and <tt>"mouseButtonUp"</tt>: same as {{Biki|User Interface Event Handlers#onMouseButtonDown|their respective event handlers}}, e.g ["_ctrl", "_button", "_xPos", "_yPos", "_shift", "_ctrl", "_alt"]
 +
* for <tt>"mouseMoving"</tt>: same as {{Biki|User Interface Event Handlers#onMouseMoving|its respective event handler}}, e.g ["_ctrl", "_xPos", "_yPos", "_mouseOver"]
 +
|p2v= []
  
|r1t=
+
|r1t= boolean
|r1d=
+
|r1d= function reached the end
  
|x1= <code>-</code>
+
|x1= <code>["init"] call VN_fnc_artillery_menu</code>
 
}}
 
}}

Revision as of 22:20, 5 January 2021

← back to Functions Introduced in S.O.G. Prairie Fire v1.00
by Ethan Johnson
Argument(s): n/a
Effect(s): local

Description

Artillery Menu master function

Syntax

Syntax
[mode, params] call VN_fnc_artillery_menu
Parameters
mode: String - (Optional, default "") mode to call for the menu. Case-insensitive. Can be one of:
  • "init"
  • "draw"
  • "radio:type"
  • "onLoad"
  • "onUnload"
  • "lbSelChanged"
  • "mouseButtonDown"
  • "mouseButtonUp"
  • "mouseMoving"
  • "gui:setup"
  • "gui:clear"
  • "gui:combo:ammo"
  • "gui:combo:callsign"
  • "gui:combo:amount"
  • "gui:combo:callsign"
  • "gui:button:bombardment"
params: Array - (Optional, default []) arguments. Can be:
Return value
Boolean - function reached the end

Examples

Example 1
["init"] call VN_fnc_artillery_menu