From 293e784b9626a5b658e0a639ffc325e3101a25c1 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 14 Aug 2024 19:27:15 +0200 Subject: [PATCH] Spectator - Allow spectator on player or a group only (#218) * Overwrite BIS_fnc_EGSpectator * Load after A3_Functions_F_Exp_A * Proper inclusion of altered BIS_fnc_EGSpectator * Works for single units (but not visible on the list) * Attempt to hijack RscDisplayEGSpectator function * Works now * FING WORKS! * Add settings * Convert indentations to spaces in EGSpectator * Create decorator out of EGSpectator(Core) * Create decorator out of RscDisplayEGSpectator * Last cleanup * Get rid of last TABs * Add Return Value to docstrings * Update README * Apply suggestions from code review Co-authored-by: Filip Maciejewski * Change casing --------- Co-authored-by: Filip Maciejewski --- addons/spectator/CfgFunctions.hpp | 21 ++ addons/spectator/CfgScriptPaths.hpp | 4 + addons/spectator/README.md | 1 + addons/spectator/RscDisplayEGSpectator.hpp | 5 + addons/spectator/XEH_PREP.hpp | 1 + addons/spectator/config.cpp | 6 +- .../functions/RscDisplayEGSpectator.sqf | 321 ++++++++++++++++++ .../spectator/functions/fnc_EGSpectator.sqf | 130 +++++++ addons/spectator/functions/fnc_start.sqf | 4 + addons/spectator/initSettings.inc.sqf | 4 +- addons/spectator/stringtable.xml | 4 + .../EGSpectatorCommonDefines.inc | 217 ++++++++++++ include/a3/ui_f/hpp/defineDIKCodes.inc | 190 +++++++++++ include/a3/ui_f/hpp/defineResincl.inc | 22 +- include/a3/ui_f/hpp/defineResinclDesign.inc | 26 +- .../a3/ui_f_exp_a/UI/defineResinclDesign.inc | 0 16 files changed, 936 insertions(+), 20 deletions(-) create mode 100644 addons/spectator/CfgFunctions.hpp create mode 100644 addons/spectator/CfgScriptPaths.hpp create mode 100644 addons/spectator/RscDisplayEGSpectator.hpp create mode 100644 addons/spectator/functions/RscDisplayEGSpectator.sqf create mode 100644 addons/spectator/functions/fnc_EGSpectator.sqf create mode 100644 include/a3/Functions_F_Exp_A/EGSpectatorCommonDefines.inc create mode 100644 include/a3/ui_f/hpp/defineDIKCodes.inc create mode 100644 include/a3/ui_f_exp_a/UI/defineResinclDesign.inc diff --git a/addons/spectator/CfgFunctions.hpp b/addons/spectator/CfgFunctions.hpp new file mode 100644 index 00000000..0fcda425 --- /dev/null +++ b/addons/spectator/CfgFunctions.hpp @@ -0,0 +1,21 @@ +class CfgFunctions +{ + class A3_Expansion_A + { + class Spectator + { + class EGSpectator + { + file = QPATHTOF(functions\DOUBLES(fnc,EGSpectator).sqf); + }; + class EGSpectatorCore + { + file = QUOTE(A3\Functions_F_Exp_A\EGSpectator\fn_EGSpectator.sqf); + }; + class RscDisplayEGSpectatorCore + { + file = QUOTE(A3\Ui_F\Scripts\Gui\rscdisplayegspectator.sqf); + }; + }; + }; +}; diff --git a/addons/spectator/CfgScriptPaths.hpp b/addons/spectator/CfgScriptPaths.hpp new file mode 100644 index 00000000..b004839f --- /dev/null +++ b/addons/spectator/CfgScriptPaths.hpp @@ -0,0 +1,4 @@ +class CfgScriptPaths +{ + ADDON = QPATHTOF(functions\); +}; diff --git a/addons/spectator/README.md b/addons/spectator/README.md index 3c068d2c..1baa7c91 100644 --- a/addons/spectator/README.md +++ b/addons/spectator/README.md @@ -15,6 +15,7 @@ Terminating and reinitializing spectator almost does not bother player, as old p - Free camera - Third Person Perspective - Sides allowed for spectating (player side, friendly sides or all) +- Supports spectating player group or player only - Civilian side spectating - AI spectating - All of above separate for unconscious players! diff --git a/addons/spectator/RscDisplayEGSpectator.hpp b/addons/spectator/RscDisplayEGSpectator.hpp new file mode 100644 index 00000000..2ede01d0 --- /dev/null +++ b/addons/spectator/RscDisplayEGSpectator.hpp @@ -0,0 +1,5 @@ +class RscDisplayEGSpectator +{ + scriptName = "RscDisplayEGSpectator"; + scriptPath = QUOTE(ADDON); +}; diff --git a/addons/spectator/XEH_PREP.hpp b/addons/spectator/XEH_PREP.hpp index 45e791ae..f22e5d34 100644 --- a/addons/spectator/XEH_PREP.hpp +++ b/addons/spectator/XEH_PREP.hpp @@ -1,5 +1,6 @@ PREP(canSpectate); PREP(disable); +PREP(EGSpectator); // This duplicated as BIS_fnc_EGSpectator in CfgFunctions so that BI scripts use updated version PREP(enable); PREP(reloadLocal); PREP(restart); diff --git a/addons/spectator/config.cpp b/addons/spectator/config.cpp index 6ee45631..a0c48405 100644 --- a/addons/spectator/config.cpp +++ b/addons/spectator/config.cpp @@ -7,7 +7,8 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { - "afm_common" + "afm_common", + "A3_Functions_F_Exp_A" }; author = "ArmaForces"; VERSION_CONFIG; @@ -16,3 +17,6 @@ class CfgPatches { #include "CfgEventHandlers.hpp" +#include "CfgFunctions.hpp" +#include "CfgScriptPaths.hpp" +#include "RscDisplayEGSpectator.hpp" diff --git a/addons/spectator/functions/RscDisplayEGSpectator.sqf b/addons/spectator/functions/RscDisplayEGSpectator.sqf new file mode 100644 index 00000000..ff8fb1f7 --- /dev/null +++ b/addons/spectator/functions/RscDisplayEGSpectator.sqf @@ -0,0 +1,321 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Enhanced original RscDisplayEGSpectator to support showing only valid units from group on the list for selection instead of whole group. + * + * Return Value: + * The same as original RscDisplayEGSpectator (Probably none) + * + * Public: No + */ + +/* + Author: + Nelson Duarte + + Description: + Handles spectator display + + Returns: + Multiple values / none + + Event Handlers: + RscDisplayEGSpectator_OnCursorObjectFocused + RscDisplayEGSpectator_OnFocusChanged + RscDisplayEGSpectator_OnUiVisibilityChanged + RscDisplayEGSpectator_MapStateChanged + + Notes: + Not to be used directly +*/ +// Do not serialize this script +disableSerialization; + +// Name this script +scriptName "RscDisplayEGSpectator"; + +// Common spectator defines +#include "\A3\Functions_F_Exp_A\EGSpectatorCommonDefines.inc" + +// Params +private ["_mode", "_params"]; +_mode = _this param [0, "", [""]]; +_params = _this param [1, [], [[]]]; + +if (_mode != "Update_PlayerList") exitWith { + private _return = _this call BIS_fnc_RscDisplayEGSpectatorCore; + + // isNil check is needed to prevent warnings in scheduled + if (isNil "_return") exitWith {}; + _return // return +}; + +switch _mode do +{ + /** + * Updates player list + */ + case "Update_PlayerList" : + { + scriptName "RscDisplayEGSpectator: Update_PlayerList"; + + if !(missionNamespace getVariable [VAR_SHOW_LISTS, true]) exitWith {}; + + private _display = uiNamespace getVariable [VAR_DISPLAY, displayNull]; + private _ctrl = _display displayCtrl IDC_RSCDISPLAYEGSPECTATOR_LIST; + + private _oldList = [] + (uiNamespace getVariable [VAR_ENTITIES_LIST_OLD, []]); + private _groups = [] + (["GetTargetGroups"] call SPEC); + private _validUnits = [] + (["GetTargetEntities"] call SPEC); // Added + + private ["_west", "_east", "_indep", "_civ"]; + _west = []; + _east = []; + _indep = []; + _civ = []; + + // Go through groups and get the valid ones only, also cache group units information + { + private _group = _x; + private _units = units _x; + private _showAiGroups = missionNamespace getVariable [VAR_ALLOW_AI_SWITCH, true]; + private _groupTexture = ["GetGroupTexture", [_group]] call BIS_fnc_dynamicGroups; + private _groupInfo = [_group, side _group, _groupTexture, groupId _group]; + private _unitsInfo = []; + + // Validate units + { + // Added '&& {_validUnits findIf {_x isEqualTo _unit} != -1}' + private _unit = _x; + if (simulationEnabled _x && {!isObjectHidden _x} && {simulationEnabled vehicle _x} && {!isObjectHidden vehicle _x} && {isPlayer _x || {_showAiGroups}} && {_validUnits findIf {_x isEqualTo _unit} != -1} && !(_x isKindOf SPECTATOR_CLASS)) then + { + _unitsInfo pushBack [_x, alive _x, alive _x && { _x getVariable [VAR_INCAPACITATED, false] }, [_x, true, NAME_MAX_CHARACTERS] call BIS_fnc_getName, _group]; + }; + } forEach _units; + + // If we have valid units in the group, group is deemed valid + if (count _unitsInfo > 0) then + { + private _result = [_groupInfo, _unitsInfo]; + + // Add group to corresponding array, divided per side + switch (side _group) do + { + case WEST: { _west pushBack _result; }; + case EAST: { _east pushBack _result; }; + case RESISTANCE: { _indep pushBack _result; }; + default { _civ pushBack _result; }; + }; + }; + } forEach _groups; + + // The new list + private _newList = [_west, _east, _indep, _civ]; + + // Whether an update to the list is required (really only if something changed) + if !(_oldList isEqualTo _newList) then + { + private _allElements = ["TreeGetAllElements"] call DISPLAY; + private _groupElements = _allElements select 1; + private _unitElements = _allElements select 2; + + // Remove units from list which no longer exist + { + private _data = _x; + private _bExists = false; + + { + private _sideList = _x; + + { + private _unitsInfo = _x select 1; + + { + private _unitInfo = _x; + private _unit = _unitInfo select 0; + private _var = [_unit] call BIS_fnc_objectVar; + + if (_var == _data) exitWith + { + _bExists = true; + }; + } + forEach _unitsInfo; + + if (_bExists) exitWith {}; + } + forEach _sideList; + + if (_bExists) exitWith {}; + } + forEach _newList; + + if (!_bExists) then + { + ["TreeDeleteUnit", [_data]] call DISPLAY; + //[" Unit %1 removed", _data] call BIS_fnc_error; + }; + } + forEach _unitElements; + + // Remove groups from list which no longer exist + { + private _data = _x; + private _bExists = false; + + { + private _sideList = _x; + + { + private _groupInfo = _x select 0; + private _group = _groupInfo select 0; + private _id = str _group; + + if (_id == _data) exitWith + { + _bExists = true; + }; + } + forEach _sideList; + + if (_bExists) exitWith {}; + } + forEach _newList; + + if (!_bExists) then + { + ["TreeDeleteGroup", [_data]] call DISPLAY; + //["Group %1 removed", _data] call BIS_fnc_error; + }; + } + forEach _groupElements; + + // Update or add + { + private _sideIndex = _forEachIndex; + private _sideType = switch (_forEachIndex) do + { + case 0: { "WEST"; }; + case 1: { "EAST"; }; + case 2: { "RESISTANCE"; }; + default { "CIVILIAN"; }; + }; + private _sideColor = switch (_forEachIndex) do + { + case 0: { [WEST] call BIS_fnc_sideColor; }; + case 1: { [EAST] call BIS_fnc_sideColor; }; + case 2: { [RESISTANCE] call BIS_fnc_sideColor; }; + default { [CIVILIAN] call BIS_fnc_sideColor; }; + }; + private _sideString = switch (_forEachIndex) do + { + case 0: { localize "str_west"; }; + case 1: { localize "str_east"; }; + case 2: { localize "str_guerrila"; }; + default { localize "str_civilian"; }; + }; + + if (_ctrl tvCount [] == _forEachIndex) then + { + _ctrl tvAdd [[], _sideString]; + _ctrl tvSetData [[_forEachIndex], _sideType]; + }; + + _ctrl tvExpand [_sideIndex]; + //_ctrl tvSort [[_sideIndex], false]; + + { + private _groupInfo = _x select 0; + private _unitsInfo = _x select 1; + private _group = _groupInfo select 0; + private _i = ["TreeGetDataIndex", [str _group]] call DISPLAY; + private _groupIndex = if (count _i > 0) then {_i select 1} else {-1}; + + //["Group %1 with index %2 being checked", _group, _groupIndex] call BIS_fnc_error; + + if (_i isEqualTo []) then + { + _groupIndex = _ctrl tvAdd [[_sideIndex], groupId _group]; + _ctrl tvSetData [[_sideIndex, _groupIndex], str _group]; + _ctrl tvSetPicture [[_sideIndex, _groupIndex], _groupInfo select 2]; + _ctrl tvSetPictureColor [[_sideIndex, _groupIndex], [1, 1, 1, 0.5]]; + _ctrl tvSetTooltip [[_sideIndex, _groupIndex], groupId _group]; + _ctrl tvExpand [_sideIndex, _groupIndex]; + //_ctrl tvSort [[_sideIndex, _groupIndex], false]; + //["Group %1 added with index %2", str _group, _groupIndex] call BIS_fnc_error; + } + else + { + _ctrl tvSetText [_i, groupId _group]; + _ctrl tvSetPicture [_i, _groupInfo select 2]; + _ctrl tvSetPictureColor [_i, [1, 1, 1, 0.5]]; + _ctrl tvSetTooltip [_i, groupId _group]; + //["Group %1 Updated with index %2", str _group, _groupIndex] call BIS_fnc_error; + }; + + { + private ["_unit", "_isAlive", "_isIncapacitated", "_name", "_groupId"]; + _unit = _x select 0; + _isAlive = _x select 1; + _isIncapacitated = _x select 2; + _name = _x select 3; + _groupId = _x select 4; + + private _text = if (isPlayer _unit) then { _name } else { format ["%1: %2", localize "str_player_ai", _name] }; + private _tooltip = if (isPlayer _unit) then { format ["%1 - %2", _name, _groupId] } else { format ["%1: %2 - %3", localize "str_player_ai", _name, _groupId] }; + private _i = ["TreeGetDataIndex", [[_unit] call BIS_fnc_objectVar]] call DISPLAY; + private _unitIndex = if (count _i > 0) then {_i select 1} else {-1}; + private _unitIcon = getText (configfile >> "CfgVehicles" >> typeOf _unit >> "icon"); + + private _texture = switch (true) do + { + case (!_isAlive) : { ICON_DEAD }; + case (_isIncapacitated) : { ICON_REVIVE }; + default { if (_unitIcon != "") then {getText (configfile >> "CfgVehicleIcons" >> _unitIcon)} else {""} }; + }; + + if (_i isEqualTo []) then + { + _unitIndex = _ctrl tvAdd [[_sideIndex, _groupIndex], _text]; + _ctrl tvSetData [[_sideIndex, _groupIndex, _unitIndex], [_unit] call BIS_fnc_objectVar]; + _ctrl tvSetPicture [[_sideIndex, _groupIndex, _unitIndex], _texture]; + _ctrl tvSetPictureColor [[_sideIndex, _groupIndex, _unitIndex], _sideColor]; + _ctrl tvSetTooltip [[_sideIndex, _groupIndex, _unitIndex], _tooltip]; + //[" Unit %1 added (%2 / %3)", [_unit] call BIS_fnc_objectVar, _group, _groupIndex] call BIS_fnc_error; + } + else + { + _ctrl tvSetText [_i, _text]; + _ctrl tvSetPicture [_i, _texture]; + _ctrl tvSetPictureColor [_i, _sideColor]; + _ctrl tvSetTooltip [_i, _tooltip]; + //[" Unit %1 updated (%2 / %3)", [_unit] call BIS_fnc_objectVar, _group, _groupIndex] call BIS_fnc_error; + }; + } + forEach _unitsInfo; + } + forEach _x; + } + forEach _newList; + + // Store the new list + uiNamespace setVariable [VAR_ENTITIES_LIST_OLD, _newList]; + }; + + // Current focused unit + private _focus = ["GetFocus"] call DISPLAY; + + // Update focus if required + if (!isNull _focus && {count tvCurSel _ctrl < 3}) then + { + // Get index of current focus in the list + private _i = ["TreeGetDataIndex", [[_focus] call BIS_fnc_objectVar]] call DISPLAY; + + // If found, select it + if !(_i isEqualTo []) then + { + _ctrl tvSetCurSel _i; + }; + }; + }; +}; diff --git a/addons/spectator/functions/fnc_EGSpectator.sqf b/addons/spectator/functions/fnc_EGSpectator.sqf new file mode 100644 index 00000000..79e266bd --- /dev/null +++ b/addons/spectator/functions/fnc_EGSpectator.sqf @@ -0,0 +1,130 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Enhanced original BIS_fnc_EGSpectator to support array of units/groups as spectator targets instead of sides only. + * + * Arguments: + * 1: _whitelistedSides - Changed to support units/groups too. + * + * Return Value: + * The same as original BIS_fnc_EGSpectator + * + * Public: No + */ + +/* + Author: + Nelson Duarte + + Description: + Spectator instance + + Returns: + Multiple values / none + + Examples: + ["Initialize", [player]] call BIS_fnc_EGSpectator; // Initializes spectator for given player + ["Terminate"] call BIS_fnc_EGSpectator; // Terminates spectator for given player +*/ + +// Do not execute from within 3DEN +if (count (supportInfo "n:is3DEN") > 0 && { is3DEN }) exitWith {}; + +// Do not serialize this script +disableSerialization; + +// Name of this script +scriptName "BIS_fnc_EGSpectator"; + +// Common spectator defines +#include "\A3\Functions_F_Exp_A\EGSpectatorCommonDefines.inc" + +// Parameters +private _mode = _this param [0, "", [""]]; +private _params = _this param [1, [], [[]]]; + +if (_mode != "GetTargetEntities" && _mode != "GetTargetGroups") exitWith { + private _return = _this call BIS_fnc_EGSpectatorCore; + + // isNil check is needed to prevent warnings in scheduled + if (isNil "_return") exitWith {}; + _return // return +}; + +// Sub functions +switch (_mode) do +{ + /** + * Returns entities that are visible to the spectator + */ + case "GetTargetEntities" : + { + private _allowAi = missionNamespace getVariable [VAR_ALLOW_AI_SWITCH, false]; + private _whitelist = missionNamespace getVariable [VAR_WHITELISTED_SIDES, []]; + private _whitelistEmpty = count _whitelist < 1; + private _entities = []; + private _validEntities = []; + + // AI filter + if (_allowAi) then + { + _entities = allUnits; + } + else + { + _entities = [] call BIS_fnc_listPlayers; + }; + + // Side filter + { + if + ( + simulationEnabled _x && {simulationEnabled vehicle _x} && + { !isObjectHidden _x && {!isObjectHidden vehicle _x} } && + { !(_x isKindOf SPECTATOR_CLASS) } && + // Added '|| { group _x in _whitelist || {_x in _whitelist}}' to support unit/group + { (_whitelistEmpty || { side group _x in _whitelist || { group _x in _whitelist || {_x in _whitelist}}}) } + ) then + { + _validEntities pushBack _x; + }; + } forEach _entities; + + _validEntities; + }; + + /** + * Returns groups that are visible to the spectator + */ + case "GetTargetGroups" : + { + private _allowAi = missionNamespace getVariable [VAR_ALLOW_AI_SWITCH, false]; + private _whitelist = missionNamespace getVariable [VAR_WHITELISTED_SIDES, []]; + private _whitelistEmpty = count _whitelist < 1; + private _groups = []; + private _validGroups = []; + + // AI filter + if (_allowAi) then + { + _groups = allGroups; + } + else + { + private _players = [] call BIS_fnc_listPlayers; + { _groups pushBackUnique (group _x); } forEach _players; + }; + + // Side and number of units filter + { + // Added '|| { _x in _whitelist || { units _x findIf {_x in _whitelist} != -1 }}' + if ((_whitelistEmpty || { side _x in _whitelist || { _x in _whitelist || { units _x findIf {_x in _whitelist} != -1 }}}) && {{!(_x isKindOf SPECTATOR_CLASS)} count units _x > 0 }) then + { + _validGroups pushBack _x; + }; + } forEach _groups; + + + _validGroups; + }; +}; diff --git a/addons/spectator/functions/fnc_start.sqf b/addons/spectator/functions/fnc_start.sqf index 90ed140d..2fd5ede6 100644 --- a/addons/spectator/functions/fnc_start.sqf +++ b/addons/spectator/functions/fnc_start.sqf @@ -38,6 +38,10 @@ private _whitelistedSides = switch _sides do { case 1: {[playerSide]}; // All sides spectator case 2: {[WEST, INDEPENDENT, EAST]}; + // Player group only + case 3: {[group player]}; + // Player only + case 4: {[player]}; default {playerSide call BIS_fnc_friendlySides}; }; diff --git a/addons/spectator/initSettings.inc.sqf b/addons/spectator/initSettings.inc.sqf index cc9b6cdb..b5a442aa 100644 --- a/addons/spectator/initSettings.inc.sqf +++ b/addons/spectator/initSettings.inc.sqf @@ -32,7 +32,7 @@ "LIST", [LSTRING(Sides), LSTRING(Sides_Description)], LSTRING(DisplayName), - [[0, 1, 2], [LSTRING(Friendly), LSTRING(Own), "str_all_voices"], 0], + [[0, 1, 3, 4, 2], [LSTRING(Friendly), LSTRING(Own), LSTRING(PlayerGroup), "str_player", "str_all_voices"], 0], 1, {[_this] call FUNC(restart)} ] call CBA_fnc_addSetting; @@ -42,7 +42,7 @@ "LIST", [LSTRING(Sides), LSTRING(Sides_Description)], [LSTRING(DisplayName), LSTRING(Unconscious)], - [[0, 1, 2], [LSTRING(Friendly), LSTRING(Own), "str_all_voices"], 0], + [[0, 1, 3, 4, 2], [LSTRING(Friendly), LSTRING(Own), LSTRING(PlayerGroup), "str_player", "str_all_voices"], 0], 1, {[_this] call FUNC(restart)} ] call CBA_fnc_addSetting; diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index ff2d9a37..7656cbb4 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -49,6 +49,10 @@ Player side Strona gracza + + Player group + Grupa gracza + Allow civilian spectating Pozwól obserwować cywili diff --git a/include/a3/Functions_F_Exp_A/EGSpectatorCommonDefines.inc b/include/a3/Functions_F_Exp_A/EGSpectatorCommonDefines.inc new file mode 100644 index 00000000..c90a8774 --- /dev/null +++ b/include/a3/Functions_F_Exp_A/EGSpectatorCommonDefines.inc @@ -0,0 +1,217 @@ +/** + * Includes + */ +#include "\A3\ui_f\hpp\defineResincl.inc" +#include "\A3\ui_f\hpp\defineResinclDesign.inc" +#include "\A3\ui_f\hpp\defineDIKCodes.inc" +#include "\A3\ui_f\hpp\defineCommonGrids.inc" +#include "\A3\ui_f_exp_a\UI\defineResinclDesign.inc" + +/** + * Development + */ +#define LOG_ENABLED true + +/** + * Functions + */ +#define SPEC { _this call (missionNamespace getVariable ["BIS_fnc_EGSpectator", {}]) } +#define SPEC_DRAW3D { _this call (missionNamespace getVariable ["BIS_fnc_EGSpectatorDraw3D", {}]) } +#define SPEC_DRAW2D { _this call (missionNamespace getVariable ["BIS_fnc_EGSpectatorDraw2D", {}]) } +#define SPEC_GET_UNITS_TO_DRAW { _this call (missionNamespace getVariable ["BIS_fnc_EGSpectatorGetUnitsToDraw", {}]) } +#define CAM { _this call (missionNamespace getVariable ["BIS_fnc_EGSpectatorCamera", {}]) } +#define CAM_TICK { _this call (missionNamespace getVariable ["BIS_fnc_EGSpectatorCameraTick", {}]) } +#define CAM_SET_TARGET { _this call (missionNamespace getVariable ["BIS_fnc_EGSpectatorCameraSetTarget", {}]) } +#define CAM_RESET_TARGET { _this call (missionNamespace getVariable ["BIS_fnc_EGSpectatorCameraResetTarget", {}]) } +#define CAM_PREPARE_TARGET { _this call (missionNamespace getVariable ["BIS_fnc_EGSpectatorCameraPrepareTarget", {}]) } +#define OBJECTIVE_VIZUALIZER { _this call (missionNamespace getVariable ["BIS_fnc_EGObjectiveVisualizer", {}]); } +#define OBJECTIVE_VIZUALIZER_DRAW { _this call (missionNamespace getVariable ["BIS_fnc_EGObjectiveVisualizerDraw", {}]); } +#define DISPLAY { _this call (uiNamespace getVariable ["RscDisplayEGSpectator_script", {}]) } +#define WIDGET { _this call (uiNamespace getVariable ["RscEGProgress_script", {}]); } + +/** + * Spectator + */ +#define SPECTATOR_CLASS "VirtualSpectator_F" +#define VAR_INITIALIZED "BIS_EGSpectator_initialized" +#define VAR_THREAD "BIS_EGSpectator_thread" +#define VAR_DRAW3D "BIS_EGSpectator_draw3D" +#define VAR_CUSTOM_ICONS "BIS_EGSpectator_customIcons" +#define VAR_LOCATIONS "BIS_EGSpectator_locations" +#define VAR_ALLOW_AI_SWITCH "BIS_EGSpectator_allowAiSwitch" +#define VAR_ALLOW_FREE_CAMERA "BIS_EGSpectator_allowFreeCamera" +#define VAR_ALLOW_3PP_CAMERA "BIS_EGSpectator_allow3PPCamera" +#define VAR_SHOW_FOCUS_INFO "BIS_EGSpectator_showFocusInfo" +#define VAR_SHOW_CAMERA_BUTTONS "BIS_EGSpectator_showCameraButtons" +#define VAR_SHOW_CONTROLS_HELPER "BIS_EGSpectator_showControlsHelper" +#define VAR_SHOW_HEADER "BIS_EGSpectator_showHeader" +#define VAR_SHOW_LISTS "BIS_EGSpectator_showLists" +#define VAR_WHITELISTED_SIDES "BIS_EGSpectator_whitelistedSides" +#define VAR_EXCLUDED_UNIT "BIS_EGSpectator_excludedUnit" +#define VAR_EXCLUDED_VEHICLE "BIS_EGSpectator_excludedVehicle" +#define VAR_FIRED "BIS_EGSpectator_fired" +#define VAR_HIGHLIGHT_TIME "BIS_EGSpectator_unitHighlightTime" +#define VAR_UNITS_ICONS_TO_DRAW "BIS_EGSpectator_unitsIconsToDraw" +#define VAR_SHOW_AI_GROUPS "BIS_EGSpectator_showAiGroups" +#define VAR_OBJECT_BBD "BIS_EGSpectator_objectBBD" +#define VAR_ENTITY_RESPAWNED "BIS_EGSpectator_entityRespawned" +#define VAR_EVENT_FIRED "BIS_EGSpectator_entityFired" +#define VAR_VIEW_DISTANCE "BIS_EGSpectator_viewDistance" +#define VAR_PROJECTILES "BIS_EGSpectator_projectiles" +#define VAR_GRENADES "BIS_EGSpectator_grenades" +#define VAR_DRAW_PROJECTILES_PATH "BIS_EGSpectator_drawProjectilesPath" +#define MAX_PROJECTILES 50 +#define MAX_PROJECTILE_SEGMENTS 50 +#define MAX_GRENADES 10 +#define GRENADE_ICON "A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_connect_ca.paa" + +/** + * Spectator Camera + */ +#define VAR_CAMERA "BIS_EGSpectatorCamera_camera" +#define VAR_CAMERA_TYPE "BIS_EGSpectatorCamera_cameraType" +#define VAR_CAMERA_MODE "BIS_EGSpectatorCamera_cameraMode" +#define VAR_CAMERA_TICK "BIS_EGSpectatorCamera_tick" +#define VAR_CAMERA_LAST_TICK_TIME "BIS_EGSpectatorCamera_lastTickTime" +#define VAR_CAMERA_DELTA_TIME "BIS_EGSpectatorCamera_deltaTime" +#define VAR_CAMERA_VISIONMODE "BIS_EGSpectatorCamera_vision" +#define VAR_CAMERA_MARKER "BIS_EGSpectatorCamera_cameraMarker" +#define VAR_CAMERA_DUMMY_TARGET "BIS_EGSpectatorCamera_dummyTarget" +#define VAR_CAMERA_TARGET_IN_VEHICLE "BIS_EGSpectatorCamera_targetInVehicle" +#define VAR_CAMERA_MANUAL "BIS_EGSpectatorCamera_manual" +#define VAR_CAMERA_HEIGHT_MODE "BIS_EGSpectatorCamera_heightMode" +#define VAR_CAMERA_USE_SURFACE_SPEED "BIS_EGSpectatorCamera_useSurfaceSpeed" +#define VAR_CAMERA_HAS_TARGET "BIS_EGSpectatorCamera_freeCamHasTarget" +#define VAR_FOLLOW_CAMERA_ZOOM "BIS_EGSpectatorCamera_zoom" +#define VAR_FOLLOW_CAMERA_ZOOM_TEMP "BIS_EGSpectatorCamera_zoomTemp" +#define VAR_FOLLOW_CAMERA_DIR_TEMP "BIS_EGSpectatorCamera_dirTemp" +#define VAR_FOLLOW_CAMERA_YAW "BIS_EGSpectatorCamera_yaw" +#define VAR_FOLLOW_CAMERA_PITCH "BIS_EGSpectatorCamera_pitch" +#define VAR_CAMERA_LIGHTS "BIS_EGSpectatorCamera_lights" +#define VAR_CAMERA_LIGHTS_ON "BIS_EGSpectatorCamera_lightsOn" +#define VAR_IS_VERY_FAST_SPEED "BIS_EGSpectatorCamera_isVeryFastSpeed" +#define VAR_TARGET_IN_VEHICLE "BIS_EGSpectatorCamera_targetInVehicle" +#define TYPE_CINEMATIC "camera" +#define TYPE_CURATOR "camcurator" +#define MODE_FREE "free" +#define MODE_FOLLOW "follow" +#define MODE_FPS "fps" +#define CAMERA_TYPES [TYPE_CINEMATIC, TYPE_CURATOR] +#define CAMERA_MODES [MODE_FOLLOW, MODE_FPS, MODE_FREE] +#define CAMERA_TARGET_CHANGE_TIME 0.5 +#define FOLLOW_CAMERA_MAX_DISTANCE 5.0 +#define DISTANCE_GROUPS 2500.0 +#define DISTANCE_NAMES 100.0 +#define HEIGHT_OFFSET 1.0 +#define FIRE_HIGHLIGHT_TIME 0.05 +#define SPEED_DEFAULT 0.1 +#define SPEED_FAST 2.0 +#define SPEED_VERYFAST 3.0 + + /** + * Spectator Draw + */ +#define VAR_GROUP_COLOR "BIS_EGSpectatorDraw3D_groupColor" +#define VAR_DRAW_3D_LOCATIONS "BIS_EGSpectatorDraw3D_drawLocations" +#define VAR_VEHICLE_TEXTURE "BIS_EGSpectatorDraw2D_vehicleTexture" +#define VAR_SIDE_COLOR "BIS_EGSpectatorDraw2D_sideColor" + +/** + * RscDisplayEGSpectator + */ +#define VAR_DISPLAY "RscEGSpectator_display" +#define VAR_LOOP "RscEGSpectator_loop" +#define VAR_TICK "RscEGSpectator_tick" +#define VAR_LAST_TICK_TIME "RscEGSpectator_lastTickTime" +#define VAR_KEY_DOWN "RscEGSpectator_keyDown" +#define VAR_KEY_UP "RscEGSpectator_keyUp" +#define VAR_MOUSE_BUTTON_DOWN "RscEGSpectator_mouseButtonDown" +#define VAR_MOUSE_BUTTON_UP "RscEGSpectator_mouseButtonUp" +#define VAR_MOUSE_DBL_BUTTON_DOWN "RscEGSpectator_mouseDblButtonDown" +#define VAR_MOUSE_Z_CHANGED "RscEGSpectator_mouseZChanged" +#define VAR_MOUSE_MOVING "RscEGSpectator_mouseMoving" +#define VAR_IS_HOLDING_RIGHT_M_BUTTON "RscEGSpectator_isHoldingRightMouseButton" +#define VAR_CHILD_DESTROYED "RscEGSpectator_childDestroyed" +#define VAR_LAST_PLAYER_INDEX "RscEGSpectator_lastPlayerIndex" +#define VAR_INTERFACE_VISIBLE "RscEGSpectator_interfaceVisible" +#define VAR_TIME_LEFT "RscEGSpectator_timeLeft" +#define VAR_CURSOR_OBJECT "RscEGSpectator_cursorObject" +#define VAR_FOCUS "RscEGSpectator_focus" +#define VAR_OLD_FOCUS "RscEGSpectator_oldFocus" +#define VAR_OLD_FOCUS_INFO "RscEGSpectator_oldFocusInfo" +#define VAR_MARKERS "RscEGSpectator_markers" +#define VAR_TREE_MOUSE_ENTER "RscEGSpectator_treeMouseEnter" +#define VAR_TREE_MOUSE_EXIT "RscEGSpectator_treeMouseExit" +#define VAR_ENTITIES_LIST_OLD "RscEGSpectator_entitiesListOld" +#define VAR_LOCATIONS_LIST_OLD "RscEGSpectator_locationsListOld" +#define VAR_LIST_TYPE "RscEGSpectator_listType" +#define VAR_TREE_PLAYER_CLICKED "RscEGSpectator_treePlayerClicked" +#define VAR_TREE_PLAYER_DBL_CLICKED "RscEGSpectator_treePlayerDblClicked" +#define VAR_CAM_BUTTON_CLICKED "RscEGSpectator_camButtonClicked" +#define VAR_TABS_CLICKED "RscEGSpectator_tabEntitiesClicked" +#define VAR_TABS_MOUSE_ENTER "RscEGSpectator_tabEntitiesMouseEnter" +#define VAR_TABS_MOUSE_EXIT "RscEGSpectator_tabEntitiesMouseExit" +#define VAR_CAMERA_MODE_CHANGED "RscEGSpectator_cameraModeChanged" +#define VAR_GAME_PHASE "RscEGSpectator_gamePhase" +#define VAR_MAP_VISIBLE "RscEGSpectator_mapVisible" +#define VAR_MAP_CLICKED "RscEGSpectator_mapMouseButtonClick" +#define VAR_MAP_DRAW "RscEGSpectator_mapDraw" +#define VAR_MAP_HIGHLIGHTED_OBJECT "RscEGSpectator_mapHighlightedObject" +#define VAR_HEAD_TO_HEAD_SHOWN "RscEGSpectator_headToHeadShown" +#define VAR_SIDE_A_TASK "RscEGSpectator_sideATask" +#define VAR_SIDE_B_TASK "RscEGSpectator_sideBTask" +#define VAR_SIDE_A_FLASHING "RscEGSpectator_sideAFlashing" +#define VAR_SIDE_B_FLASHING "RscEGSpectator_sideBFlashing" +#define VAR_DOUBLE_CLICK_TIME "RscEGSpectator_doubleClickTime" +#define VAR_DEFAULT_HELP_X "RscEGSpectator_defaulthelpX" +#define VAR_DEFAULT_HELP_Y "RscEGSpectator_defaulthelpY" +#define VAR_DEFAULT_HELP_W "RscEGSpectator_defaulthelpW" +#define VAR_DEFAULT_HELP_H "RscEGSpectator_defaulthelpH" +#define VAR_FOCUS_WIDGET_VISIBLE "RscEGSpectator_focusWidgetVisible" +#define VAR_AVAILABLE_INSIGNIAS "RscEGSpectator_availableInsignias" +#define VAR_CONTROLS_HELP_VISIBLE "RscEGSpectator_controlsHelpVisible" +#define LIST_ENTITIES localize "STR_A3_Spectator_Entities" +#define LIST_LOCATIONS localize "STR_A3_Spectator_Locations" +#define LIST_TYPE LIST_ENTITIES +#define LIST_UPDATE_RATE 1.0 +#define NAME_MAX_CHARACTERS 17 +#define MAP_MIN_ENTITY_DISTANCE 30.0 +#define LOOP_RATE 0.25 +#define MAX_VIEW_DISTANCE 2500 +#define MIN_VIEW_DISTANCE 500 +#define DEFAULT_VIEW_DISTANCE 1200 +#define DOUBLE_CLICK_DELAY 0.5 +#define MAX_CONTROLS_HELP_ENTRIES 12 + +/** + * Progress Visualizer + */ +#define VAR_OBJECTS "BIS_progressVisualizer_objects" +#define VAR_DISPLAYS "BIS_progressVisualizer_displays" + +/** + * Textures + */ +#define ICON_BACKGROUND "A3\Ui_f\data\IGUI\Cfg\simpleTasks\background1_ca.paa" +#define ICON_DEAD "a3\Ui_F_Curator\Data\CfgMarkers\kia_ca.paa" +#define ICON_GROUP "a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\GroupIcon_ca.paa" +#define ICON_UNIT "a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\UnitIcon_ca.paa" +#define ICON_REVIVE "a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\ReviveIcon_ca.paa" +#define ICON_BACKGROUND_UNIT "a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\UnitName_ca.paa" +#define ICON_CAMERA "a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\cameraTexture_ca.paa" +#define CAM_ICON_FREE "a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\FreeSelected.paa" +#define CAM_ICON_FREE_SELECTED "a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\Free.paa" +#define CAM_ICON_FOLLOW "a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\FollowSelected.paa" +#define CAM_ICON_FOLLOW_SELECTED "a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\Follow.paa" +#define CAM_ICON_FPS "a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\FpsSelected.paa" +#define CAM_ICON_FPS_SELECTED "a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\Fps.paa" + +/** + * Colors + */ +#define COLOR_INCAPACITATED [0.5,0,0,1] + +/** + * Revive + */ +#define VAR_INCAPACITATED "BIS_revive_incapacitated" diff --git a/include/a3/ui_f/hpp/defineDIKCodes.inc b/include/a3/ui_f/hpp/defineDIKCodes.inc new file mode 100644 index 00000000..c641d601 --- /dev/null +++ b/include/a3/ui_f/hpp/defineDIKCodes.inc @@ -0,0 +1,190 @@ +#ifndef DIK_ESCAPE + +/**************************************************************************** + * + * DirectInput keyboard scan codes + * + ****************************************************************************/ + +#define DIK_ESCAPE 0x01 +#define DIK_1 0x02 +#define DIK_2 0x03 +#define DIK_3 0x04 +#define DIK_4 0x05 +#define DIK_5 0x06 +#define DIK_6 0x07 +#define DIK_7 0x08 +#define DIK_8 0x09 +#define DIK_9 0x0A +#define DIK_0 0x0B +#define DIK_MINUS 0x0C /* - on main keyboard */ +#define DIK_EQUALS 0x0D +#define DIK_BACK 0x0E /* backspace */ +#define DIK_TAB 0x0F +#define DIK_Q 0x10 +#define DIK_W 0x11 +#define DIK_E 0x12 +#define DIK_R 0x13 +#define DIK_T 0x14 +#define DIK_Y 0x15 +#define DIK_U 0x16 +#define DIK_I 0x17 +#define DIK_O 0x18 +#define DIK_P 0x19 +#define DIK_LBRACKET 0x1A +#define DIK_RBRACKET 0x1B +#define DIK_RETURN 0x1C /* Enter on main keyboard */ +#define DIK_LCONTROL 0x1D +#define DIK_A 0x1E +#define DIK_S 0x1F +#define DIK_D 0x20 +#define DIK_F 0x21 +#define DIK_G 0x22 +#define DIK_H 0x23 +#define DIK_J 0x24 +#define DIK_K 0x25 +#define DIK_L 0x26 +#define DIK_SEMICOLON 0x27 +#define DIK_APOSTROPHE 0x28 +#define DIK_GRAVE 0x29 /* accent grave */ +#define DIK_LSHIFT 0x2A +#define DIK_BACKSLASH 0x2B +#define DIK_Z 0x2C +#define DIK_X 0x2D +#define DIK_C 0x2E +#define DIK_V 0x2F +#define DIK_B 0x30 +#define DIK_N 0x31 +#define DIK_M 0x32 +#define DIK_COMMA 0x33 +#define DIK_PERIOD 0x34 /* . on main keyboard */ +#define DIK_SLASH 0x35 /* / on main keyboard */ +#define DIK_RSHIFT 0x36 +#define DIK_MULTIPLY 0x37 /* * on numeric keypad */ +#define DIK_LMENU 0x38 /* left Alt */ +#define DIK_SPACE 0x39 +#define DIK_CAPITAL 0x3A +#define DIK_F1 0x3B +#define DIK_F2 0x3C +#define DIK_F3 0x3D +#define DIK_F4 0x3E +#define DIK_F5 0x3F +#define DIK_F6 0x40 +#define DIK_F7 0x41 +#define DIK_F8 0x42 +#define DIK_F9 0x43 +#define DIK_F10 0x44 +#define DIK_NUMLOCK 0x45 +#define DIK_SCROLL 0x46 /* Scroll Lock */ +#define DIK_NUMPAD7 0x47 +#define DIK_NUMPAD8 0x48 +#define DIK_NUMPAD9 0x49 +#define DIK_SUBTRACT 0x4A /* - on numeric keypad */ +#define DIK_NUMPAD4 0x4B +#define DIK_NUMPAD5 0x4C +#define DIK_NUMPAD6 0x4D +#define DIK_ADD 0x4E /* + on numeric keypad */ +#define DIK_NUMPAD1 0x4F +#define DIK_NUMPAD2 0x50 +#define DIK_NUMPAD3 0x51 +#define DIK_NUMPAD0 0x52 +#define DIK_DECIMAL 0x53 /* . on numeric keypad */ +#define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */ +#define DIK_F11 0x57 +#define DIK_F12 0x58 + +#define DIK_F13 0x64 /* (NEC PC98) */ +#define DIK_F14 0x65 /* (NEC PC98) */ +#define DIK_F15 0x66 /* (NEC PC98) */ + +#define DIK_KANA 0x70 /* (Japanese keyboard) */ +#define DIK_ABNT_C1 0x73 /* / ? on Portugese (Brazilian) keyboards */ +#define DIK_CONVERT 0x79 /* (Japanese keyboard) */ +#define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */ +#define DIK_YEN 0x7D /* (Japanese keyboard) */ +#define DIK_ABNT_C2 0x7E /* Numpad . on Portugese (Brazilian) keyboards */ +#define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */ +#define DIK_PREVTRACK 0x90 /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */ +#define DIK_AT 0x91 /* (NEC PC98) */ +#define DIK_COLON 0x92 /* (NEC PC98) */ +#define DIK_UNDERLINE 0x93 /* (NEC PC98) */ +#define DIK_KANJI 0x94 /* (Japanese keyboard) */ +#define DIK_STOP 0x95 /* (NEC PC98) */ +#define DIK_AX 0x96 /* (Japan AX) */ +#define DIK_UNLABELED 0x97 /* (J3100) */ +#define DIK_NEXTTRACK 0x99 /* Next Track */ +#define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */ +#define DIK_RCONTROL 0x9D +#define DIK_MUTE 0xA0 /* Mute */ +#define DIK_CALCULATOR 0xA1 /* Calculator */ +#define DIK_PLAYPAUSE 0xA2 /* Play / Pause */ +#define DIK_MEDIASTOP 0xA4 /* Media Stop */ +#define DIK_VOLUMEDOWN 0xAE /* Volume - */ +#define DIK_VOLUMEUP 0xB0 /* Volume + */ +#define DIK_WEBHOME 0xB2 /* Web home */ +#define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */ +#define DIK_DIVIDE 0xB5 /* / on numeric keypad */ +#define DIK_SYSRQ 0xB7 +#define DIK_RMENU 0xB8 /* right Alt */ +#define DIK_PAUSE 0xC5 /* Pause */ +#define DIK_HOME 0xC7 /* Home on arrow keypad */ +#define DIK_UP 0xC8 /* UpArrow on arrow keypad */ +#define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */ +#define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */ +#define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */ +#define DIK_END 0xCF /* End on arrow keypad */ +#define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */ +#define DIK_NEXT 0xD1 /* PgDn on arrow keypad */ +#define DIK_INSERT 0xD2 /* Insert on arrow keypad */ +#define DIK_DELETE 0xD3 /* Delete on arrow keypad */ +#define DIK_LWIN 0xDB /* Left Windows key */ +#define DIK_RWIN 0xDC /* Right Windows key */ +#define DIK_APPS 0xDD /* AppMenu key */ +#define DIK_POWER 0xDE /* System Power */ +#define DIK_SLEEP 0xDF /* System Sleep */ +#define DIK_WAKE 0xE3 /* System Wake */ +#define DIK_WEBSEARCH 0xE5 /* Web Search */ +#define DIK_WEBFAVORITES 0xE6 /* Web Favorites */ +#define DIK_WEBREFRESH 0xE7 /* Web Refresh */ +#define DIK_WEBSTOP 0xE8 /* Web Stop */ +#define DIK_WEBFORWARD 0xE9 /* Web Forward */ +#define DIK_WEBBACK 0xEA /* Web Back */ +#define DIK_MYCOMPUTER 0xEB /* My Computer */ +#define DIK_MAIL 0xEC /* Mail */ +#define DIK_MEDIASELECT 0xED /* Media Select */ + +/* + * Alternate names for keys, to facilitate transition from DOS. + */ +#define DIK_BACKSPACE DIK_BACK /* backspace */ +#define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */ +#define DIK_LALT DIK_LMENU /* left Alt */ +#define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */ +#define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */ +#define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */ +#define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */ +#define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */ +#define DIK_RALT DIK_RMENU /* right Alt */ +#define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */ +#define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */ +#define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */ +#define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */ +#define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */ +#define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */ + +/* + * Alternate names for keys originally not used on US keyboards. + */ +#define DIK_CIRCUMFLEX DIK_PREVTRACK /* Japanese keyboard */ + + +/* + * Combination keys + */ +#define INPUT_CTRL_OFFSET 512 +#define INPUT_SHIFT_OFFSET 1024 +#define INPUT_ALT_OFFSET 2048 + + +#endif /* DIK_ESCAPE */ + diff --git a/include/a3/ui_f/hpp/defineResincl.inc b/include/a3/ui_f/hpp/defineResincl.inc index a7fb97b3..5ebd4ebb 100644 --- a/include/a3/ui_f/hpp/defineResincl.inc +++ b/include/a3/ui_f/hpp/defineResincl.inc @@ -1312,6 +1312,8 @@ enum #define IDC_OPTIONS_SHADOW_VISIBILIT_TEXT 313 #define IDC_OPTIONS_TRAFFIC_VISIBILITY_VALUE 314 #define IDC_OPTIONS_TRAFFIC_VISIBILITY_SLIDER 315 +#define IDC_OPTIONS_PIP_VISIBILITY_VALUE 316 +#define IDC_OPTIONS_PIP_VISIBILITY_SLIDER 317 #define IDC_OPTIONS_PIP_VALUE 334 #define IDC_OPTIONS_SW_VALUE 335 @@ -1376,6 +1378,7 @@ enum #define IDC_OPTIONS_PP_DOF_SLIDER 1317 #define IDC_OPTIONS_PP_DOF_VALUE 1318 #define IDC_OPTIONS_PP_CAUSTICS 1319 +#define IDC_OPTIONS_PP_HAZE 1329 #define IDC_OPTIONS_PP_SHARPEN_SLIDER 1320 #define IDC_OPTIONS_PP_SHARPEN_VALUE 1321 #define IDC_OPTIONS_PP_COLOR_CORRECTIONS 1322 @@ -1433,11 +1436,22 @@ enum #define IDC_OPTIONS_PLAYER_VOICE 112 #define IDC_OPTIONS_VON_VALUE 113 #define IDC_OPTIONS_VON_SLIDER 114 +//samples setting was replaced by audio output device #define IDC_OPTIONS_SAMPLES_VALUE 115 #define IDC_OPTIONS_SAMPLES_SLIDER 116 + +#define IDC_OPTIONS_AUDIO_OUTPUT_REFRESH 115 +#define IDC_OPTIONS_AUDIO_OUTPUT_COMBO 116 + #define IDC_OPTIONS_MIC_SENS_SLIDER 117 #define IDC_OPTIONS_MIC_ADJUST 118 +#define IDC_OPTIONS_MAPDUCKING_VALUE 119 +#define IDC_OPTIONS_MAPDUCKING_SLIDER 120 + +#define IDC_OPTIONS_UI_VALUE 121 +#define IDC_OPTIONS_UI_SLIDER 122 + // microphone adjustment #define IDC_OPTIONS_MIC_PROGRESS_BAR 1001 #define IDC_OPTIONS_MIC_PROGRESS 1002 @@ -1540,8 +1554,8 @@ enum #define IDC_FRIENDS_GAME_INVITE_VOICE 114 #define IDC_FRIENDS_PLAY_MESSAGE 115 #define IDC_FRIENDS_MISSIONS 152 -// #define IDC_MULTI_BATTLEYE_FILTER 154 -// #define IDC_MULTI_EXPANSIONS_FILTER 155 +#define IDC_MULTI_BATTLEYE_FILTER 154 +#define IDC_MULTI_EXPANSIONS_FILTER 155 // Send voice mail dialog #define IDC_SVM_TITLE 101 @@ -1682,7 +1696,7 @@ enum #define IDC_MP_QUICK_MAX_PING 111 #define IDC_MP_QUICK_BEST_SERVER 112 #define IDC_MP_QUICK_FIND_SERVER 113 -// #define IDC_MP_QUICK_SHOW_SERVERS 114 +#define IDC_MP_QUICK_SHOW_SERVERS 114 #define IDC_MP_QUICK_SHOW_SERVERS 114 #define IDC_MP_QUICK_MODE_TITLE 115 #define IDC_MP_QUICK_MODE_PICTURE 116 @@ -3173,4 +3187,4 @@ enum #define HZ_TANK_BOTH_TRACKS 32 -#endif +#endif \ No newline at end of file diff --git a/include/a3/ui_f/hpp/defineResinclDesign.inc b/include/a3/ui_f/hpp/defineResinclDesign.inc index 69d4a869..0c669371 100644 --- a/include/a3/ui_f/hpp/defineResinclDesign.inc +++ b/include/a3/ui_f/hpp/defineResinclDesign.inc @@ -328,19 +328,19 @@ #define IDC_RSCDISPLAYRESPAWN_MAP 1050 //--- RscDisplaySelectIsland -// #define IDC_RSCDISPLAYSELECTISLAND_TITLE 1000 -// #define IDC_RSCDISPLAYSELECTISLAND_NAME 1002 -// #define IDC_RSCDISPLAYSELECTISLAND_AUTHOR 1003 -// #define IDC_RSCDISPLAYSELECTISLAND_NAMEBACKGROUND 1004 -// #define IDC_RSCDISPLAYSELECTISLAND_ISLANDPANORAMA 1200 -// #define IDC_RSCDISPLAYSELECTISLAND_INTERLACING 1201 -// #define IDC_RSCDISPLAYSELECTISLAND_CLOUD1 1202 -// #define IDC_RSCDISPLAYSELECTISLAND_CLOUD2 1203 -// #define IDC_RSCDISPLAYSELECTISLAND_CLOUD3 1204 -// #define IDC_RSCDISPLAYSELECTISLAND_CLOUD4 1205 -// #define IDC_RSCDISPLAYSELECTISLAND_ISLANDGROUP 2300 -// #define IDC_RSCDISPLAYSELECTISLAND_BUTTONCONTINUE 2600 -// #define IDC_RSCDISPLAYSELECTISLAND_BUTTONCANCEL 2700 +#define IDC_RSCDISPLAYSELECTISLAND_TITLE 1000 +#define IDC_RSCDISPLAYSELECTISLAND_NAME 1002 +#define IDC_RSCDISPLAYSELECTISLAND_AUTHOR 1003 +#define IDC_RSCDISPLAYSELECTISLAND_NAMEBACKGROUND 1004 +#define IDC_RSCDISPLAYSELECTISLAND_ISLANDPANORAMA 1200 +#define IDC_RSCDISPLAYSELECTISLAND_INTERLACING 1201 +#define IDC_RSCDISPLAYSELECTISLAND_CLOUD1 1202 +#define IDC_RSCDISPLAYSELECTISLAND_CLOUD2 1203 +#define IDC_RSCDISPLAYSELECTISLAND_CLOUD3 1204 +#define IDC_RSCDISPLAYSELECTISLAND_CLOUD4 1205 +#define IDC_RSCDISPLAYSELECTISLAND_ISLANDGROUP 2300 +#define IDC_RSCDISPLAYSELECTISLAND_BUTTONCONTINUE 2600 +#define IDC_RSCDISPLAYSELECTISLAND_BUTTONCANCEL 2700 //--- RscSpectator #define IDC_RSCSPECTATOR_PLAYERNAMEBACKGROUND 1000 diff --git a/include/a3/ui_f_exp_a/UI/defineResinclDesign.inc b/include/a3/ui_f_exp_a/UI/defineResinclDesign.inc new file mode 100644 index 00000000..e69de29b