mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
/*
|
|
* Author: Ruthberg
|
|
* Handles the Kestrel 4500 dialog button actions
|
|
*
|
|
* Arguments:
|
|
* buttonID <integer>
|
|
*
|
|
* Return Value:
|
|
* Nothing
|
|
*
|
|
* Example:
|
|
* 2 call ace_kestrel4500_fnc_buttonPressed
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
switch (_this) do {
|
|
case 0: { // Enter
|
|
if (!GVAR(MinAvgMAx) && (GVAR(Menu) == 2 || GVAR(Menu) == 3)) then {
|
|
GVAR(RefHeading) = getDir ACE_player;
|
|
};
|
|
if (GVAR(MinAvgMAx) && GVAR(Menu) > 0 && GVAR(Menu) < 4) then {
|
|
if (GVAR(MinAvgMAxMode) != 1) then {
|
|
{
|
|
GVAR(MIN) set [_x, 0];
|
|
GVAR(MAX) set [_x, 0];
|
|
GVAR(TOTAL) set [_x, 0];
|
|
GVAR(ENTRIES) set [_x, 0];
|
|
} forEach [1, 2, 3];
|
|
};
|
|
GVAR(MinAvgMaxMode) = GVAR(MinAvgMaxMode + 1) % 3;
|
|
};
|
|
};
|
|
case 1: { // Top
|
|
GVAR(Menu) = (GVAR(Menu) - 1 + (count GVAR(Menus))) % (count GVAR(Menus));
|
|
};
|
|
case 2: { // Bottom
|
|
GVAR(Menu) = (GVAR(Menu) + 1 + (count GVAR(Menus))) % (count GVAR(Menus));
|
|
};
|
|
case 3: { // Left
|
|
GVAR(MinAvgMaxMode) = !GVAR(MinAvgMaxMode);
|
|
};
|
|
case 4: { // Right
|
|
GVAR(MinAvgMaxMode) = !GVAR(MinAvgMaxMode);
|
|
};
|
|
case 5: { // Memory
|
|
};
|
|
case 6: { // Backlight
|
|
};
|
|
};
|
|
|
|
[] call FUNC(updateDisplay);
|