From 155503d4a105ee5c2b64deb05da5467d194cd821 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sat, 14 Feb 2015 20:06:55 +0100 Subject: [PATCH 01/16] Merged GUI into common. Removed unnecessary GUI functions. Updated displayIcon function to be more dynamic Added client side settings for displaying icons. --- addons/common/HintConfig.hpp | 96 ++++++++++ addons/common/ProgressScreen.hpp | 3 - addons/common/XEH_preInit.sqf | 2 + addons/common/config.cpp | 10 + addons/{gui/UI => common}/define.hpp | 12 +- .../functions/fnc_blurScreen.sqf | 2 +- addons/common/functions/fnc_displayIcon.sqf | 111 +++++++++++ .../functions/fnc_displayInformation.sqf | 4 +- .../functions/fnc_displayMessage.sqf | 5 +- addons/common/functions/fnc_progressBar.sqf | 4 +- .../fnc_sendDisplayInformationTo.sqf | 2 +- .../functions/fnc_sendDisplayMessageTo.sqf | 2 +- addons/common/stringtable.xml | 6 + addons/gui/CfgEventHandlers.hpp | 11 -- addons/gui/GUI.hpp | 2 - addons/gui/README.md | 11 -- addons/gui/UI/RscTitles.hpp | 179 ------------------ addons/gui/XEH_postInit.sqf | 11 -- addons/gui/XEH_preInit.sqf | 25 --- addons/gui/config.cpp | 27 --- addons/gui/data/buttonDisabled.paa | Bin 1564 -> 0 bytes addons/gui/data/buttonDisabled_gradient.paa | Bin 1816 -> 0 bytes addons/gui/data/buttonNormal.paa | Bin 1564 -> 0 bytes addons/gui/data/buttonNormal_gradient.paa | Bin 1989 -> 0 bytes addons/gui/data/buttonNormal_gradient2.paa | Bin 2035 -> 0 bytes addons/gui/data/buttonNormal_gradient3.paa | Bin 2044 -> 0 bytes addons/gui/data/buttonNormal_gradient_top.paa | Bin 1995 -> 0 bytes .../gui/data/buttonNormal_gradient_top_w.paa | Bin 1856 -> 0 bytes addons/gui/empty.hpp | 21 -- addons/gui/functions/fnc_displayIcon.sqf | 79 -------- addons/gui/functions/fnc_loadingbar.sqf | 64 ------- addons/gui/functions/fnc_sendHintTo.sqf | 26 --- addons/gui/functions/fnc_sendMessageTo.sqf | 31 --- addons/gui/functions/script_component.hpp | 12 -- addons/gui/script_component.hpp | 12 -- addons/gui/stringtable.xml | 7 - addons/medical/config.cpp | 2 +- .../fnc_ActionCheckBloodPressureLocal.sqf | 2 +- .../functions/fnc_ActionCheckPulse.sqf | 6 +- .../fnc_ActioncheckBloodPressure.sqf | 6 +- .../medical/functions/fnc_actionCarryUnit.sqf | 4 +- .../functions/fnc_actionCheckPulseLocal.sqf | 2 +- .../functions/fnc_actionCheckResponse.sqf | 8 +- .../medical/functions/fnc_actionDragUnit.sqf | 4 +- .../functions/fnc_actionRemoveTourniquet.sqf | 4 +- addons/medical/functions/fnc_handleHeal.sqf | 2 +- ...fnc_handleTreatment_Action_AirwayLocal.sqf | 2 +- ...nc_handleTreatment_Action_BandageLocal.sqf | 2 +- .../fnc_handleTreatment_Action_CPR.sqf | 4 +- .../fnc_handleTreatment_Action_Stitching.sqf | 10 +- .../fnc_handleTreatment_Action_fullHeal.sqf | 8 +- .../fnc_handleTreatment_Category_Advanced.sqf | 6 +- .../fnc_handleTreatment_Category_Airway.sqf | 6 +- ...fnc_handleTreatment_Category_Bandaging.sqf | 8 +- ...nc_handleTreatment_Category_Medication.sqf | 6 +- .../functions/fnc_initalizeModuleCMS.sqf | 2 +- .../fnc_moduleAssignMedicalEquipment.sqf | 1 - .../functions/fnc_onTreatmentCompleted.sqf | 2 +- addons/medical/ui/define.hpp | 2 +- addons/medical/ui/menu.hpp | 4 +- 60 files changed, 292 insertions(+), 588 deletions(-) rename addons/{gui/UI => common}/define.hpp (97%) rename addons/{gui => common}/functions/fnc_blurScreen.sqf (99%) create mode 100644 addons/common/functions/fnc_displayIcon.sqf rename addons/{gui => common}/functions/fnc_displayInformation.sqf (92%) rename addons/{gui => common}/functions/fnc_displayMessage.sqf (85%) rename addons/{gui => common}/functions/fnc_sendDisplayInformationTo.sqf (95%) rename addons/{gui => common}/functions/fnc_sendDisplayMessageTo.sqf (95%) delete mode 100644 addons/gui/CfgEventHandlers.hpp delete mode 100644 addons/gui/GUI.hpp delete mode 100644 addons/gui/README.md delete mode 100644 addons/gui/UI/RscTitles.hpp delete mode 100644 addons/gui/XEH_postInit.sqf delete mode 100644 addons/gui/XEH_preInit.sqf delete mode 100644 addons/gui/config.cpp delete mode 100644 addons/gui/data/buttonDisabled.paa delete mode 100644 addons/gui/data/buttonDisabled_gradient.paa delete mode 100644 addons/gui/data/buttonNormal.paa delete mode 100644 addons/gui/data/buttonNormal_gradient.paa delete mode 100644 addons/gui/data/buttonNormal_gradient2.paa delete mode 100644 addons/gui/data/buttonNormal_gradient3.paa delete mode 100644 addons/gui/data/buttonNormal_gradient_top.paa delete mode 100644 addons/gui/data/buttonNormal_gradient_top_w.paa delete mode 100644 addons/gui/empty.hpp delete mode 100644 addons/gui/functions/fnc_displayIcon.sqf delete mode 100644 addons/gui/functions/fnc_loadingbar.sqf delete mode 100644 addons/gui/functions/fnc_sendHintTo.sqf delete mode 100644 addons/gui/functions/fnc_sendMessageTo.sqf delete mode 100644 addons/gui/functions/script_component.hpp delete mode 100644 addons/gui/script_component.hpp delete mode 100644 addons/gui/stringtable.xml diff --git a/addons/common/HintConfig.hpp b/addons/common/HintConfig.hpp index 3e3493a8ba..8c8dc38abb 100644 --- a/addons/common/HintConfig.hpp +++ b/addons/common/HintConfig.hpp @@ -52,6 +52,102 @@ class RscTitles { }; }; }; + class ACE_RscDisplayMessage { + duration = 7; + idd = 86411; + movingenable = 0; + onLoad = "uiNamespace setVariable ['ACE_RscDisplayMessage', _this select 0];" + fadein = 0; + class controlsBackground { + class header: ACE_gui_staticBase { + idc = 1; + type = CT_STATIC; + x = "safezoneX + (safezoneW / 10)"; + y = "safezoneY + (30 * (safeZoneH / 40))"; + w = "(safeZoneW / 10)"; + h = "(safeZoneH / 40)"; + style = ST_LEFT; + font = FontCSE; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorText[] = {0.85, 0.85, 0.85, 1.0}; + colorBackground[] = {0, 0, 0, 0.9}; + text = ""; + }; + class text: header { + idc = 2; + y = "safezoneY + (31 * (safeZoneH / 40))"; + w = "(safeZoneW / 10) * 1.3"; + colorText[] = {0.0, 0.0, 0.0, 1.0}; + colorBackground[] = {1, 1, 1, 0.9}; + text = ""; + }; + }; + }; + + class ACE_RscDisplayInformation { + duration = 15; + idd = 86412; + movingenable = 0; + onLoad = "uiNamespace setVariable ['ACE_RscDisplayInformation', _this select 0];" + fadein = 0; + class controlsBackground { + class header: ACE_gui_staticBase { + idc = 1; + type = CT_STATIC; + x = "safezoneX + (safezoneW / 10)"; + y = "safezoneY + (6 * (safeZoneH / 40))"; + w = "(safeZoneW / 10)"; + h = "(safeZoneH / 40)"; + style = ST_LEFT; + font = FontCSE; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorText[] = {0.85, 0.85, 0.85, 1.0}; + colorBackground[] = {0, 0, 0, 0.9}; + text = ""; + }; + class text: header { + idc = 2; + y = "safezoneY + (7.1 * (safeZoneH / 40))"; + w = "(safeZoneW / 10) * 1.3"; + colorText[] = {0.0, 0.0, 0.0, 1.0}; + colorBackground[] = {1, 1, 1, 0.9}; + text = ""; + }; + class text2: text { + idc = 3; + y = "safezoneY + (8.2 * (safeZoneH / 40))"; + }; + class text3: text { + idc = 4; + y = "safezoneY + (9.3 * (safeZoneH / 40))"; + }; + class text4: text { + idc = 5; + y = "safezoneY + (10.4 * (safeZoneH / 40))"; + }; + class text5: text { + idc = 6; + y = "safezoneY + (11.5 * (safeZoneH / 40))"; + }; + + + class icon: ACE_gui_backgroundBase { + type = CT_STATIC; + idc = 10; + style = ST_PICTURE; + colorBackground[] = {0,0,0,1}; + colorText[] = {1, 1, 1, 1}; + font = FontCSE; + text = ""; + sizeEx = 0.032; + x = "safezoneX + (safezoneW / 10)"; + y = "safezoneY + (4 * (safeZoneH / 40))"; + w = "(safeZoneH / 40)*2"; + h = "(safeZoneH / 40)*2"; + }; + }; + }; + class ACE_EventHandlerHelper: ACE_Rsc_Display_Base { idd = -1; class controls { diff --git a/addons/common/ProgressScreen.hpp b/addons/common/ProgressScreen.hpp index 31184f00f4..d7df49efdf 100644 --- a/addons/common/ProgressScreen.hpp +++ b/addons/common/ProgressScreen.hpp @@ -1,6 +1,3 @@ -class ACE_gui_RscProgress; -class ACE_gui_staticBase; - class GVAR(ProgressBar_Dialog) { idd = -1; diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 64a06a0f8c..079d0cf686 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -16,6 +16,7 @@ PREP(adminKick); PREP(ambientBrightness); PREP(applyForceWalkStatus); PREP(binarizeNumber); +PREP(blurScreen); PREP(callCustomEventHandlers); PREP(callCustomEventHandlersGlobal); PREP(canGetInPosition); @@ -31,6 +32,7 @@ PREP(convertKeyCode); PREP(createOrthonormalReference); PREP(currentChannel); PREP(disableUserInput); +PREP(displayIcon); PREP(displayText); PREP(displayTextPicture); PREP(displayTextStructured); diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 84052cbdfb..b1c479b54f 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -94,8 +94,18 @@ class ACE_Settings { isClientSetable = 1; displayName = "$STR_ACE_Common_EnableNumberHotkeys"; }; + class GVAR(settingFeedbackIcons) { + value = 1; + typeName = "SCALAR"; + force = 0; + isClientSetable = 1; + displayName = "$STR_ACE_Common_SettingFeedbackIconsName"; + description = "$STR_ACE_Common_SettingFeedbackIconsDesc"; + values[] = {"Hide", "Top right, downwards", "Top right, to the left", "Top left, downwards", "Top left, to the right"}; + }; }; +#include "define.hpp" #include #include #include diff --git a/addons/gui/UI/define.hpp b/addons/common/define.hpp similarity index 97% rename from addons/gui/UI/define.hpp rename to addons/common/define.hpp index 13ce7d8a3e..f1cc009864 100644 --- a/addons/gui/UI/define.hpp +++ b/addons/common/define.hpp @@ -182,12 +182,12 @@ class ACE_gui_buttonBase { bottom = 0.00; }; textureNoShortcut = ""; - animTextureNormal = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa) ); - animTextureDisabled = QUOTE( PATHTOF(data\buttonDisabled_gradient.paa)); - animTextureOver = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa)); - animTextureFocused = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa)); - animTexturePressed = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa)); - animTextureDefault = QUOTE( PATHTOF(data\buttonNormal_gradient_top.paa)); + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)"; + animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; + animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; period = 0.5; font = FontCSE; soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; diff --git a/addons/gui/functions/fnc_blurScreen.sqf b/addons/common/functions/fnc_blurScreen.sqf similarity index 99% rename from addons/gui/functions/fnc_blurScreen.sqf rename to addons/common/functions/fnc_blurScreen.sqf index 1cde214587..c3d101a37e 100644 --- a/addons/gui/functions/fnc_blurScreen.sqf +++ b/addons/common/functions/fnc_blurScreen.sqf @@ -39,4 +39,4 @@ if (_show) then { GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) = nil; }; }; -}; \ No newline at end of file +}; diff --git a/addons/common/functions/fnc_displayIcon.sqf b/addons/common/functions/fnc_displayIcon.sqf new file mode 100644 index 0000000000..94fa887da9 --- /dev/null +++ b/addons/common/functions/fnc_displayIcon.sqf @@ -0,0 +1,111 @@ +/** + * fn_gui_displayIcon.sqf + * @Descr: + * @Author: Glowbal + * + * @Arguments: [] + * @Return: + * @PublicAPI: true + * + * @Example ["myID", true, QUOTE(PATHTOF(data\icon_group.paa)), [1,1,1,1], 0] call ace_gui_fnc_displayIcon; + */ + +#include "script_component.hpp" + +// positions for the icon UI +#define RIGHT_SIDE (safezoneW + safezoneX) +#define LEFT_SIDE safezoneX +#define TOP_SIDE safeZoneY +#define BOTTOM_SIDE (safeZoneH + safezoneY) +#define ICON_WIDTH (2 * (((safezoneW / safezoneH) min 1.2) / 40)) +#define X_POS_ICONS (RIGHT_SIDE - (1.5 * ICON_WIDTH)) +#define Y_POS_ICONS (TOP_SIDE + (2.5 * ICON_WIDTH)) +#define DIFFERENCE_ICONS (1.1 * ICON_WIDTH) +#define X_POS_ICONS_SECOND (RIGHT_SIDE - (4.4 * ICON_WIDTH)) +#define Y_POS_ICONS_SECOND (TOP_SIDE + (1.1 * ICON_WIDTH)) + +// setting values +#define TOP_RIGHT_DOWN 1 +#define TOP_RIGHT_LEFT 2 +#define TOP_LEFT_DOWN 3 +#define TOP_LEFT_RIGHT 4 + +// other constants +#define DEFAULT_TIME 6 + +private ["_iconId", "_show", "_icon", "_allControls", "_refresh", "_timeAlive", "_list", "_color"]; +_iconId = _this select 0; +_show = _this select 1; +_icon = _this select 2; +_color = _this select 3; +_timeAlive = if (count _this > 4) then {_this select 4} else {DEFAULT_TIME}; + +disableSerialization; +_list = missionNamespace getvariable [QGVAR(displayIconList),[]]; + +_refresh = { + private ["_allControls"]; + // Refreshing of all icons.. + _allControls = missionNamespace getvariable [QGVAR(displayIconListControls), []]; + { + ctrlDelete _x; + }foreach _allControls; + + _allControls = []; + + private ["_ctrl", "_setting"]; + _setting = missionNamespace getvariable[QGVAR(settingFeedbackIcons), 0]; + if (_setting > 0) then { + { + // +19000 because we want to make certain we are using free IDCs.. + _ctrl = ((findDisplay 46) ctrlCreate ["RscPicture", _foreachIndex + 19000]); + _position = switch (_setting) do { + case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]}; + case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]}; + case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]}; + case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]}; + default {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]}; + }; + _ctrl ctrlSetPosition _position; + _ctrl ctrlsetText (_x select 1); + _ctrl ctrlSetTextColor (_x select 2); + _ctrl ctrlCommit 0; + _allControls pushback _ctrl; + }foreach (missionNamespace getvariable [QGVAR(displayIconList),[]]); + }; + missionNamespace setvariable [QGVAR(displayIconListControls), _allControls]; +}; + +if (_show) then { + if ({(_x select 0 == _iconId)} count _list == 0) then { + _list pushback [_iconId, _icon, _color, time]; + } else { + { + if (_x select 0 == _iconId) exitwith { + _list set [_foreachIndex, [_iconId, _icon, _color, time]]; + }; + }foreach _list; + }; + missionNamespace setvariable [QGVAR(displayIconList), _list]; + call _refresh; + + if (_timeAlive >= 0) then { + [{ + [_this select 0, false, "", [0,0,0], 0] call FUNC(displayIcon); + }, [_iconId], _timeAlive, _timeAlive] call EFUNC(common,waitAndExecute); + }; + +} else { + if ({(_x select 0 == _iconId)} count _list == 1) then { + private "_newList"; + _newList = []; + { + if (_x select 0 != _iconId) then { + _newList pushback _x; + }; + }foreach _list; + + missionNamespace setvariable [QGVAR(displayIconList), _newList]; + call _refresh; + }; +}; diff --git a/addons/gui/functions/fnc_displayInformation.sqf b/addons/common/functions/fnc_displayInformation.sqf similarity index 92% rename from addons/gui/functions/fnc_displayInformation.sqf rename to addons/common/functions/fnc_displayInformation.sqf index c4eb96984b..64a27b0e40 100644 --- a/addons/gui/functions/fnc_displayInformation.sqf +++ b/addons/common/functions/fnc_displayInformation.sqf @@ -19,10 +19,10 @@ _type = [_this, 2, 0, [0]] call BIS_fnc_Param; _icon = [_this, 3, "",[""]] call BIS_fnc_Param; if (_title != "") then { - DISPLAY_LAYER cutRsc [QGVAR(RSC_DISPLAY_INFORMATION),"PLAIN"]; + DISPLAY_LAYER cutRsc ['ACE_RscDisplayInformation',"PLAIN"]; disableSerialization; - _display = uiNamespace getvariable QGVAR(RSC_DISPLAY_INFORMATION); + _display = uiNamespace getvariable 'ACE_RscDisplayInformation'; if (!isnil "_display") then { _headerCtrl = _display displayCtrl 1; _headerCtrl ctrlSetText _title; diff --git a/addons/gui/functions/fnc_displayMessage.sqf b/addons/common/functions/fnc_displayMessage.sqf similarity index 85% rename from addons/gui/functions/fnc_displayMessage.sqf rename to addons/common/functions/fnc_displayMessage.sqf index 3dceab2638..317de8b240 100644 --- a/addons/gui/functions/fnc_displayMessage.sqf +++ b/addons/common/functions/fnc_displayMessage.sqf @@ -18,10 +18,10 @@ _content = [_this, 1, "",[""]] call BIS_fnc_Param; _type = [_this, 2, 0, [0]] call BIS_fnc_Param; if (_title != "" && _content != "") then { - DISPLAY_LAYER cutRsc [QGVAR(RSC_DISPLAY_MESSAGE),"PLAIN"]; + DISPLAY_LAYER cutRsc ['ACE_RscDisplayMessage',"PLAIN"]; disableSerialization; - _display = uiNamespace getvariable QGVAR(RSC_DISPLAY_MESSAGE); + _display = uiNamespace getvariable 'ACE_RscDisplayMessage'; if (!isnil "_display") then { _headerCtrl = _display displayCtrl 1; _contentCtrl = _display displayCtrl 2; @@ -29,6 +29,7 @@ if (_title != "" && _content != "") then { _headerCtrl ctrlSetText _title; _contentCtrl ctrlSetText _content; + // TODO get a font that has the same width characters for all. Ask Jaynus. _contentAmountOfChars = count (toArray _content); _pos = ctrlPosition _contentCtrl; _pos set [2, _contentAmountOfChars * ((((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)/ 3.3) max (safeZoneW / 11)]; diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf index ab4cb7b69c..1d73cccc79 100644 --- a/addons/common/functions/fnc_progressBar.sqf +++ b/addons/common/functions/fnc_progressBar.sqf @@ -36,10 +36,10 @@ _perFrameFunction = { PARAMS_2(_parameters,_pfhID); EXPLODE_8_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime,_exceptions); private ["_elapsedTime", "_errorCode"]; - + _elapsedTime = time - _startTime; _errorCode = -1; - + if (isNull (uiNamespace getVariable [QGVAR(ctrlProgressBar), controlNull])) then { _errorCode = 1; } else { diff --git a/addons/gui/functions/fnc_sendDisplayInformationTo.sqf b/addons/common/functions/fnc_sendDisplayInformationTo.sqf similarity index 95% rename from addons/gui/functions/fnc_sendDisplayInformationTo.sqf rename to addons/common/functions/fnc_sendDisplayInformationTo.sqf index ae4012b5fe..f22894e057 100644 --- a/addons/gui/functions/fnc_sendDisplayInformationTo.sqf +++ b/addons/common/functions/fnc_sendDisplayInformationTo.sqf @@ -42,6 +42,6 @@ if (isPlayer _reciever) then { }foreach _content; - [_title,_content,_type] call EFUNC(gui,displayInformation); + [_title,_content,_type] call EFUNC(common,displayInformation); }; }; \ No newline at end of file diff --git a/addons/gui/functions/fnc_sendDisplayMessageTo.sqf b/addons/common/functions/fnc_sendDisplayMessageTo.sqf similarity index 95% rename from addons/gui/functions/fnc_sendDisplayMessageTo.sqf rename to addons/common/functions/fnc_sendDisplayMessageTo.sqf index c66af97266..3c5b399659 100644 --- a/addons/gui/functions/fnc_sendDisplayMessageTo.sqf +++ b/addons/common/functions/fnc_sendDisplayMessageTo.sqf @@ -41,6 +41,6 @@ if (isPlayer _reciever) then { }foreach _parameters; _content = format _localizationArray; - [_title,_content,_type] call EFUNC(gui,displayMessage); + [_title,_content,_type] call EFUNC(common,displayMessage); }; }; \ No newline at end of file diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index f2d944eb7a..f7705f8ad9 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -315,6 +315,12 @@ Ignoruj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności. Rechazar Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones. + + Feedback icons + + + Select the position of or disable the feedback icons on your screen. These icons will show to provide extra feedback on your character status and actions performed. + \ No newline at end of file diff --git a/addons/gui/CfgEventHandlers.hpp b/addons/gui/CfgEventHandlers.hpp deleted file mode 100644 index c9142e676b..0000000000 --- a/addons/gui/CfgEventHandlers.hpp +++ /dev/null @@ -1,11 +0,0 @@ -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE( call compile preprocessFileLineNumbers QUOTE(QUOTE(PATHTOF(XEH_preInit.sqf))) ); - }; -}; - -class Extended_PostInit_EventHandlers { - class ADDON { - init = QUOTE( call compile preprocessFileLineNumbers QUOTE(QUOTE(PATHTOF(XEH_postInit.sqf))) ); - }; -}; \ No newline at end of file diff --git a/addons/gui/GUI.hpp b/addons/gui/GUI.hpp deleted file mode 100644 index 71e8dc0090..0000000000 --- a/addons/gui/GUI.hpp +++ /dev/null @@ -1,2 +0,0 @@ -#include "UI\define.hpp" -#include "UI\RscTitles.hpp" diff --git a/addons/gui/README.md b/addons/gui/README.md deleted file mode 100644 index a6fe74f6c2..0000000000 --- a/addons/gui/README.md +++ /dev/null @@ -1,11 +0,0 @@ -ace_gui -======= - -to be scrapped. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Glowbal](https://github.com/Glowbal) diff --git a/addons/gui/UI/RscTitles.hpp b/addons/gui/UI/RscTitles.hpp deleted file mode 100644 index 02e68e8d32..0000000000 --- a/addons/gui/UI/RscTitles.hpp +++ /dev/null @@ -1,179 +0,0 @@ - -#define RIGHT_SIDE (safezoneW + safezoneX) -#define LEFT_SIDE safezoneX -#define TOP_SIDE safeZoneY -#define BOTTOM_SIDE (safeZoneH + safezoneY) - -#define ICON_WIDTH (1.75 * (((safezoneW / safezoneH) min 1.2) / 40)) -#define X_POS_ICONS RIGHT_SIDE - (1.1 * ICON_WIDTH) -#define Y_POS_ICONS TOP_SIDE + (2.2 * ICON_WIDTH) -#define DIFFERENCE_ICONS (1.1 * ICON_WIDTH) - -class RscTitles { - class GVAR(iconsDisplay) { - duration = 1e+011; - idd = 1111; - movingenable = 0; - onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(iconsDisplay)), _this select 0)]); - class controlsBackground { - class icon_1: ACE_gui_backgroundBase { - text = ""; - colorText[] = {0.0,1.0,0.0,0.4}; - idc = 10501; - x = X_POS_ICONS; - y = Y_POS_ICONS + (0 * DIFFERENCE_ICONS); - w = ICON_WIDTH; - h = ICON_WIDTH; - }; - class icon_2: icon_1 { - idc = 10502; - y = Y_POS_ICONS + (1 * DIFFERENCE_ICONS); - }; - class icon_3: icon_1 { - idc = 10503; - y = Y_POS_ICONS + (2 * DIFFERENCE_ICONS); - }; - class icon_4: icon_1 { - idc = 10504; - y = Y_POS_ICONS + (3 * DIFFERENCE_ICONS); - }; - class icon_5: icon_1 { - idc = 10505; - y = Y_POS_ICONS + (4 * DIFFERENCE_ICONS); - }; - class icon_6: icon_1 { - idc = 10506; - y = Y_POS_ICONS + (5 * DIFFERENCE_ICONS); - }; - }; - }; - - class GVAR(RSC_PROGRESSBAR_LOADING) { - idd = -1; - onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(RSC_PROGRESSBAR_LOADING)), _this select 0)]); - fadein = 0; - fadeout = 0; - duration = 10e10; - class Controls { - class background: ACE_gui_backgroundBase { - idc = -1; - colorBackground[] = {0,0,0,1}; - colorText[] = {1, 1, 1, 1}; - x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "29 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "0.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - text = "#(argb,8,8,3)color(0,0,0,0.4)"; - }; - - class Progress: ACE_gui_RscProgress { - idc = 6; - x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - y = "29 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; - w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "0.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - colorFrame[] = {0,0,0,0}; - colorBar[] = {0.27,0.5,0.31,0.6}; - texture = "#(argb,8,8,3)color(1,1,1,0.7)"; - }; - }; - }; - - - class GVAR(RSC_DISPLAY_MESSAGE) { - duration = 7; - idd = 86411; - movingenable = 0; - onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(RSC_DISPLAY_MESSAGE)), _this select 0)]); - fadein = 0; - class controlsBackground { - class header: ACE_gui_staticBase { - idc = 1; - type = CT_STATIC; - x = "safezoneX + (safezoneW / 10)"; - y = "safezoneY + (30 * (safeZoneH / 40))"; - w = "(safeZoneW / 10)"; - h = "(safeZoneH / 40)"; - style = ST_LEFT; - font = FontCSE; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - colorText[] = {0.85, 0.85, 0.85, 1.0}; - colorBackground[] = {0, 0, 0, 0.9}; - text = ""; - }; - class text: header { - idc = 2; - y = "safezoneY + (31 * (safeZoneH / 40))"; - w = "(safeZoneW / 10) * 1.3"; - colorText[] = {0.0, 0.0, 0.0, 1.0}; - colorBackground[] = {1, 1, 1, 0.9}; - text = ""; - }; - }; - }; - - class GVAR(RSC_DISPLAY_INFORMATION) { - duration = 15; - idd = 86412; - movingenable = 0; - onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(RSC_DISPLAY_INFORMATION)), _this select 0)]); - fadein = 0; - class controlsBackground { - class header: ACE_gui_staticBase { - idc = 1; - type = CT_STATIC; - x = "safezoneX + (safezoneW / 10)"; - y = "safezoneY + (6 * (safeZoneH / 40))"; - w = "(safeZoneW / 10)"; - h = "(safeZoneH / 40)"; - style = ST_LEFT; - font = FontCSE; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - colorText[] = {0.85, 0.85, 0.85, 1.0}; - colorBackground[] = {0, 0, 0, 0.9}; - text = ""; - }; - class text: header { - idc = 2; - y = "safezoneY + (7.1 * (safeZoneH / 40))"; - w = "(safeZoneW / 10) * 1.3"; - colorText[] = {0.0, 0.0, 0.0, 1.0}; - colorBackground[] = {1, 1, 1, 0.9}; - text = ""; - }; - class text2: text { - idc = 3; - y = "safezoneY + (8.2 * (safeZoneH / 40))"; - }; - class text3: text { - idc = 4; - y = "safezoneY + (9.3 * (safeZoneH / 40))"; - }; - class text4: text { - idc = 5; - y = "safezoneY + (10.4 * (safeZoneH / 40))"; - }; - class text5: text { - idc = 6; - y = "safezoneY + (11.5 * (safeZoneH / 40))"; - }; - - - class icon: ACE_gui_backgroundBase { - type = CT_STATIC; - idc = 10; - style = ST_PICTURE; - colorBackground[] = {0,0,0,1}; - colorText[] = {1, 1, 1, 1}; - font = FontCSE; - text = ""; - sizeEx = 0.032; - x = "safezoneX + (safezoneW / 10)"; - y = "safezoneY + (4 * (safeZoneH / 40))"; - w = "(safeZoneH / 40)*2"; - h = "(safeZoneH / 40)*2"; - }; - }; - }; - -}; \ No newline at end of file diff --git a/addons/gui/XEH_postInit.sqf b/addons/gui/XEH_postInit.sqf deleted file mode 100644 index 4172145202..0000000000 --- a/addons/gui/XEH_postInit.sqf +++ /dev/null @@ -1,11 +0,0 @@ -/** - * XEH_postInit.sqf - * @Descr: N/A - * @Author: Glowbal - * - * @Arguments: [] - * @Return: - * @PublicAPI: false - */ - -#include "script_component.hpp" diff --git a/addons/gui/XEH_preInit.sqf b/addons/gui/XEH_preInit.sqf deleted file mode 100644 index b5cc064d18..0000000000 --- a/addons/gui/XEH_preInit.sqf +++ /dev/null @@ -1,25 +0,0 @@ -/** - * XEH_preInit.sqf - * @Descr: N/A - * @Author: Glowbal - * - * @Arguments: [] - * @Return: - * @PublicAPI: false - */ - -#include "script_component.hpp" - -ADDON = false; - -PREP(loadingBar); -PREP(displayInformation); -PREP(displayMessage); -PREP(blurScreen); -PREP(displayIcon); -PREP(sendHintTo); -PREP(sendMessageTo); -PREP(sendDisplayInformationTo); -PREP(sendDisplayMessageTo); - -ADDON = true; diff --git a/addons/gui/config.cpp b/addons/gui/config.cpp deleted file mode 100644 index 2f7666be13..0000000000 --- a/addons/gui/config.cpp +++ /dev/null @@ -1,27 +0,0 @@ - -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ACE_main"}; - version = VERSION; - author[] = {$STR_ACE_Common_ACETeam}; - authorUrl = "http://csemod.com"; // TODO website link? - }; -}; -class CfgAddons { - class PreloadAddons { - class ADDON { - list[] = {QUOTE(ADDON)}; - }; - }; -}; - -#include "CfgEventHandlers.hpp" - -// TODO Port over the UI defines -#include "GUI.hpp" -#include "empty.hpp" diff --git a/addons/gui/data/buttonDisabled.paa b/addons/gui/data/buttonDisabled.paa deleted file mode 100644 index 2c2a10856b22386ce5dccdda85c34006259f1086..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1564 zcmWF)b$53Radr=LWMN=n@bvWj59UWW`hxiXfdIr0c60N00P+if_zg&cY%q;MfuWRz zfmw4Y6F&knAea!=r~qn+jE2W(c#P&3SQ;QbH!wDY{rT_BAi$u^I9m1~B_t+(w6Nr3 MTp;@YKcsjE0G`c5>Hq)$ diff --git a/addons/gui/data/buttonDisabled_gradient.paa b/addons/gui/data/buttonDisabled_gradient.paa deleted file mode 100644 index 43b1b8d100e67efb7e607cc0fdc3e83437268092..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1816 zcmeH|KWI}y9LIn6yZ0w4iMhMHK4T~)EisZKNC+hqDUyFAz8KOV*@}e@x#NEK`~Kj5cYKcf-L1(= zCBIy(tmG8{sMTujU%i^Y*3+)ndirL$d_Cvs4R5?tJ#*~VgcuZ6ph+7;!wy5Y?~Mch z5;+Es+nV39la5KHPbtL}6RR0tz>h&`ghsOM_jeOfi!teZk#;r1tcz!zWYMXbputsE zX3i9W6qsa=L_BNY65HfHi!?YRGJ-j>9lp;WH^>@U=IE?pZQltq!yVV1T?3g_9J z-%yuDfkU09D8o9xC+cKDGzA1OOVjv_Baomw9KLkoA@0&VgU>B67KW1Izr?q(2kkGXhOuHB*a8lK<2HHJO3u%7=?JWWN>xk zz<@-59`pELJf7=a_X;q$K~AEQ#sqA)jtJ^F0}$RmV!}mvBpfS0QLx t{Ys{FsahW$c^NgxkcUvU+Zxyf#gQ0%XRx-+aK$alM4U< diff --git a/addons/gui/data/buttonNormal.paa b/addons/gui/data/buttonNormal.paa deleted file mode 100644 index 84936d83562e20d2d7bc064e6487a87305e0e4f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1564 zcmWF)b$53Radr=LWMN=nU}R+c59UWW`hxiXfdIr0c60N00P+if_zg&cY%q;MfuWRz zftjI!i5~$O5KIVbQ~)(ZM#Ez?JVx^iEDeyJ8yFcDeEaXsAi$u^I9m1~B_t+(w6Nr3 MWLWX{KcsjE04MuGD*ylh diff --git a/addons/gui/data/buttonNormal_gradient.paa b/addons/gui/data/buttonNormal_gradient.paa deleted file mode 100644 index 2210f987411ee2a407ba63733091384a6fb00e35..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1989 zcmdT_&ubGw6n^i`>}H#8eh^j&A%;x|A%qxmh@liI-2~c*5iQ10LMW01ky1oTD5XdV zW(tceWsx8rJv350dF)9HfMs1s%Rgz@S6EqX&-6k##14 zoqg<%uDQg!h@x`jT$ZvVP^8AfZX~)Q<)jrU`sF??U2l4Fcy+05DM}( z&Ok(-$1)Y5%6J9aPzb{(o~0I6I6Q#_JY$7J%7?~5p3Z4N9-Au?1Uv~(bAlQvL`y-= z0$k-GjAI%)ZmKdbOOTE#3!t^p2tYAI3z(6UXqD2miYgR!%s{aNum*mR(ZT?}hAgzX z9>(X8r8+FJ#v-l*HdDAjRmjsizCsge2b&?j;y~mm!$NpYlSIB_#BPq(b$70-QEPYZ zqfMZqEdso2mm@4sb}K>&Y^kWEX$s=dN;!L8CND~&1fmAhSaMR@f)Zg8?_pPAZ4i?n ziA63R;tE6{NEIpf7++$yPAz*16AWrtpc<{AO&ZCp0-)12EWswz@CCeQkHEi)%b2DP zi3ze%_Ct*P{GbAd-(x!dpTL_V9g5Po2U~W(*SAIQ(uM*XJ0(s_hs zm{V41B~CIAvph?V=RN;at|wLdKDg#=kusim_6LV*6<1V@RG-Xyi+pa$Io8~AOqNV7 zHJ(Fb5(;q)Qwk#ijEaJJTCCFEkDj9Dd8MW`44=%TGn!_<_Xww4f4SvO ZgP=MCJpJCmus=_!xITRSF&N#$KLJ6wth)dJ diff --git a/addons/gui/data/buttonNormal_gradient2.paa b/addons/gui/data/buttonNormal_gradient2.paa deleted file mode 100644 index cabe6c7feda6907aca65b3aad4ee27ce6c91f491..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2035 zcmd5-L1^1%6n^jhzkVyR9C@A=jOV$w2__g}JTRflN{Qr=1lBRud07adnAnUG(rz>% zgfdE&sNfAzL@;6Ov_dk%PCM=}#&#P$-uHj+ zz3+eif9a#wW@e05b7s!q0AQNt(Xl^oyyy8x?&bL(PEWr-<@%qwzb)b3{`a*DMMw%@ zZ~aATI3P5AE9*VP5N!HxY(4@gOus;C1Q-zFF{XUnzZbQ{msUYmIC3teI$1+l9m)?Q z(Iu%NtxLa_ZqhBB7i(mZ1(KCx#U6ZuGG0mSyva&dG}qwLzN`USJm@6ElXX6W)POU% ziXZKBUd-4LLuE~+5kph8RPQIjWyvyn#v&MR_sSZSdqxH;{2hgDFmsXGl8xn@fQx8~ z1Du9}n8zz*f;`7sxCUk(9`ZVMvEAZ3P=T-MoBL+(`Pzb&#Q=ptu%>_$SN>u~*qQS> z7|j!_lJ+9?3t4Ou6qD)H$7Zi%(oz*|8G*A5S9lJ`P={ffW9<=Ep&}|QgZ5GeO3fNw z!r! z3hHEChB4??-SaPK1TC5cD-TmR>o&CugnQ$79k*q+2G%54w9Ku~aUBYfrIz#+=Dx@6 zMd~`2vBDM*Oj@AZ=#WN&wV+6F04s2hY4{!d#JfcA!B|FFYPSLq)(Lby#8xkIxnL%p>cs?>YPZ{ZAdM ze^-XPea`OhD=deU7ze8edr;&BR$~p)A1?aDy-JhVWoOrVF?C4$hymS%NKOSCv5X`g#qmSMv;8bQ(4{*>Mc=!4LLaG}> zY5*wA=xge*C=01qO*YWjngnwU^Hg<@=yJ(K_oWpbZnYrPhuv%;z?03Ert+k%u_Ybt z5hiq_V~6n@zIpY*>fxxbBb@6b?A60CRo$Q2l`O}zPOZ{o#Q;}GICfL}*biOLDv-K* Y`1H|}lIQ#qnM*x=^yiI#kNmIpe=FM30RR91 diff --git a/addons/gui/data/buttonNormal_gradient3.paa b/addons/gui/data/buttonNormal_gradient3.paa deleted file mode 100644 index 7da9fbcf8a7bea39e3108f236c4322101bac95a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2044 zcmd5--)kF35dLO%Z*`VWKM>atgb-)d2qA=!gD}PoMkf_J(3Fx^5ymwk$fAT0LI}nL zQ-Z12pq3+CgIv-+g%XtzD3p>wDQ#)rO5d6XKjfci9|C=8QCD$Qx#U4$3dtUKyK}qq z%{Q|%yXRk7S@D~Vm6k67%+1XWp2@5Jn?reE+E9LHdHJoHk*}HeGi5%uNV^DcPDz}r!xe1Q@Zo-Xqzf;n-wBPmD;lI|+ zxyW_>6y@dXj<_M}>wM7)D3?}Ppt`zG%gCx#I?Hv~EzzV+)H8S@E8HP8jimt46~oBsRknz%f~hrxXnchY?2}+9hs(CLJ3iBiMYtKM~+C*bkI(rQRWL&Rt5Sv zDDe$)(D0~?26nKGBoqadq90H}ZBu6GE-Ji^E24dw_$D@rbb(u#=bQ8u$u50E8)>;^ zAgWvzNYl}*dWrMu?uh5pbGt5gzJ7WxWH=P+l-&I^%!+vqJ6Xnj0tJj0aJl4(XK5vp`(k?m!*E6wvfe1zSOinq6f6Q&Yf_HkQZxI=QZA@ zkX=>+O?Z4CS8z+X^aXwv-Uqlv*Nwp))(adGR5Hg&IpX>f$8&Px?u@-Kr=r~-g!jUJ zuOI4ndwVwadQ$WqQ7{P<6br4i66;Q!g$ZEL6oRNo)V{qk`E+yF`oB;{8*+MB6m@ z^^d_Drku_b#Fvkb(tdU^#A$Rf{5YPA(~O=RN^hhPwahUXRsEc@y2a@#`HQIkK1&&M z3Zx8Dy*nAJHo`J}tl=ge$mzfp?GgoXYlDI#vnDi?;hZ6i4o7N}6)ujJa;)Eb&O)5T UZ{PpBV#FX$-~Rd6;PCqX8=e`$(*OVf diff --git a/addons/gui/data/buttonNormal_gradient_top.paa b/addons/gui/data/buttonNormal_gradient_top.paa deleted file mode 100644 index 904e1a62f7a1cf7e03644d5a965fbe3b177b23b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1995 zcmd5--Afxm5TBXdyPWaz!Epr%A)G;u5JK=lg4iOtOHrYg);0}dMZ|<6B2pxXNRiO2 zkd{NPBBgzkVu}cbQV{x3O8Zv&C$#@W9|WIDdeMdi`Vh!Nb(g)}*}3`62Q#w|u1!u_ z`P^i|;s9WpX5*ZmwQe`*hBun@{fUV?S&x3~tu@*E^gLdI0cR4hd*3P4p3pvCoCcbk z;)BWs`47K`i)>qmUov#xGZ9l%j-1QVFo`})_C@_jbVC}EHl(kEYqXBDa+w4P*bxzC z)Zh^+IPC)_2HQ{+>cNyt64?twTn|yu(nETn_DSZ7B&?b>57zZsT!(ng($M5LRkq3O zd0Lblj7MY`MO!|?35dzFI88Pv1(wG$*irbwhpB{+=X+qnD`x+7>yo_dLG2s4FGrvS z%s_FJmMDpif}Ckwg9>ax z7-V!%!_P1b*)osf0SwbTtg@vQq-`iBae)eup>2GRyoMjK7~vZp#0aGsM6fffu5ex* zwCp^csp?eva601>sOSofS6{m^mLazkBNIzu6;m`0Lr_Y3RWFl2h++!F9At6I3#nTI z!UQg3Rbgci{xJ|MTs*-Ih`|6Y=cVU(jMaH6x#I{Xn?sxCXbWA^NoJ4-gN|SocA1WE z;Ttoa!Y;0R3M(W=$wiREaSHR6tyegn-4nOc_QLCmO1z rltL#c718P7dJj~0IJF5Q+?H5(fyLIZ6sYfa*P!_Ne*SJ;yvBb36MwL| diff --git a/addons/gui/data/buttonNormal_gradient_top_w.paa b/addons/gui/data/buttonNormal_gradient_top_w.paa deleted file mode 100644 index 23dd190afc5bab9aecf46185e74c365abbfd22fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1856 zcmeHIL1+^}6#f6tB)gR~nVH?hZK$;kwMr;aODUd0616E6QPc*hl0y;6!9(yAq?97+ zp@$xehth+G;?Yyd!7S2?AmT|pxr<0I;>S)!M;#^Vi$B6<8bJ9v{Dv3ve~)??b`x*R}-xa5Dt#)(47p8g$%U z&uUM)*6?=WAM3}&LB)B+!uEYz2gi4P`<~|} z&}%4YM1WrsI@n=MLqQ3$h?~qJw;wn>ARSExIULkxD9Hs~;4h6TLIyb%@G(5YMa;5~ zJ@5vy+8TU~eLA(>vl(wDU^cYQ_45(A!E|^>y#mHW0*R$qANIluSXelrxwHLck>h}EU7_VJyk!9VSPzW@TT$21nbOb zDyn`OR%-fUl$|@>+4B4K920wL9&+RUdx2Qf+HPF~0gn)v^?kn_J5@A_|FnwE?+-}b z?p2@A31fsQ^aQ>(iL)Va(qL!E+04)g1SqHyo^#f-{Ygw}u7D&w_bs%ip+*%Ph6a_v eUZ5;0mS$u43ZcRdM2Q`3Qd3hWqpjBN7x)YODXS;| diff --git a/addons/gui/empty.hpp b/addons/gui/empty.hpp deleted file mode 100644 index 698784e2c6..0000000000 --- a/addons/gui/empty.hpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "\z\ace\addons\gui\UI\define.hpp" - -class ACE_common_empty_screen { - idd = 679123; - onLoad = "uiNamespace setVariable [""ACE_common_empty_screen"", _this select 0]"; - onUnload = "if (missionNamespace getvariable [""ACE_common_DISABLE_USER_INPUT_SCREEN"", false)]) then { createDialog ""ACE_common_empty_screen""; }"; - class controlsBackground { - class background : ACE_gui_backgroundBase { - idc = 1; - x = safezoneX; - y = safezoneY; - w = safezoneW; - h = safezoneH; - text = ""; - moving = 0; - }; - }; - - class controls { - }; -}; diff --git a/addons/gui/functions/fnc_displayIcon.sqf b/addons/gui/functions/fnc_displayIcon.sqf deleted file mode 100644 index 98895c6346..0000000000 --- a/addons/gui/functions/fnc_displayIcon.sqf +++ /dev/null @@ -1,79 +0,0 @@ -/** - * fn_gui_displayIcon.sqf - * @Descr: - * @Author: Glowbal - * - * @Arguments: [] - * @Return: - * @PublicAPI: true - * - * @Example ["myID", true, QUOTE(PATHTOF(data\icon_group.paa)), [1,1,1,1]] call ace_gui_fnc_displayIcon; - */ - -#include "script_component.hpp" - -#define MAX_N_ICONS 6 - -private ["_iconId", "_show", "_icon", "_spot", "_idc", "_display","_next_IDC", "_nextText"]; -_iconId = _this select 0; -_show = _this select 1; -_icon = _this select 2; -_color = _this select 3; - -disableSerialization; -_list = missionNamespace getvariable [QGVAR(displayIconList),[]]; -_display = uiNamespace getvariable QGVAR(iconsDisplay); - -if (isNil "_display") then { - // Display the icons - 11401 cutRsc [QGVAR(iconsDisplay),"PLAIN"]; - _display = uiNamespace getvariable QGVAR(iconsDisplay); -}; - -if (_show) then { - if ({(_x select 0 == _iconId)} count _list == 0) then { - _list pushback [_iconId, _icon, _color]; - } else { - { - if (_x select 0 == _iconId) exitwith { - _list set [_foreachIndex, [_iconId, _icon, _color]]; - }; - }foreach _list; - }; - - missionNamespace setvariable [QGVAR(displayIconList), _list]; - - { - if (_x select 0 == _iconId) exitwith { - _idc = 10501 + _foreachIndex; - _ctrl = _display displayCtrl _idc; - _ctrl ctrlsetText _icon; - _ctrl ctrlSetTextColor _color; - }; - }foreach _list; -} else { - if ({(_x select 0 == _iconId)} count _list == 1) then { - _newList = []; - { - if (_x select 0 != _iconId) then { - _newList pushback _x; - }; - }foreach _list; - - missionNamespace setvariable [QGVAR(displayIconList), _newList]; - - for "_i" from 0 to (MAX_N_ICONS - 1) /* step +1 */ do { - _idc = 10501 + _i; - _ctrl = _display displayCtrl _idc; - _ctrl ctrlsetText ""; - _ctrl ctrlSetTextColor [1,1,1,1]; - }; - - { - _idc = 10501 + _foreachIndex; - _ctrl = _display displayCtrl _idc; - _ctrl ctrlsetText (_x select 1); - _ctrl ctrlSetTextColor (_x select 2); - }foreach _newList; - }; -}; diff --git a/addons/gui/functions/fnc_loadingbar.sqf b/addons/gui/functions/fnc_loadingbar.sqf deleted file mode 100644 index 4aba751235..0000000000 --- a/addons/gui/functions/fnc_loadingbar.sqf +++ /dev/null @@ -1,64 +0,0 @@ -/** - * fn_gui_loadingbar.sqf - * @Descr: Displays a loading bar and halts script until loading bar has finished - * @Author: Glowbal - * - * @Arguments: [timeToWait NUMBER, condition CODE (Optional), onSuccess CODE (Optional), onFailure CODE (Optional), arguments ARRAY (Optional)] - * @Return: BOOl Returns true if loading bar has fully finished. Otherwise false - * @PublicAPI: true - */ - -#include "script_component.hpp" - -private ["_timeToWait","_cond","_onfailure","_onSuccess","_args"]; -_timeToWait = _this select 0; -_cond = [_this, 1, {true}, [{true}]] call BIS_fnc_Param; -_onSuccess = [_this, 2, {}, [{}]] call BIS_fnc_Param; -_onfailure = [_this, 3, {}, [{}]] call BIS_fnc_Param; -_args = [_this, 4, [], [[]]] call BIS_fnc_Param; - - -if (_timeToWait > 0) exitwith { - GVAR(LOADING_BAR_STATUS) = 0; - disableSerialization; - 1534 cutRsc [QGVAR(RSC_PROGRESSBAR_LOADING),"plain"]; - [{ - private ["_args","_timeToWait","_start","_cond","_onSuccess","_onfailure","_params"]; - _args = _this select 0; - - _start = _args select 0; - _timeToWait = _args select 1; - _cond = _args select 2; - _onSuccess = _args select 3; - _onfailure = _args select 4; - _params = _args select 5; - - if !(_params call _cond) exitwith { - [(_this select 1)] call cba_fnc_removePerFrameHandler; - 1534 cutText ["","plain"]; - _params call _onfailure; - }; - - if (GVAR(LOADING_BAR_STATUS) >= 1) exitwith { - [(_this select 1)] call cba_fnc_removePerFrameHandler; - 1534 cutText ["","plain"]; - _params call _onSuccess; - }; - private "_dialog"; - disableSerialization; - _dialog = uiNamespace getvariable QGVAR(RSC_PROGRESSBAR_LOADING); - - GVAR(LOADING_BAR_STATUS) = (diag_tickTime - _start) / _timeToWait; - (_dialog displayCtrl 6) progressSetPosition GVAR(LOADING_BAR_STATUS); - - }, 0, [diag_tickTime, _timeToWait, _cond, _onSuccess, _onfailure, _args]] call CBA_fnc_addPerFrameHandler; - true; -}; - -if (_args call _cond) exitwith { - _args call _onSuccess; - true; -}; - -_args call _onfailure; -false; \ No newline at end of file diff --git a/addons/gui/functions/fnc_sendHintTo.sqf b/addons/gui/functions/fnc_sendHintTo.sqf deleted file mode 100644 index 0454cc5691..0000000000 --- a/addons/gui/functions/fnc_sendHintTo.sqf +++ /dev/null @@ -1,26 +0,0 @@ -/** - * fn_sendHintTo.sqf - * @Descr: Sends a hint to player unit across network - * @Author: Glowbal - * - * @Arguments: [reciever OBJECT, message STRING] - * @Return: void - * @PublicAPI: true - */ - -#include "script_component.hpp" - -private ["_reciever","_message"]; -_reciever = _this select 0; -_message = _this select 1; - -if (isPlayer _reciever) then { - if (!local _reciever) then { - [_this, QUOTE(FUNC(sendHintTo)), _reciever, false] call EFUNC(common,execRemoteFnc); - } else { - if (isLocalized _message) then { - _message = localize _message; - }; - hintsilent format ["%1",_message]; - }; -}; \ No newline at end of file diff --git a/addons/gui/functions/fnc_sendMessageTo.sqf b/addons/gui/functions/fnc_sendMessageTo.sqf deleted file mode 100644 index a4e0e4ccd5..0000000000 --- a/addons/gui/functions/fnc_sendMessageTo.sqf +++ /dev/null @@ -1,31 +0,0 @@ -/** - * fn_sendMessageTo.sqf - * @Descr: Sends a chat message to player unit across the network - * @Author: Glowbal - * - * @Arguments: [reciever OBJECT, message STRING] - * @Return: void - * @PublicAPI: true - */ - -#include "script_component.hpp" - -private ["_reciever","_message"]; -_reciever = _this select 0; -_message = _this select 1; - - -if (isPlayer _reciever) then { - if (!local _reciever) then { - [_this, QUOTE(FUNC(sendMessageTo)), _reciever, false] call EFUNC(common,execRemoteFnc); - } else { - if (isnil QGVAR(LOGIC_OBJECT)) exitwith { - // need to create an object instead - }; - - if (isLocalized _message) then { - _message = localize _message; - }; - GVAR(LOGIC_OBJECT) globalChat format ["%1",_message]; - }; -}; diff --git a/addons/gui/functions/script_component.hpp b/addons/gui/functions/script_component.hpp deleted file mode 100644 index e9276928ad..0000000000 --- a/addons/gui/functions/script_component.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#define COMPONENT GUI -#include "\z\ace\addons\main\script_mod.hpp" - -#ifdef DEBUG_ENABLED_GUI - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_GUI - #define DEBUG_SETTINGS DEBUG_SETTINGS_GUI -#endif - -#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/gui/script_component.hpp b/addons/gui/script_component.hpp deleted file mode 100644 index e9276928ad..0000000000 --- a/addons/gui/script_component.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#define COMPONENT GUI -#include "\z\ace\addons\main\script_mod.hpp" - -#ifdef DEBUG_ENABLED_GUI - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_GUI - #define DEBUG_SETTINGS DEBUG_SETTINGS_GUI -#endif - -#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/gui/stringtable.xml b/addons/gui/stringtable.xml deleted file mode 100644 index 6a7807c925..0000000000 --- a/addons/gui/stringtable.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp index 96af8ac1ca..19fae7d3e8 100644 --- a/addons/medical/config.cpp +++ b/addons/medical/config.cpp @@ -7,7 +7,7 @@ class CfgPatches units[] = {"ACE_medical_supply_crate_cms", "ACE_bandage_basicItem","ACE_packing_bandageItem","ACE_bandageElasticItem","ACE_tourniquetItem","ACE_splintItem","ACE_morphineItem","ACE_atropineItem","ACE_epinephrineItem","ACE_plasma_ivItem","ACE_plasma_iv_500Item","ACE_plasma_iv250Item","ACE_blood_ivItem","ACE_blood_iv_500Item","ACE_blood_iv_250Item","ACE_saline_ivItem","ACE_saline_iv_500Item","ACE_saline_iv_250Item","ACE_quikclotItem","ACE_nasopharyngeal_tubeItem","ACE_opaItem","ACE_liquidSkinItem","ACE_chestsealItem","ACE_personal_aid_kitItem"}; weapons[] = {"ACE_surgical_kit"}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ACE_gui","ACE_common"}; + requiredAddons[] = {"ACE_common"}; version = VERSION; author[] = {$STR_ACE_Common_ACETeam, "Glowbal"}; authorUrl = "http://csemod.com"; diff --git a/addons/medical/functions/fnc_ActionCheckBloodPressureLocal.sqf b/addons/medical/functions/fnc_ActionCheckBloodPressureLocal.sqf index 9f645e80ad..bd17d769ec 100644 --- a/addons/medical/functions/fnc_ActionCheckBloodPressureLocal.sqf +++ b/addons/medical/functions/fnc_ActionCheckBloodPressureLocal.sqf @@ -51,7 +51,7 @@ if ([_caller] call FUNC(isMedic)) then { _title = format["STR_ACE_CHECK_BLOODPRESSURE"]; _content = ["STR_ACE_CHECK_BLOODPRESSURE_CHECKED_MEDIC", _output]; -[_caller, _title, _content, 0,[[_unit] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)] ] call EFUNC(gui,sendDisplayInformationTo); +[_caller, _title, _content, 0,[[_unit] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)] ] call EFUNC(common,sendDisplayInformationTo); if (_logOutPut != "") then { [_unit,"examine",format["%1 checked Blood Pressure: %2",[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToQuickViewLog); diff --git a/addons/medical/functions/fnc_ActionCheckPulse.sqf b/addons/medical/functions/fnc_ActionCheckPulse.sqf index 52e9158329..00e7f49490 100644 --- a/addons/medical/functions/fnc_ActionCheckPulse.sqf +++ b/addons/medical/functions/fnc_ActionCheckPulse.sqf @@ -19,7 +19,7 @@ if ([_caller] call FUNC(isSetTreatmentMutex)) exitwith {}; _title = format["STR_ACE_CHECK_PULSE"]; _content = ["STR_ACE_CHECK_PULSE_CONTENT"]; -[_caller, _title, _content] call EFUNC(gui,sendDisplayInformationTo); +[_caller, _title, _content] call EFUNC(common,sendDisplayInformationTo); _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; [2 + round(random(1)), @@ -32,8 +32,8 @@ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; [_caller,false] call FUNC(treatmentMutex); }, // on success { - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); [(_this select 0),false] call FUNC(treatmentMutex); }, // on failure [_caller, _target] // arguments -] call EFUNC(gui,loadingBar); +] call EFUNC(common,loadingBar); diff --git a/addons/medical/functions/fnc_ActioncheckBloodPressure.sqf b/addons/medical/functions/fnc_ActioncheckBloodPressure.sqf index d96ae8b19c..2f79bad6b2 100644 --- a/addons/medical/functions/fnc_ActioncheckBloodPressure.sqf +++ b/addons/medical/functions/fnc_ActioncheckBloodPressure.sqf @@ -19,7 +19,7 @@ if ([_caller] call FUNC(isSetTreatmentMutex)) exitwith {}; _title = format["STR_ACE_CHECK_BLOODPRESSURE"]; _content = ["STR_ACE_CHECK_BLOODPRESSURE_CONTENT"]; -[_caller, _title, _content] call EFUNC(gui,sendDisplayInformationTo); +[_caller, _title, _content] call EFUNC(common,sendDisplayInformationTo); _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; [2 + round(random(1)), @@ -32,9 +32,9 @@ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; [_caller,false] call FUNC(treatmentMutex); }, // on success { - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); [(_this select 0),false] call FUNC(treatmentMutex); }, // on failure [_caller, _target] // arguments -] call EFUNC(gui,loadingBar); +] call EFUNC(common,loadingBar); diff --git a/addons/medical/functions/fnc_actionCarryUnit.sqf b/addons/medical/functions/fnc_actionCarryUnit.sqf index d3cfb35aee..2dd1bb8f7f 100644 --- a/addons/medical/functions/fnc_actionCarryUnit.sqf +++ b/addons/medical/functions/fnc_actionCarryUnit.sqf @@ -87,9 +87,9 @@ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; }, // on success { - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); [(_this select 0), false] call FUNC(treatmentMutex); [(_this select 0), objNull,[0, 0, 0]] call EFUNC(common,carryObj); }, // on failure [_caller, _unit, _killOnDrop] // arguments -] call EFUNC(gui,loadingBar); \ No newline at end of file +] call EFUNC(common,loadingBar); \ No newline at end of file diff --git a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf index ae69f52272..5707f403df 100644 --- a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf @@ -44,7 +44,7 @@ if (_heartRate > 1.0) then { _title = "STR_ACE_CHECK_PULSE"; _content = ["STR_ACE_CHECK_PULSE_CHECKED_MEDIC",_heartRateOutput]; -[_caller, _title, _content, 0, [[_unit] call EFUNC(common,getName), round(_heartRate)]] call EFUNC(gui,sendDisplayInformationTo); +[_caller, _title, _content, 0, [[_unit] call EFUNC(common,getName), round(_heartRate)]] call EFUNC(common,sendDisplayInformationTo); if (_logOutPut != "") then { [_unit,"examine",format["%1 checked Heart Rate: %2",[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToQuickViewLog); diff --git a/addons/medical/functions/fnc_actionCheckResponse.sqf b/addons/medical/functions/fnc_actionCheckResponse.sqf index d2201e15f2..4ec2d269ad 100644 --- a/addons/medical/functions/fnc_actionCheckResponse.sqf +++ b/addons/medical/functions/fnc_actionCheckResponse.sqf @@ -19,7 +19,7 @@ if ([_caller] call FUNC(isSetTreatmentMutex)) exitwith {}; _title = format["STR_ACE_CHECK_RESPONSE"]; _content = ["STR_ACE_CHECK_RESPONSE_CONTENT"]; -[_caller, _title, _content] call EFUNC(gui,sendDisplayInformationTo); +[_caller, _title, _content] call EFUNC(common,sendDisplayInformationTo); _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; [2 + round(random(1)), @@ -38,14 +38,14 @@ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; _title = format["STR_ACE_CHECK_RESPONSE"]; _content = [format[localize "STR_ACE_CHECK_REPONSE_YOU_CHECKED",[_target] call EFUNC(common,getName)],_output]; - [_caller, _title, _content] call EFUNC(gui,sendDisplayInformationTo); + [_caller, _title, _content] call EFUNC(common,sendDisplayInformationTo); [_target,"examine",_output] call FUNC(addToQuickViewLog); [_caller,false] call FUNC(treatmentMutex); }, // on success { - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); [(_this select 0),false] call FUNC(treatmentMutex); }, // on failure [_caller, _target] // arguments -] call EFUNC(gui,loadingBar); +] call EFUNC(common,loadingBar); diff --git a/addons/medical/functions/fnc_actionDragUnit.sqf b/addons/medical/functions/fnc_actionDragUnit.sqf index d0fa1c70ea..d43b9a54dc 100644 --- a/addons/medical/functions/fnc_actionDragUnit.sqf +++ b/addons/medical/functions/fnc_actionDragUnit.sqf @@ -94,9 +94,9 @@ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; }, // on success { - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); [(_this select 0), false] call FUNC(treatmentMutex); [(_this select 0), objNull,[0, 0, 0]] call EFUNC(common,carryObj); }, // on failure [_caller, _unit, _killOnDrop] // arguments -] call EFUNC(gui,loadingBar); +] call EFUNC(common,loadingBar); diff --git a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf index 30363453e2..4d747eb3b5 100644 --- a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf +++ b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf @@ -53,10 +53,10 @@ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; [_caller,false] call FUNC(treatmentMutex); }, // on success { - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); [(_this select 0),false] call FUNC(treatmentMutex); }, // on failure [_caller, _target, _selectionName] // arguments -] call EFUNC(gui,loadingBar); +] call EFUNC(common,loadingBar); diff --git a/addons/medical/functions/fnc_handleHeal.sqf b/addons/medical/functions/fnc_handleHeal.sqf index 04e17a5d4c..ffd910116b 100644 --- a/addons/medical/functions/fnc_handleHeal.sqf +++ b/addons/medical/functions/fnc_handleHeal.sqf @@ -19,7 +19,7 @@ if (!(isPlayer _healer) && GVAR(setting_allowAIFullHeal) && !([_unit] call EFUNC [_unit, QGVAR(bandagedWounds),[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]] call EFUNC(common,setDefinedVariable); if (_unit != _healer) then { - [_unit,"STR_ACE_BANDAGED","STR_ACE_IS_BANDAGING_YOU", 0, [[_healer] call EFUNC(common,getName)]] call EFUNC(gui,sendDisplayMessageTo); + [_unit,"STR_ACE_BANDAGED","STR_ACE_IS_BANDAGING_YOU", 0, [[_healer] call EFUNC(common,getName)]] call EFUNC(common,sendDisplayMessageTo); }; [_unit,"treatment",format["%1 has patched up the patient",[_healer] call EFUNC(common,getName)]] call FUNC(addActivityToLog); diff --git a/addons/medical/functions/fnc_handleTreatment_Action_AirwayLocal.sqf b/addons/medical/functions/fnc_handleTreatment_Action_AirwayLocal.sqf index a140f74f6b..8d468aa60a 100644 --- a/addons/medical/functions/fnc_handleTreatment_Action_AirwayLocal.sqf +++ b/addons/medical/functions/fnc_handleTreatment_Action_AirwayLocal.sqf @@ -19,7 +19,7 @@ _removeItem = _this select 3; if (!local _target) exitwith{}; -[_target,"STR_ACE_AIRWAY","STR_ACE_IS_TREATING_YOUR_AIRWAY",0, [([_caller] call EFUNC(common,getName))]] call EFUNC(gui,sendDisplayMessageTo); +[_target,"STR_ACE_AIRWAY","STR_ACE_IS_TREATING_YOUR_AIRWAY",0, [([_caller] call EFUNC(common,getName))]] call EFUNC(common,sendDisplayMessageTo); [_target,_removeItem] call FUNC(addToTriageList); diff --git a/addons/medical/functions/fnc_handleTreatment_Action_BandageLocal.sqf b/addons/medical/functions/fnc_handleTreatment_Action_BandageLocal.sqf index c6a09fa4de..e39f12596e 100644 --- a/addons/medical/functions/fnc_handleTreatment_Action_BandageLocal.sqf +++ b/addons/medical/functions/fnc_handleTreatment_Action_BandageLocal.sqf @@ -24,7 +24,7 @@ if (!local _target) exitwith{ }; if (_caller != _target) then { - [_target,"STR_ACE_BANDAGING", "STR_ACE_IS_BANDAGING_YOU", 0, [[_treatingPerson] call EFUNC(common,getName)]] call EFUNC(gui,sendDisplayMessageTo); + [_target,"STR_ACE_BANDAGING", "STR_ACE_IS_BANDAGING_YOU", 0, [[_treatingPerson] call EFUNC(common,getName)]] call EFUNC(common,sendDisplayMessageTo); }; [_target,_removeItem] call FUNC(addToTriageList); diff --git a/addons/medical/functions/fnc_handleTreatment_Action_CPR.sqf b/addons/medical/functions/fnc_handleTreatment_Action_CPR.sqf index 61e12687a7..eea3b459ee 100644 --- a/addons/medical/functions/fnc_handleTreatment_Action_CPR.sqf +++ b/addons/medical/functions/fnc_handleTreatment_Action_CPR.sqf @@ -56,7 +56,7 @@ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; }, // on success { private ["_caller","_target", "_selectionName", "_prevAnim"]; - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); if (_prevAnim != "") then { [_caller,_prevAnim, 0] call EFUNC(common,doAnimation); @@ -66,6 +66,6 @@ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent; }, // on failure [_caller, _target, _selectionName, _removeItem, _prevAnim] // arguments -] call EFUNC(gui,loadingBar); +] call EFUNC(common,loadingBar); true; \ No newline at end of file diff --git a/addons/medical/functions/fnc_handleTreatment_Action_Stitching.sqf b/addons/medical/functions/fnc_handleTreatment_Action_Stitching.sqf index a6e9156966..69e8848acf 100644 --- a/addons/medical/functions/fnc_handleTreatment_Action_Stitching.sqf +++ b/addons/medical/functions/fnc_handleTreatment_Action_Stitching.sqf @@ -23,7 +23,7 @@ _selectionName = _this select 2; _removeItem = _this select 3; _prevAnim = _this select 4; -[_caller,"STR_ACE_STITCHING","STR_ACE_START_STITCHING_INJURIES", 0, [[_injuredPerson] call EFUNC(common,getName),_selectionName]] call EFUNC(gui,sendDisplayMessageTo); +[_caller,"STR_ACE_STITCHING","STR_ACE_START_STITCHING_INJURIES", 0, [[_injuredPerson] call EFUNC(common,getName),_selectionName]] call EFUNC(common,sendDisplayMessageTo); _bandagedWounds = [_injuredPerson,QGVAR(bandagedWounds)] call EFUNC(common,getDefinedVariable); _bodyPartN = [_selectionName] call FUNC(getBodyPartNumber); @@ -46,12 +46,12 @@ _caller setvariable [QGVAR(lastStichPerformed), diag_tickTime]; _prevAnim = _args select 4; if ((vehicle _caller != _caller) || ((getPos _caller) distance (_caller getvariable GVAR(ORIGINAL_POSITION_PLAYER))) >= 1) then { - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); if (_prevAnim != "") then { [_caller,_prevAnim, 0] call EFUNC(common,doAnimation); }; - [QGVAR(treatmentIconID), false, QUOTE(PATHTOF(data\icons\icon_advanced_treatment.paa)), [1,1,1,1]] call EFUNC(gui,displayIcon); + [QGVAR(treatmentIconID), false, QUOTE(PATHTOF(data\icons\icon_advanced_treatment.paa)), [1,1,1,1]] call EFUNC(common,displayIcon); ["Medical_handleTreatment_Stitching", [_caller, _target, _selectionName, _removeItem, false]] call ace_common_fnc_localEvent; ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent; @@ -83,7 +83,7 @@ _caller setvariable [QGVAR(lastStichPerformed), diag_tickTime]; if (_prevAnim != "") then { [_caller,_prevAnim, 0] call EFUNC(common,doAnimation); }; - [QGVAR(treatmentIconID), false, QUOTE(PATHTOF(data\icons\icon_advanced_treatment.paa)), [1,1,1,1]] call EFUNC(gui,displayIcon); + [QGVAR(treatmentIconID), false, QUOTE(PATHTOF(data\icons\icon_advanced_treatment.paa)), [1,1,1,1]] call EFUNC(common,displayIcon); ["Medical_handleTreatment_Stitching", [_caller, _target, _selectionName, _removeItem, true]] call ace_common_fnc_localEvent; ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent; @@ -99,6 +99,6 @@ _caller setvariable [QGVAR(lastStichPerformed), diag_tickTime]; {}, // on success {}, // on failure [_caller] // arguments -] call EFUNC(gui,loadingBar); +] call EFUNC(common,loadingBar); true; \ No newline at end of file diff --git a/addons/medical/functions/fnc_handleTreatment_Action_fullHeal.sqf b/addons/medical/functions/fnc_handleTreatment_Action_fullHeal.sqf index 53f82f74f0..d48ac82e1a 100644 --- a/addons/medical/functions/fnc_handleTreatment_Action_fullHeal.sqf +++ b/addons/medical/functions/fnc_handleTreatment_Action_fullHeal.sqf @@ -42,7 +42,7 @@ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; [_caller,_prevAnim, 0] call EFUNC(common,doAnimation); }; - [QGVAR(treatmentIconID), false, "", [1,1,1,1]] call EFUNC(gui,displayIcon); + [QGVAR(treatmentIconID), false, "", [1,1,1,1]] call EFUNC(common,displayIcon); ["Medical_handleTreatment_FullHeal", [_caller, _target, _selectionName, _removeItem, true]] call ace_common_fnc_localEvent; ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent; }, // on success @@ -54,18 +54,18 @@ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; _removeItem = _this select 3; _prevAnim = _this select 4; - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); if (_prevAnim != "") then { [_caller,_prevAnim, 0] call EFUNC(common,doAnimation); }; - [QGVAR(treatmentIconID), false, "", [1,1,1,1]] call EFUNC(gui,displayIcon); + [QGVAR(treatmentIconID), false, "", [1,1,1,1]] call EFUNC(common,displayIcon); ["Medical_handleTreatment_FullHeal", [_caller, _target, _selectionName, _removeItem, false]] call ace_common_fnc_localEvent; ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent; }, // on failure [_caller, _target, _selectionName, _removeItem, _prevAnim] // arguments -] call EFUNC(gui,loadingBar); +] call EFUNC(common,loadingBar); if (!(_unit getvariable [QEGVAR(common,isDead),false]) && alive _unit) then { diff --git a/addons/medical/functions/fnc_handleTreatment_Category_Advanced.sqf b/addons/medical/functions/fnc_handleTreatment_Category_Advanced.sqf index 2189a57a29..e74f86c438 100644 --- a/addons/medical/functions/fnc_handleTreatment_Category_Advanced.sqf +++ b/addons/medical/functions/fnc_handleTreatment_Category_Advanced.sqf @@ -31,7 +31,7 @@ if (vehicle _caller == _caller && (vehicle _target == _target) && !(stance _call if (ACE_player == _caller) then { // Displaying the treatment icon action - [QGVAR(treatmentIconID), true, QUOTE(PATHTOF(data\icons\icon_advanced_treatment.paa)), [1,1,1,1]] call EFUNC(gui,displayIcon); + [QGVAR(treatmentIconID), true, QUOTE(PATHTOF(data\icons\icon_advanced_treatment.paa)), [1,1,1,1]] call EFUNC(common,displayIcon); }; _isHandled = switch (_removeItem) do { @@ -77,7 +77,7 @@ _isHandled = switch (_removeItem) do { _selectionName = _this select 2; _removeItem = _this select 3; _prevAnim = _this select 4; - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); if (_prevAnim != "") then { [_caller,_prevAnim, 0] call EFUNC(common,doAnimation); @@ -87,7 +87,7 @@ _isHandled = switch (_removeItem) do { ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent; }, // on failure [_caller, _target, _selectionName, _removeItem, _prevAnim] // arguments - ] call EFUNC(gui,loadingBar); + ] call EFUNC(common,loadingBar); true; }; }; diff --git a/addons/medical/functions/fnc_handleTreatment_Category_Airway.sqf b/addons/medical/functions/fnc_handleTreatment_Category_Airway.sqf index 3456e6df18..0c6d2b0f65 100644 --- a/addons/medical/functions/fnc_handleTreatment_Category_Airway.sqf +++ b/addons/medical/functions/fnc_handleTreatment_Category_Airway.sqf @@ -31,7 +31,7 @@ if (_part == 0 || _part == 1) exitwith { if (ACE_player == _caller) then { // Displaying the treatment icon action - [QGVAR(treatmentIconID), true, QUOTE(PATHTOF(data\icons\icon_airway_management.paa)), [1,1,1,1]] call EFUNC(gui,displayIcon); + [QGVAR(treatmentIconID), true, QUOTE(PATHTOF(data\icons\icon_airway_management.paa)), [1,1,1,1]] call EFUNC(common,displayIcon); }; // Get the current position for the treatment person @@ -57,7 +57,7 @@ if (_part == 0 || _part == 1) exitwith { }, // on success { private ["_caller","_target", "_selectionName", "_prevAnim"]; - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); if (_prevAnim != "") then { [_caller,_prevAnim, 0] call EFUNC(common,doAnimation); @@ -67,7 +67,7 @@ if (_part == 0 || _part == 1) exitwith { ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent; }, // on failure [_caller, _target, _selectionName, _removeItem, _prevAnim] // arguments - ] call EFUNC(gui,loadingBar); + ] call EFUNC(common,loadingBar); true; }; // TODO display message to caller diff --git a/addons/medical/functions/fnc_handleTreatment_Category_Bandaging.sqf b/addons/medical/functions/fnc_handleTreatment_Category_Bandaging.sqf index c1113166f5..64239d7a83 100644 --- a/addons/medical/functions/fnc_handleTreatment_Category_Bandaging.sqf +++ b/addons/medical/functions/fnc_handleTreatment_Category_Bandaging.sqf @@ -39,11 +39,11 @@ if (ACE_player == _caller) then { }; default { - [_caller, "STR_ACE_BANDAGING", "STR_ACE_APPLY_BANDAGE", 0, [[_target] call EFUNC(common,getName), _selectionName]] call EFUNC(gui,sendDisplayMessageTo); + [_caller, "STR_ACE_BANDAGING", "STR_ACE_APPLY_BANDAGE", 0, [[_target] call EFUNC(common,getName), _selectionName]] call EFUNC(common,sendDisplayMessageTo); }; }; // Displaying the treatment icon action - [QGVAR(treatmentIconID), true, QUOTE(PATHTOF(data\icons\bandage_fracture_small.paa)), [1,1,1,1]] call EFUNC(gui,displayIcon); + [QGVAR(treatmentIconID), true, QUOTE(PATHTOF(data\icons\bandage_fracture_small.paa)), [1,1,1,1]] call EFUNC(common,displayIcon); }; // Get the current position for the treatment person @@ -83,7 +83,7 @@ if (isnil QGVAR(setting_bandageWaitingTime)) then { }, // on success { private ["_caller","_target","_selectedData", "_selectionName", "_prevAnim"]; - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); if (_prevAnim != "") then { [_caller,_prevAnim, 0] call EFUNC(common,doAnimation); @@ -92,6 +92,6 @@ if (isnil QGVAR(setting_bandageWaitingTime)) then { ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent; }, // on failure [_caller, _target, _selectionName, _removeItem, _prevAnim] // arguments -] call EFUNC(gui,loadingBar); +] call EFUNC(common,loadingBar); true; \ No newline at end of file diff --git a/addons/medical/functions/fnc_handleTreatment_Category_Medication.sqf b/addons/medical/functions/fnc_handleTreatment_Category_Medication.sqf index f57ab20783..980c478226 100644 --- a/addons/medical/functions/fnc_handleTreatment_Category_Medication.sqf +++ b/addons/medical/functions/fnc_handleTreatment_Category_Medication.sqf @@ -28,7 +28,7 @@ if (vehicle _caller == _caller && (vehicle _target == _target) && !(stance _call if (ACE_player == _caller) then { // Displaying the treatment icon action - [QGVAR(treatmentIconID), true, QUOTE(PATHTOF(data\icons\medication_small.paa)), [1,1,1,1]] call EFUNC(gui,displayIcon); + [QGVAR(treatmentIconID), true, QUOTE(PATHTOF(data\icons\medication_small.paa)), [1,1,1,1]] call EFUNC(common,displayIcon); }; // Get the current position for the treatment person @@ -54,7 +54,7 @@ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; }, // on success { private ["_caller","_target", "_selectionName", "_prevAnim"]; - [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo); + [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(common,sendDisplayInformationTo); if (_prevAnim != "") then { [_caller,_prevAnim, 0] call EFUNC(common,doAnimation); @@ -64,6 +64,6 @@ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller]; ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent; }, // on failure [_caller, _target, _selectionName, _removeItem, _prevAnim] // arguments -] call EFUNC(gui,loadingBar); +] call EFUNC(common,loadingBar); true; diff --git a/addons/medical/functions/fnc_initalizeModuleCMS.sqf b/addons/medical/functions/fnc_initalizeModuleCMS.sqf index 40e50c6fb0..79d9f8083d 100644 --- a/addons/medical/functions/fnc_initalizeModuleCMS.sqf +++ b/addons/medical/functions/fnc_initalizeModuleCMS.sqf @@ -46,7 +46,7 @@ if (GVAR(setting_AdvancedLevel) == -1) exitwith{}; GVAR(isEnabled) = true; -waituntil{!isnil "ACE_gui" && !isnil "ACE_common"}; +waituntil{!isnil "ACE_common"}; if (GVAR(setting_AdvancedLevel) > 0) then { diff --git a/addons/medical/functions/fnc_moduleAssignMedicalEquipment.sqf b/addons/medical/functions/fnc_moduleAssignMedicalEquipment.sqf index f26cfd9ffc..7ffeea2002 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicalEquipment.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicalEquipment.sqf @@ -21,7 +21,6 @@ private ["_logic","_setting","_objects", "_medicsLoadout", "_nonMedics", "_code" _logic = [_this,0,objNull,[objNull]] call BIS_fnc_param; if (!isNull _logic) then { _setting = _logic getvariable ["equipment",0]; - waituntil {!isnil "ACE_gui"}; // ensure the player unit is available. waituntil {time>0}; _start = diag_tickTime; diff --git a/addons/medical/functions/fnc_onTreatmentCompleted.sqf b/addons/medical/functions/fnc_onTreatmentCompleted.sqf index 4505575f00..146e55c3b1 100644 --- a/addons/medical/functions/fnc_onTreatmentCompleted.sqf +++ b/addons/medical/functions/fnc_onTreatmentCompleted.sqf @@ -23,4 +23,4 @@ if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { [_caller,false] call FUNC(treatmentMutex); // TODO: BUG: if AI finishes treatment, it will also hide the icon for the player -[QGVAR(treatmentIconID), false, "", [1,1,1,1]] call EFUNC(gui,displayIcon); +[QGVAR(treatmentIconID), false, "", [1,1,1,1]] call EFUNC(common,displayIcon); diff --git a/addons/medical/ui/define.hpp b/addons/medical/ui/define.hpp index 3af837e4f1..be45e0ff90 100644 --- a/addons/medical/ui/define.hpp +++ b/addons/medical/ui/define.hpp @@ -1 +1 @@ -#include "\z\ace\addons\gui\UI\define.hpp" \ No newline at end of file +#include "\z\ace\addons\common\define.hpp" \ No newline at end of file diff --git a/addons/medical/ui/menu.hpp b/addons/medical/ui/menu.hpp index f65b5ab807..db7266d0e7 100644 --- a/addons/medical/ui/menu.hpp +++ b/addons/medical/ui/menu.hpp @@ -1,8 +1,8 @@ class GVAR(medicalMenu) { idd = 314412; movingEnable = true; - onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(medicalMenu)), _this select 0)]; [ARR_2(QUOTE(QGVAR(id)), true)] call EFUNC(gui,blurScreen); [_this select 0] call FUNC(onMenuOpen);); - onUnload = QUOTE([ARR_2(QUOTE(QGVAR(id)), false)] call EFUNC(gui,blurScreen); [ARR_2(QUOTE(QGVAR(onMenuOpen)), 'onEachFrame')] call BIS_fnc_removeStackedEventHandler;); + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(medicalMenu)), _this select 0)]; [ARR_2(QUOTE(QGVAR(id)), true)] call EFUNC(common,blurScreen); [_this select 0] call FUNC(onMenuOpen);); + onUnload = QUOTE([ARR_2(QUOTE(QGVAR(id)), false)] call EFUNC(common,blurScreen); [ARR_2(QUOTE(QGVAR(onMenuOpen)), 'onEachFrame')] call BIS_fnc_removeStackedEventHandler;); class controlsBackground { class HeaderBackground: ACE_gui_backgroundBase{ idc = -1; From c8d4acfc81c81f246400ef85e07fd3120b888cf4 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Thu, 19 Feb 2015 19:29:54 +0100 Subject: [PATCH 02/16] Refactored displayText to no longer use spawn. --- addons/common/functions/fnc_displayText.sqf | 38 +++++++++------------ 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/addons/common/functions/fnc_displayText.sqf b/addons/common/functions/fnc_displayText.sqf index c6a68cbab2..7121ef6813 100644 --- a/addons/common/functions/fnc_displayText.sqf +++ b/addons/common/functions/fnc_displayText.sqf @@ -18,36 +18,32 @@ #define DEFAULT_DELAY 2 #define DEFAULT_PRIORITY 0 -if (isNil QGVAR(lastHint)) then { - GVAR(lastHint) = [0, 0]; -}; - _this resize 4; -_this spawn { - private ["_text", "_sound", "_delay", "_priority", "_lastHintTime", "_lastHintPriority", "_time"]; +private ["_text", "_sound", "_delay", "_priority", "_lastHintTime", "_lastHintPriority", "_time"]; +_text = _this select 0; +_sound = _this select 1; +_delay = _this select 2; +_priority = _this select 3; - _text = _this select 0; - _sound = _this select 1; - _delay = _this select 2; - _priority = _this select 3; +if (isNil QGVAR(lastHint)) then { + GVAR(lastHint) = [0, 0]; +}; - _lastHintTime = GVAR(lastHint) select 0; - _lastHintPriority = GVAR(lastHint) select 1; +_lastHintTime = GVAR(lastHint) select 0; +_lastHintPriority = GVAR(lastHint) select 1; - if !(typeName _text in ["STRING", "TEXT"]) then {_text = str _text}; - if (isNil "_sound") then {_sound = DEFAULT_PLAY_SOUND}; - if (isNil "_delay") then {_delay = DEFAULT_DELAY}; - if (isNil "_priority") then {_priority = DEFAULT_PRIORITY}; +if !(typeName _text in ["STRING", "TEXT"]) then {_text = str _text}; +if (isNil "_sound") then {_sound = DEFAULT_PLAY_SOUND}; +if (isNil "_delay") then {_delay = DEFAULT_DELAY}; +if (isNil "_priority") then {_priority = DEFAULT_PRIORITY}; - _time = time; - if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then { +_time = time; +if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then { hintSilent _text; if (_sound) then {playSound "ACE_Sound_Click"}; GVAR(lastHint) set [0, _time]; GVAR(lastHint) set [1, _priority]; - sleep _delay; - if (_time == GVAR(lastHint) select 0) then {hintSilent ""}; - }; + [{if ((_this select 0) == GVAR(lastHint) select 0) then {hintSilent ""};}, [_time], _delay, 0] call FUNC(waitAndExecute); }; From 21199a4ee663f0f42178d84003f56c2c43ca92ad Mon Sep 17 00:00:00 2001 From: Glowbal Date: Thu, 19 Feb 2015 19:32:49 +0100 Subject: [PATCH 03/16] Now uses BIS_fnc_rscLayer --- addons/common/functions/fnc_displayInformation.sqf | 7 ++----- addons/common/functions/fnc_displayMessage.sqf | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/addons/common/functions/fnc_displayInformation.sqf b/addons/common/functions/fnc_displayInformation.sqf index 64a27b0e40..007e1c3e32 100644 --- a/addons/common/functions/fnc_displayInformation.sqf +++ b/addons/common/functions/fnc_displayInformation.sqf @@ -10,8 +10,6 @@ #include "script_component.hpp" -#define DISPLAY_LAYER 32547 - private["_title", "_content","_type","_display","_headerCtrl","_contentCtrl","_contentAmountOfChars","_pos","_icon","_iconCtrl"]; _title = [_this, 0, "",[""]] call BIS_fnc_Param; _content = [_this, 1, [""],[[""]]] call BIS_fnc_Param; @@ -19,7 +17,7 @@ _type = [_this, 2, 0, [0]] call BIS_fnc_Param; _icon = [_this, 3, "",[""]] call BIS_fnc_Param; if (_title != "") then { - DISPLAY_LAYER cutRsc ['ACE_RscDisplayInformation',"PLAIN"]; + ("ACE_RscDisplayInformation" call BIS_fnc_rscLayer) cutRsc ['ACE_RscDisplayInformation',"PLAIN"]; disableSerialization; _display = uiNamespace getvariable 'ACE_RscDisplayInformation'; @@ -62,6 +60,5 @@ if (_title != "") then { }; }; } else { - - DISPLAY_LAYER cutText ["","PLAIN"]; + ("ACE_RscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; }; \ No newline at end of file diff --git a/addons/common/functions/fnc_displayMessage.sqf b/addons/common/functions/fnc_displayMessage.sqf index 317de8b240..7b3274cfc4 100644 --- a/addons/common/functions/fnc_displayMessage.sqf +++ b/addons/common/functions/fnc_displayMessage.sqf @@ -10,15 +10,13 @@ #include "script_component.hpp" -#define DISPLAY_LAYER 546 - private["_title", "_content","_type","_display","_headerCtrl","_contentCtrl","_contentAmountOfChars","_pos"]; _title = [_this, 0, "",[""]] call BIS_fnc_Param; _content = [_this, 1, "",[""]] call BIS_fnc_Param; _type = [_this, 2, 0, [0]] call BIS_fnc_Param; if (_title != "" && _content != "") then { - DISPLAY_LAYER cutRsc ['ACE_RscDisplayMessage',"PLAIN"]; + ("ACE_RscDisplayMessage" call BIS_fnc_rscLayer) cutRsc ['ACE_RscDisplayMessage',"PLAIN"]; disableSerialization; _display = uiNamespace getvariable 'ACE_RscDisplayMessage'; From a81c1fbef5cc637276325830e8f1e3ffe2c84876 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Thu, 19 Feb 2015 21:38:51 +0100 Subject: [PATCH 04/16] Overhauled AGM hint. --- addons/common/HintConfig.hpp | 6 ++-- addons/common/config.cpp | 29 ++++++++++++++++++- .../functions/fnc_displayTextPicture.sqf | 2 +- .../functions/fnc_displayTextStructured.sqf | 29 ++++++++++--------- .../functions/fnc_setSettingFromConfig.sqf | 3 +- addons/common/stringtable.xml | 8 ++++- 6 files changed, 56 insertions(+), 21 deletions(-) diff --git a/addons/common/HintConfig.hpp b/addons/common/HintConfig.hpp index 8c8dc38abb..28346c3da3 100644 --- a/addons/common/HintConfig.hpp +++ b/addons/common/HintConfig.hpp @@ -25,6 +25,7 @@ class RscTitles { y = safeZoneY + 0.2 * safezoneH; w = 0.2 * safeZoneW; h = 0.1 * SafeZoneH; + font = "PuristaMedium"; }; }; }; @@ -36,7 +37,6 @@ class RscTitles { fadeIn = 0.2; fadeOut = 0.2; name = "ACE_RscErrorHint"; - class controls { class HintBox: RscStructuredText { idc = 1; @@ -56,7 +56,7 @@ class RscTitles { duration = 7; idd = 86411; movingenable = 0; - onLoad = "uiNamespace setVariable ['ACE_RscDisplayMessage', _this select 0];" + onLoad = "uiNamespace setVariable ['ACE_RscDisplayMessage', _this select 0];"; fadein = 0; class controlsBackground { class header: ACE_gui_staticBase { @@ -88,7 +88,7 @@ class RscTitles { duration = 15; idd = 86412; movingenable = 0; - onLoad = "uiNamespace setVariable ['ACE_RscDisplayInformation', _this select 0];" + onLoad = "uiNamespace setVariable ['ACE_RscDisplayInformation', _this select 0];"; fadein = 0; class controlsBackground { class header: ACE_gui_staticBase { diff --git a/addons/common/config.cpp b/addons/common/config.cpp index b1c479b54f..b86744f0a9 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -102,7 +102,14 @@ class ACE_Settings { displayName = "$STR_ACE_Common_SettingFeedbackIconsName"; description = "$STR_ACE_Common_SettingFeedbackIconsDesc"; values[] = {"Hide", "Top right, downwards", "Top right, to the left", "Top left, downwards", "Top left, to the right"}; - }; + }; + class GVAR(displayTextColor) { + value[] = {0,0,0,0}; + typeName = "COLOR"; + isClientSetable = 1; + displayName = "$STR_ACE_Common_SettingDisplayTextColorName"; + description = "$STR_ACE_Common_SettingDisplayTextColorDesc"; + }; }; #include "define.hpp" @@ -113,3 +120,23 @@ class ACE_Settings { #include #include +class CfgUIGrids { + class IGUI { + class Presets { + class Arma3 { + class Variables { + grid_ACE_displayText[] = {{safeZoneW + safeZoneX - 0.175 * safezoneW, safeZoneY + 0.175 * safezoneH, 0.15 * safeZoneW, 0.125 * SafeZoneH}, "(((safezoneW / safezoneH) min 1.2) / 40)","((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"}; + }; + }; + }; + + class Variables { + class grid_ACE_displayText { + displayName = "ACE Hint"; + description = "Textual in game feedback to the player."; + preview = "\a3\Ui_f\data\GUI\Cfg\UIGrids\grid_hint_ca.paa"; + saveToProfile[] = {0,1}; + }; + }; + }; +}; diff --git a/addons/common/functions/fnc_displayTextPicture.sqf b/addons/common/functions/fnc_displayTextPicture.sqf index 8d46d8d38e..060f04f591 100644 --- a/addons/common/functions/fnc_displayTextPicture.sqf +++ b/addons/common/functions/fnc_displayTextPicture.sqf @@ -22,7 +22,7 @@ if (typeName _text != "TEXT") then { }; _text = composeText [ - parseText format ["", _image], + parseText format ["", _image], lineBreak, _text ]; diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index 62db6a829f..e103c904b3 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp" -private ["_text", "_size", "_isShown", "_ctrlHint"]; +private ["_text", "_size", "_isShown", "_ctrlHint", "_yPos", "_xPos", "_wPos", "_hPos", "_position"]; _text = _this select 0; _size = _this select 1; @@ -20,7 +20,10 @@ _size = _this select 1; if (isNil "_size") then {_size = 1}; if (typeName _text != "TEXT") then { - _text = composeText [lineBreak, parseText format ["%1", _text]]; + if (typeName _text == "STRING" && {isLocalized _text}) then { + _text = localize _text; + }; + _text = composeText [lineBreak, parseText format ["%1", _text]]; }; _isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]); @@ -30,19 +33,17 @@ _isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]); disableSerialization; _ctrlHint = uiNamespace getVariable "ACE_ctrlHint"; -_ctrlHint ctrlSetPosition [ - safeZoneW + safeZoneX - 0 * safezoneW, - safeZoneY + 0.2 * safezoneH, - 0.2 * safeZoneW, - _size * 0.1 * SafeZoneH -]; +_ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor); + +_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", safeZoneW + safeZoneX - 0.175 * safezoneW]; +_yPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH]; +_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", 0.15 * safeZoneW]; +_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", 0.125 * SafeZoneH]; +_position = [_xPos, _yPos, _wPos, _size * _hPos]; + +_ctrlHint ctrlSetPosition _position; _ctrlHint ctrlCommit 0; _ctrlHint ctrlSetStructuredText _text; -_ctrlHint ctrlSetPosition [ - safeZoneW + safeZoneX - 0.2 * safezoneW, - safeZoneY + 0.2 * safezoneH, - 0.2 * safeZoneW, - _size * 0.1 * SafeZoneH -]; +_ctrlHint ctrlSetPosition _position; _ctrlHint ctrlCommit ([0.2, 0] select _isShown); diff --git a/addons/common/functions/fnc_setSettingFromConfig.sqf b/addons/common/functions/fnc_setSettingFromConfig.sqf index 4151f3e0e4..577f3083e6 100644 --- a/addons/common/functions/fnc_setSettingFromConfig.sqf +++ b/addons/common/functions/fnc_setSettingFromConfig.sqf @@ -17,7 +17,8 @@ EXPLODE_1_PVT(_this,_optionEntry); _fnc_getValueWithType = { EXPLODE_2_PVT(_this,_optionEntry,_typeName); - _value = getNumber (_optionEntry >> "value"); + _valueConfig = (_optionEntry >> "value"); + _value = if (!(isArray _valueConfig) && !(isText _valueConfig)) then { getNumber (_optionEntry >> "value"); } else { 0 }; TRACE_3("_fnc_getValueWithType:", configName _optionEntry, _typeName, _value); if (_typeName == "BOOL") exitWith { _value > 0 diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index f7705f8ad9..3ece4206d7 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -320,7 +320,13 @@ Select the position of or disable the feedback icons on your screen. These icons will show to provide extra feedback on your character status and actions performed. - + + + Hint Background color + + + The color of the background from the ACE hints. + \ No newline at end of file From b58abaa2c03dc175fd2ff04f43bf2bbef137db67 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Thu, 19 Feb 2015 22:01:09 +0100 Subject: [PATCH 05/16] Added a transparant background --- addons/common/config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/config.cpp b/addons/common/config.cpp index b86744f0a9..201e44e181 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -104,7 +104,7 @@ class ACE_Settings { values[] = {"Hide", "Top right, downwards", "Top right, to the left", "Top left, downwards", "Top left, to the right"}; }; class GVAR(displayTextColor) { - value[] = {0,0,0,0}; + value[] = {0,0,0,0.1}; typeName = "COLOR"; isClientSetable = 1; displayName = "$STR_ACE_Common_SettingDisplayTextColorName"; From 9f3a0fe8d49231a70cec116aba17642ab268a524 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 22 Feb 2015 11:18:37 +0100 Subject: [PATCH 06/16] Removed displayInfo and displayMessage functions. --- .../functions/fnc_displayInformation.sqf | 64 ------------------- .../common/functions/fnc_displayMessage.sqf | 44 ------------- 2 files changed, 108 deletions(-) delete mode 100644 addons/common/functions/fnc_displayInformation.sqf delete mode 100644 addons/common/functions/fnc_displayMessage.sqf diff --git a/addons/common/functions/fnc_displayInformation.sqf b/addons/common/functions/fnc_displayInformation.sqf deleted file mode 100644 index 007e1c3e32..0000000000 --- a/addons/common/functions/fnc_displayInformation.sqf +++ /dev/null @@ -1,64 +0,0 @@ -/** - * fn_gui_displayInformation.sqf - * @Descr: N/A - * @Author: Glowbal - * - * @Arguments: [] - * @Return: - * @PublicAPI: false - */ - -#include "script_component.hpp" - -private["_title", "_content","_type","_display","_headerCtrl","_contentCtrl","_contentAmountOfChars","_pos","_icon","_iconCtrl"]; -_title = [_this, 0, "",[""]] call BIS_fnc_Param; -_content = [_this, 1, [""],[[""]]] call BIS_fnc_Param; -_type = [_this, 2, 0, [0]] call BIS_fnc_Param; -_icon = [_this, 3, "",[""]] call BIS_fnc_Param; - -if (_title != "") then { - ("ACE_RscDisplayInformation" call BIS_fnc_rscLayer) cutRsc ['ACE_RscDisplayInformation',"PLAIN"]; - - disableSerialization; - _display = uiNamespace getvariable 'ACE_RscDisplayInformation'; - if (!isnil "_display") then { - _headerCtrl = _display displayCtrl 1; - _headerCtrl ctrlSetText _title; - _iconCtrl = _display displayCtrl 10; - _iconCtrl ctrlSetText _icon; - - _idc = 2; - { - _text = _x; - if (_text != "") then { - _contentCtrl = _display displayCtrl _idc; - _contentCtrl ctrlSetText _text; - - _contentAmountOfChars = count (toArray _text); - _pos = ctrlPosition _contentCtrl; - _pos set [2, _contentAmountOfChars * ((((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)/ 3.3) max (safeZoneW / 11)]; - _contentCtrl ctrlSetPosition _pos; - _contentCtrl ctrlCommit 0; - - - if (_type >0) then { - if (_type == 1) then { - _contentCtrl ctrlSetBackgroundColor [0.7,0.2,0.2,0.8]; - _contentCtrl ctrlSetTextColor [1,1,1,0.9]; - }; - }; - _idc = _idc + 1; - }; - }foreach _content; - - while {(_idc < 7)} do { - _contentCtrl = _display displayCtrl _idc; - _contentCtrl ctrlSetPosition [0,0,0,0]; - _contentCtrl ctrlCommit 0; - - _idc = _idc + 1; - }; - }; -} else { - ("ACE_RscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; -}; \ No newline at end of file diff --git a/addons/common/functions/fnc_displayMessage.sqf b/addons/common/functions/fnc_displayMessage.sqf deleted file mode 100644 index 7b3274cfc4..0000000000 --- a/addons/common/functions/fnc_displayMessage.sqf +++ /dev/null @@ -1,44 +0,0 @@ -/** - * fn_gui_displayMessage.sqf - * @Descr: N/A - * @Author: Glowbal - * - * @Arguments: [] - * @Return: - * @PublicAPI: false - */ - -#include "script_component.hpp" - -private["_title", "_content","_type","_display","_headerCtrl","_contentCtrl","_contentAmountOfChars","_pos"]; -_title = [_this, 0, "",[""]] call BIS_fnc_Param; -_content = [_this, 1, "",[""]] call BIS_fnc_Param; -_type = [_this, 2, 0, [0]] call BIS_fnc_Param; - -if (_title != "" && _content != "") then { - ("ACE_RscDisplayMessage" call BIS_fnc_rscLayer) cutRsc ['ACE_RscDisplayMessage',"PLAIN"]; - - disableSerialization; - _display = uiNamespace getvariable 'ACE_RscDisplayMessage'; - if (!isnil "_display") then { - _headerCtrl = _display displayCtrl 1; - _contentCtrl = _display displayCtrl 2; - - _headerCtrl ctrlSetText _title; - _contentCtrl ctrlSetText _content; - - // TODO get a font that has the same width characters for all. Ask Jaynus. - _contentAmountOfChars = count (toArray _content); - _pos = ctrlPosition _contentCtrl; - _pos set [2, _contentAmountOfChars * ((((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)/ 3.3) max (safeZoneW / 11)]; - _contentCtrl ctrlSetPosition _pos; - _contentCtrl ctrlCommit 0; - - if (_type >0) then { - if (_type == 1) then { - _contentCtrl ctrlSetBackgroundColor [0.7,0.2,0.2,0.8]; - _contentCtrl ctrlSetTextColor [1,1,1,0.9]; - }; - }; - }; -}; \ No newline at end of file From a57448716627668463ab1ef7337cb1202ee8f1b0 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 22 Feb 2015 11:19:10 +0100 Subject: [PATCH 07/16] Added localization support for displayText --- .../functions/fnc_displayTextPicture.sqf | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/addons/common/functions/fnc_displayTextPicture.sqf b/addons/common/functions/fnc_displayTextPicture.sqf index 060f04f591..4c175b0e27 100644 --- a/addons/common/functions/fnc_displayTextPicture.sqf +++ b/addons/common/functions/fnc_displayTextPicture.sqf @@ -1,30 +1,27 @@ /* - * Author: commy2 + * Author: commy2, Glowbal * * Display a structured text with image. * * Argument: - * 0: Text (Anything) - * 1: Image (String) + * 0: Text + * 1: Image * * Return value: * Nothing */ + #include "script_component.hpp" private ["_text", "_image"]; - _text = _this select 0; _image = _this select 1; if (typeName _text != "TEXT") then { - _text = parseText format ["%1", _text]; + if (typeName _text == "STRING" && {isLocalized _text}) then { + _text = localize _text; + }; + _text = parseText format ["%1", _text]; }; - -_text = composeText [ - parseText format ["", _image], - lineBreak, - _text -]; - -[_text] call FUNC(displayTextStructured); +_text = composeText [parseText format ["", _image], lineBreak, _text]; +[_text, 2] call FUNC(displayTextStructured); From 8393645df911d376c8ec8da8648b024b3585a8d1 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 22 Feb 2015 11:19:32 +0100 Subject: [PATCH 08/16] Changed position to be inline with the weapon selector UI element by default --- addons/common/config.cpp | 2 +- .../functions/fnc_displayTextStructured.sqf | 24 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/addons/common/config.cpp b/addons/common/config.cpp index b86744f0a9..000adc639f 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -125,7 +125,7 @@ class CfgUIGrids { class Presets { class Arma3 { class Variables { - grid_ACE_displayText[] = {{safeZoneW + safeZoneX - 0.175 * safezoneW, safeZoneY + 0.175 * safezoneH, 0.15 * safeZoneW, 0.125 * SafeZoneH}, "(((safezoneW / safezoneH) min 1.2) / 40)","((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"}; + grid_ACE_displayText[] = {{((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40)),safeZoneY + 0.175 * safezoneH, (10 *(((safezoneW / safezoneH) min 1.2) / 40)), (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))}, "(((safezoneW / safezoneH) min 1.2) / 40)","((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"}; }; }; }; diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index e103c904b3..4f5c7737a9 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -1,15 +1,16 @@ /* - * Author: commy2 + * Author: commy2, Glowbal * * Display a structured text. * * Argument: - * 0: Text (Anything) - * 1: Size of the textbox (Number, optional default: 1) + * 0: Text + * 1: Size of the textbox * * Return value: * Nothing */ + #include "script_component.hpp" private ["_text", "_size", "_isShown", "_ctrlHint", "_yPos", "_xPos", "_wPos", "_hPos", "_position"]; @@ -34,11 +35,18 @@ disableSerialization; _ctrlHint = uiNamespace getVariable "ACE_ctrlHint"; _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor); - -_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", safeZoneW + safeZoneX - 0.175 * safezoneW]; +/* +// This does not function at the moment. Has been disabled until it fixed. +_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))]; _yPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH]; -_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", 0.15 * safeZoneW]; -_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", 0.125 * SafeZoneH]; +_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))]; +_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))]; +*/ + +_xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40)); +_yPos = safeZoneY + 0.175 * safezoneH; +_wPos = (10 *(((safezoneW / safezoneH) min 1.2) / 40)); +_hPos = (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)); _position = [_xPos, _yPos, _wPos, _size * _hPos]; _ctrlHint ctrlSetPosition _position; @@ -46,4 +54,4 @@ _ctrlHint ctrlCommit 0; _ctrlHint ctrlSetStructuredText _text; _ctrlHint ctrlSetPosition _position; -_ctrlHint ctrlCommit ([0.2, 0] select _isShown); +_ctrlHint ctrlCommit ([0.5, 0] select _isShown); From 1ed50bfe3e5653dfa367a076dfa5c9e2cd33f7e5 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 22 Feb 2015 11:35:52 +0100 Subject: [PATCH 09/16] Fixed font size --- addons/common/HintConfig.hpp | 8 ++++---- addons/common/functions/fnc_displayTextStructured.sqf | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/common/HintConfig.hpp b/addons/common/HintConfig.hpp index 28346c3da3..235b553f53 100644 --- a/addons/common/HintConfig.hpp +++ b/addons/common/HintConfig.hpp @@ -17,8 +17,8 @@ class RscTitles { class HintBox: RscStructuredText { idc = 1; text = ""; - size = "1 / 40 / (getResolution select 5)"; - sizeEx = 1; + //size = "1 / 40 / (getResolution select 5)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0, 0, 0, 0.5}; x = safeZoneW + safeZoneX - 0 * safezoneW; //safeZoneW + safeZoneX - 0.2 * safezoneW; @@ -41,8 +41,8 @@ class RscTitles { class HintBox: RscStructuredText { idc = 1; text = ""; - size = "1 / 40 / (getResolution select 5)"; - sizeEx = 1; + //size = "1 / 40 / (getResolution select 5)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0.8, 0, 0, 0.5}; x = 0.3 * safeZoneW + safeZoneX; diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index 4f5c7737a9..613f06c1e2 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -18,7 +18,7 @@ private ["_text", "_size", "_isShown", "_ctrlHint", "_yPos", "_xPos", "_wPos", " _text = _this select 0; _size = _this select 1; -if (isNil "_size") then {_size = 1}; +if (isNil "_size") then {_size = 1.5}; if (typeName _text != "TEXT") then { if (typeName _text == "STRING" && {isLocalized _text}) then { From 14411a5ef085028470c373db56f788d0f0bfef38 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 22 Feb 2015 11:36:21 +0100 Subject: [PATCH 10/16] Fixed weird fix for getNumber for Array bug in setSettingFromConfig. --- addons/common/functions/fnc_setSettingFromConfig.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/functions/fnc_setSettingFromConfig.sqf b/addons/common/functions/fnc_setSettingFromConfig.sqf index 577f3083e6..27c727acab 100644 --- a/addons/common/functions/fnc_setSettingFromConfig.sqf +++ b/addons/common/functions/fnc_setSettingFromConfig.sqf @@ -18,7 +18,7 @@ _fnc_getValueWithType = { EXPLODE_2_PVT(_this,_optionEntry,_typeName); _valueConfig = (_optionEntry >> "value"); - _value = if (!(isArray _valueConfig) && !(isText _valueConfig)) then { getNumber (_optionEntry >> "value"); } else { 0 }; + _value = if (isNumber (_optionEntry >> "value")) then {getNumber (_optionEntry >> "value")} else {0}; TRACE_3("_fnc_getValueWithType:", configName _optionEntry, _typeName, _value); if (_typeName == "BOOL") exitWith { _value > 0 From 323d673eec05f39897a80009cc1e86ef15a8079c Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 22 Feb 2015 13:20:17 +0100 Subject: [PATCH 11/16] Removed deprecated config entries (DisplayMessage and DisplayInformation) --- addons/common/HintConfig.hpp | 95 ------------------------------------ 1 file changed, 95 deletions(-) diff --git a/addons/common/HintConfig.hpp b/addons/common/HintConfig.hpp index 235b553f53..5dc0e6384a 100644 --- a/addons/common/HintConfig.hpp +++ b/addons/common/HintConfig.hpp @@ -52,101 +52,6 @@ class RscTitles { }; }; }; - class ACE_RscDisplayMessage { - duration = 7; - idd = 86411; - movingenable = 0; - onLoad = "uiNamespace setVariable ['ACE_RscDisplayMessage', _this select 0];"; - fadein = 0; - class controlsBackground { - class header: ACE_gui_staticBase { - idc = 1; - type = CT_STATIC; - x = "safezoneX + (safezoneW / 10)"; - y = "safezoneY + (30 * (safeZoneH / 40))"; - w = "(safeZoneW / 10)"; - h = "(safeZoneH / 40)"; - style = ST_LEFT; - font = FontCSE; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - colorText[] = {0.85, 0.85, 0.85, 1.0}; - colorBackground[] = {0, 0, 0, 0.9}; - text = ""; - }; - class text: header { - idc = 2; - y = "safezoneY + (31 * (safeZoneH / 40))"; - w = "(safeZoneW / 10) * 1.3"; - colorText[] = {0.0, 0.0, 0.0, 1.0}; - colorBackground[] = {1, 1, 1, 0.9}; - text = ""; - }; - }; - }; - - class ACE_RscDisplayInformation { - duration = 15; - idd = 86412; - movingenable = 0; - onLoad = "uiNamespace setVariable ['ACE_RscDisplayInformation', _this select 0];"; - fadein = 0; - class controlsBackground { - class header: ACE_gui_staticBase { - idc = 1; - type = CT_STATIC; - x = "safezoneX + (safezoneW / 10)"; - y = "safezoneY + (6 * (safeZoneH / 40))"; - w = "(safeZoneW / 10)"; - h = "(safeZoneH / 40)"; - style = ST_LEFT; - font = FontCSE; - SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - colorText[] = {0.85, 0.85, 0.85, 1.0}; - colorBackground[] = {0, 0, 0, 0.9}; - text = ""; - }; - class text: header { - idc = 2; - y = "safezoneY + (7.1 * (safeZoneH / 40))"; - w = "(safeZoneW / 10) * 1.3"; - colorText[] = {0.0, 0.0, 0.0, 1.0}; - colorBackground[] = {1, 1, 1, 0.9}; - text = ""; - }; - class text2: text { - idc = 3; - y = "safezoneY + (8.2 * (safeZoneH / 40))"; - }; - class text3: text { - idc = 4; - y = "safezoneY + (9.3 * (safeZoneH / 40))"; - }; - class text4: text { - idc = 5; - y = "safezoneY + (10.4 * (safeZoneH / 40))"; - }; - class text5: text { - idc = 6; - y = "safezoneY + (11.5 * (safeZoneH / 40))"; - }; - - - class icon: ACE_gui_backgroundBase { - type = CT_STATIC; - idc = 10; - style = ST_PICTURE; - colorBackground[] = {0,0,0,1}; - colorText[] = {1, 1, 1, 1}; - font = FontCSE; - text = ""; - sizeEx = 0.032; - x = "safezoneX + (safezoneW / 10)"; - y = "safezoneY + (4 * (safeZoneH / 40))"; - w = "(safeZoneH / 40)*2"; - h = "(safeZoneH / 40)*2"; - }; - }; - }; class ACE_EventHandlerHelper: ACE_Rsc_Display_Base { idd = -1; From 9d44ec18b861d73d2d4126e4493646e496e4d960 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 22 Feb 2015 13:35:05 +0100 Subject: [PATCH 12/16] Added a default text color setting --- addons/common/config.cpp | 7 +++++++ addons/common/functions/fnc_displayTextStructured.sqf | 1 + addons/common/stringtable.xml | 8 +++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/addons/common/config.cpp b/addons/common/config.cpp index bbce1ae77b..ed1f947db9 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -110,6 +110,13 @@ class ACE_Settings { displayName = "$STR_ACE_Common_SettingDisplayTextColorName"; description = "$STR_ACE_Common_SettingDisplayTextColorDesc"; }; + class GVAR(displayTextFontColor) { + value[] = {1,1,1,1}; + typeName = "COLOR"; + isClientSetable = 1; + displayName = "$STR_ACE_Common_SettingDisplayTextFontColorName"; + description = "$STR_ACE_Common_SettingDisplayTextFontColorDesc"; + }; }; #include "define.hpp" diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index 613f06c1e2..054e98de70 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -35,6 +35,7 @@ disableSerialization; _ctrlHint = uiNamespace getVariable "ACE_ctrlHint"; _ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor); +_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor); /* // This does not function at the moment. Has been disabled until it fixed. _xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))]; diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 3ece4206d7..7e2920f11c 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -326,7 +326,13 @@ The color of the background from the ACE hints. - + + + Hint text font color + + + The color of the text font from the ACE hints. This color is the default color for all text displayed through the ACE Hint system, if the hint text has no other color specified. + \ No newline at end of file From dd51037c5e7fcb58167df1d95a9b1644de65cba0 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 22 Feb 2015 13:44:17 +0100 Subject: [PATCH 13/16] Added support for image color --- addons/common/functions/fnc_displayTextPicture.sqf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/common/functions/fnc_displayTextPicture.sqf b/addons/common/functions/fnc_displayTextPicture.sqf index 4c175b0e27..8472b3d1b6 100644 --- a/addons/common/functions/fnc_displayTextPicture.sqf +++ b/addons/common/functions/fnc_displayTextPicture.sqf @@ -6,6 +6,7 @@ * Argument: * 0: Text * 1: Image + * 2: Image color * * Return value: * Nothing @@ -13,9 +14,11 @@ #include "script_component.hpp" -private ["_text", "_image"]; +private ["_text", "_image", "_imageColor"]; _text = _this select 0; _image = _this select 1; +_imageColor = if (count _this > 2) then {_this select 2} else {[1,1,1]}; +_imageColor resize 3; if (typeName _text != "TEXT") then { if (typeName _text == "STRING" && {isLocalized _text}) then { @@ -23,5 +26,5 @@ if (typeName _text != "TEXT") then { }; _text = parseText format ["%1", _text]; }; -_text = composeText [parseText format ["", _image], lineBreak, _text]; +_text = composeText [parseText format ["", _image, _imageColor call BIS_fnc_colorRGBtoHTML], lineBreak, _text]; [_text, 2] call FUNC(displayTextStructured); From 77666e80978a3ba2b64a8946ee02d7c4a1d37f70 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 22 Feb 2015 13:58:51 +0100 Subject: [PATCH 14/16] Added weapon resting state icon --- addons/resting/data/icons/icon_bipod.paa | Bin 0 -> 5625 bytes addons/resting/functions/fnc_restWeapon.sqf | 3 +++ addons/resting/functions/fnc_unRestWeapon.sqf | 4 ++++ 3 files changed, 7 insertions(+) create mode 100644 addons/resting/data/icons/icon_bipod.paa diff --git a/addons/resting/data/icons/icon_bipod.paa b/addons/resting/data/icons/icon_bipod.paa new file mode 100644 index 0000000000000000000000000000000000000000..c2b6a2fb3e1b92e0b33034dbd7dbffc855baa9e0 GIT binary patch literal 5625 zcmeGg3s6*5^gebU5tF-+Y)U{bilpV3&g7<{?%R~lIx0KGBd0CC*hd+t5= z-1EQZKAuKLTjHif$6K_7kmly*Q4F7DnSnS3Ks?$qJqmFS9>m{>ii#EB|1x;8{0PYo zAY_Aqkkjz=4g?|)0vsMNj3CzBFl(-sQbI&gG-xhLsZR3uK?N5;hQ}L5RhU-hz4}8N z>WfaC(G+-kRR_A4paaOTby8$4VAX)54|Qeh?NvFK%{XrZ0YK4oLpf z5J^E^X+=1b7Zjoq{x%etQoHN7Zdt~0758{z>y*+frQsUdv2N5Wp0f3gEmz4y@-)}ad`^`txhgQnOrn6!cLvS<_BisM-INTQ6Zk>5iE}Tj!2JTpK_*S~YeN(fDyH z{c{qf=W@CcWtMnrXQq78+{N?<^@VsMemH6Q!0|Y16D*d8t+no^dN%BGR8q;|lb@hG z9Js!qvAq!dovF(2e`xs(=Z;jCzqYtI@n(64mRF|NwWf74ZF!zweFj%zyp%wMc%8{%6dVtiO(+3HI(Wa4kNt<;AVag8Xxo>ohn z%N#P(mw>C{L$mlVDwzbnvb4L!?prp-P`|{u^Q3+4Ls?rPu< zz=bxf>pE4a#J``PAcS68y0`k;k8^PUhp#;$11?HQwHI97`4F8v1bjs&rDocEg3{nR zLY^F#2lXi|Ha86AgYtY!yx-H_%{E;v(bwa84)S4O8I{Xua{<}|^?fGm+BWmyv%_&7 zfD2{$xPt8m{Y9_s&A8mPexk_p`jZ!+Iu+3GU9dT<(;mp|D%Z=UihO4W(|kCCSY=+o4E@Rn9@UYrof;>#aQ9Q)<=0ZtGRo)8B?2OW#0Ctn1Z&(E$BoKs)9`Ash%3 zA-2juKA^w*9<KPXDj>g?z5HuGgY|BEO8!GZ^FFsRd$^Puq-ZM|D$cWb zfR{4jzh5tx(>4cUk7GOpPm+?={4+rQjcbA88=vg92V9wI=~aE8yKjaB?47m$r#2EJ zWR=GbfOuLN9J~`A`MZ=_9#hf9(hl-6Yz@@J1+uvs(-xfIe}`lFPW*5$1S33ZX!pcz zE-7_WMjDhsxMsmQL>KZfy(|)s#SL%H*3q*_jmKnuTX?uHG1qVFDjl+PpOO~W6T=8p zx8ski5sdKQJRCzee71@aGiNgL!#02XN9HA_oyxI`2k+3vPruu8FrCc<3r-iW zx9iG?9_ax*1~vk6Kl=~Ql@cT1B*67N^qE77kL($eDIaz76Mzi^BfOE{)QfONo6>8l znS4AyvcY7G{&>*WNblJkXjOXn%fJZl+sUJ8HZ63uHl4>y2y|hbca1~d|80m9udQ$m z@mxFA^?pUBvic^gg43~ zy7HUksAQ+2FDIt#-k#tra$lot*VA03=K`g~AgB~b58E52JM4R_>2U|fgVDrTvzJP* zj`SDKL%e9Md1~7xMmJq^bk{3w6YRzL7w-shW_4Afd_Ax2{k8us`h0#&KLQ4EKaPhs zWp0kAO|D(J3u z4q#ybx97OPy4myJ$(YaNfo7D`k=PaLY1y;;Rrvv121a-zfA7s1X)aR|mdEKX}I1x+y Date: Sun, 22 Feb 2015 14:38:48 +0100 Subject: [PATCH 15/16] Added option to toggle between progressbar top and bottom --- addons/common/ProgressScreen.hpp | 4 ++-- addons/common/config.cpp | 9 +++++++++ addons/common/functions/fnc_progressBar.sqf | 13 +++++++++++++ addons/common/stringtable.xml | 6 ++++++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/addons/common/ProgressScreen.hpp b/addons/common/ProgressScreen.hpp index d7df49efdf..751d48af9f 100644 --- a/addons/common/ProgressScreen.hpp +++ b/addons/common/ProgressScreen.hpp @@ -17,7 +17,7 @@ class GVAR(ProgressBar_Dialog) { type = 0; style = 0; size = 1; - colorBackground[] = {0, 0, 0, 0.1}; + colorBackground[] = {0, 0, 0, 0.0}; colorText[] = {0, 0, 0, 0}; x = "safezoneX"; y = "safezoneY"; @@ -31,7 +31,7 @@ class GVAR(ProgressBar_Dialog) { y = "0.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; h = ".8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - colorFrame[] = {0,0,0,0.025}; + colorFrame[] = {0,0,0,0.0}; colorBar[] = {0.27,0.5,0.31,0.8}; texture = "#(argb,8,8,3)color(1,1,1,0.7)"; }; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index ed1f947db9..d562d185ec 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -103,6 +103,15 @@ class ACE_Settings { description = "$STR_ACE_Common_SettingFeedbackIconsDesc"; values[] = {"Hide", "Top right, downwards", "Top right, to the left", "Top left, downwards", "Top left, to the right"}; }; + class GVAR(SettingProgressBarLocation) { + value = 0; + typeName = "SCALAR"; + force = 0; + isClientSetable = 1; + displayName = "$STR_ACE_Common_SettingProgressbarLocationName"; + description = "$STR_ACE_Common_SettingProgressbarLocationDesc"; + values[] = {"Top", "Bottom"}; + }; class GVAR(displayTextColor) { value[] = {0,0,0,0.1}; typeName = "COLOR"; diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf index 1d73cccc79..0b8fcc7ac4 100644 --- a/addons/common/functions/fnc_progressBar.sqf +++ b/addons/common/functions/fnc_progressBar.sqf @@ -15,6 +15,9 @@ * * Return value: * Nothing +* +* Example: +* [5, [], {Hint "Finished!"}, {hint "Failure!"}, "My Title"] call ace_common_fnc_progressBar */ #include "script_component.hpp" @@ -32,6 +35,16 @@ closeDialog 0; createDialog QGVAR(ProgressBar_Dialog); (uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetText _localizedTitle; +if (GVAR(SettingProgressBarLocation) == 1) then { + private "_ctrlPos"; + _ctrlPos = [1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2), 29 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2), 38 * (((safezoneW / safezoneH) min 1.2) / 40), 0.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)]; + (uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlSetPosition _ctrlPos; + (uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetPosition _ctrlPos; + (uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlCommit 0; + (uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlCommit 0; +}; + + _perFrameFunction = { PARAMS_2(_parameters,_pfhID); EXPLODE_8_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime,_exceptions); diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 7e2920f11c..d1462c1214 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -321,6 +321,12 @@ Select the position of or disable the feedback icons on your screen. These icons will show to provide extra feedback on your character status and actions performed. + + Progress bar location + + + Set the desired location of the progress bar on your screen. + Hint Background color From 82c181cd7c9bd5c1b7dca0ee4ffc84fac9cf0acb Mon Sep 17 00:00:00 2001 From: Glowbal Date: Sun, 22 Feb 2015 14:54:54 +0100 Subject: [PATCH 16/16] Fixed header --- addons/common/functions/fnc_displayIcon.sqf | 31 +++++++++++++-------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/addons/common/functions/fnc_displayIcon.sqf b/addons/common/functions/fnc_displayIcon.sqf index 94fa887da9..1fbc4e89aa 100644 --- a/addons/common/functions/fnc_displayIcon.sqf +++ b/addons/common/functions/fnc_displayIcon.sqf @@ -1,14 +1,23 @@ -/** - * fn_gui_displayIcon.sqf - * @Descr: - * @Author: Glowbal - * - * @Arguments: [] - * @Return: - * @PublicAPI: true - * - * @Example ["myID", true, QUOTE(PATHTOF(data\icon_group.paa)), [1,1,1,1], 0] call ace_gui_fnc_displayIcon; - */ +/* +* Author: Glowbal +* +* Draw progress bar and execute given function if succesful. +* Finish/Failure/Conditional are all passed [_args, _elapsedTime, _totalTime, _errorCode] +* +* Argument: +* 0: icon ID +* 1: show +* 2: Icon Path +* 3: Icon color +* 4: timeAlive. -1 = forever +* +* Return value: +* Nothing +* +* Example: +* ["myID", true, QUOTE(PATHTOF(data\icon_group.paa)), [1,1,1,1], 0] call ace_gui_fnc_displayIcon; +*/ + #include "script_component.hpp"