From 6f89233e12842967dff1e9869e3a8b15875259d6 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Mon, 6 Apr 2015 00:02:34 -0300 Subject: [PATCH] Move wind info display to weather --- addons/advanced_ballistics/RscTitles.hpp | 31 +------------------ addons/advanced_ballistics/XEH_preInit.sqf | 1 - addons/advanced_ballistics/config.cpp | 8 ----- addons/advanced_ballistics/initKeybinds.sqf | 14 +-------- addons/weather/RscTitles.hpp | 31 +++++++++++++++++++ addons/weather/XEH_postInit.sqf | 12 +++++++ addons/weather/XEH_preInit.sqf | 4 +-- addons/weather/config.cpp | 4 +-- .../functions/fnc_displayWindInfo.sqf | 0 addons/weather/stringtable.xml | 8 +++++ 10 files changed, 57 insertions(+), 56 deletions(-) create mode 100644 addons/weather/RscTitles.hpp rename addons/{advanced_ballistics => weather}/functions/fnc_displayWindInfo.sqf (100%) create mode 100644 addons/weather/stringtable.xml diff --git a/addons/advanced_ballistics/RscTitles.hpp b/addons/advanced_ballistics/RscTitles.hpp index 4d6ab56696..f169650381 100644 --- a/addons/advanced_ballistics/RscTitles.hpp +++ b/addons/advanced_ballistics/RscTitles.hpp @@ -1,34 +1,5 @@ class RscTitles { - class RscWindIntuitive - { - idd=-1; - onLoad="with uiNameSpace do { RscWindIntuitive = _this select 0 };"; - movingEnable=0; - duration=60; - fadeIn="false"; - fadeOut="false"; - class controls - { - class RscWindIntuitive - { - idc=132948; - type=0; - style=48; - font="TahomaB"; - colorBackground[]={0,0,0,0}; - colorText[]={0,0,0,0}; - x="SafeZoneX + 0.001"; - y="SafeZoneY + 0.001"; - w=0.2; - h=0.2*4/3; - size=0.034; - sizeEx=0.027; - text=""; - }; - }; - }; - class RscTurretDial { idd=-1; @@ -56,7 +27,7 @@ class RscTitles }; }; }; - + class RscProtractor { idd=-1; diff --git a/addons/advanced_ballistics/XEH_preInit.sqf b/addons/advanced_ballistics/XEH_preInit.sqf index db535e2a42..e4be391d23 100644 --- a/addons/advanced_ballistics/XEH_preInit.sqf +++ b/addons/advanced_ballistics/XEH_preInit.sqf @@ -11,7 +11,6 @@ PREP(calculateRoughnessLength); PREP(calculateStabilityFactor); PREP(calculateWindSpeed); PREP(displayProtractor); -PREP(displayWindInfo); PREP(handleFired); PREP(handleFiredExtension); PREP(initializeTerrainExtension); diff --git a/addons/advanced_ballistics/config.cpp b/addons/advanced_ballistics/config.cpp index 2188920e51..526eb4ef1a 100644 --- a/addons/advanced_ballistics/config.cpp +++ b/addons/advanced_ballistics/config.cpp @@ -12,14 +12,6 @@ class CfgPatches { }; }; -class CfgAddons { - class PreloadAddons { - class ADDON { - list[] = {QUOTE(ADDON)}; - }; - }; -}; - #include "CfgEventHandlers.hpp" #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" diff --git a/addons/advanced_ballistics/initKeybinds.sqf b/addons/advanced_ballistics/initKeybinds.sqf index 642a99d626..5649fb943e 100644 --- a/addons/advanced_ballistics/initKeybinds.sqf +++ b/addons/advanced_ballistics/initKeybinds.sqf @@ -1,20 +1,8 @@ -["ACE3", QGVAR(WindInfoKey), localize "STR_ACE_AdvancedBallistics_WindInfoKey", -{ - // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; - - // Statement - [] call FUNC(displayWindInfo); - false -}, -{false}, -[37, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (SHIFT + K) - ["ACE3", QGVAR(ProtractorKey), localize "STR_ACE_AdvancedBallistics_ProtractorKey", { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; - + // Statement [] call FUNC(displayProtractor); false diff --git a/addons/weather/RscTitles.hpp b/addons/weather/RscTitles.hpp new file mode 100644 index 0000000000..aedebdabfc --- /dev/null +++ b/addons/weather/RscTitles.hpp @@ -0,0 +1,31 @@ +class RscTitles +{ + class RscWindIntuitive + { + idd=-1; + onLoad="with uiNameSpace do { RscWindIntuitive = _this select 0 };"; + movingEnable=0; + duration=60; + fadeIn="false"; + fadeOut="false"; + class controls + { + class RscWindIntuitive + { + idc=132948; + type=0; + style=48; + font="TahomaB"; + colorBackground[]={0,0,0,0}; + colorText[]={0,0,0,0}; + x="SafeZoneX + 0.001"; + y="SafeZoneY + 0.001"; + w=0.2; + h=0.2*4/3; + size=0.034; + sizeEx=0.027; + text=""; + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index cdd2541f5b..2fb25d08e4 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -11,6 +11,18 @@ }; }; +["ACE3", QGVAR(WindInfoKey), localize "STR_ACE_Weather_WindInfoKey", +{ + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + + // Statement + [] call FUNC(displayWindInfo); + false +}, +{false}, +[37, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (SHIFT + K) + // Update Wind simulWeatherSync; _fnc_updateWind = { diff --git a/addons/weather/XEH_preInit.sqf b/addons/weather/XEH_preInit.sqf index f542c522f3..2751e77226 100644 --- a/addons/weather/XEH_preInit.sqf +++ b/addons/weather/XEH_preInit.sqf @@ -4,10 +4,10 @@ ADDON = false; LOG(MSG_INIT); -PREP(serverController); +PREP(displayWindInfo); PREP(getMapData); PREP(getWind); - +PREP(serverController); // Rain variables diff --git a/addons/weather/config.cpp b/addons/weather/config.cpp index 3f2bb4e15a..13e5a0cab2 100644 --- a/addons/weather/config.cpp +++ b/addons/weather/config.cpp @@ -6,11 +6,11 @@ class CfgPatches { weapons[] = {};// "ACE_Kestrel4500" }; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"q1184", "Rocko", "esteldunedain"}; + author[] = {"q1184", "Rocko", "esteldunedain","Ruthberg"}; VERSION_CONFIG; }; }; #include "CfgEventhandlers.hpp" - #include "CfgWorlds.hpp" +#include "RscTitles.hpp" diff --git a/addons/advanced_ballistics/functions/fnc_displayWindInfo.sqf b/addons/weather/functions/fnc_displayWindInfo.sqf similarity index 100% rename from addons/advanced_ballistics/functions/fnc_displayWindInfo.sqf rename to addons/weather/functions/fnc_displayWindInfo.sqf diff --git a/addons/weather/stringtable.xml b/addons/weather/stringtable.xml new file mode 100644 index 0000000000..cd0a3e8445 --- /dev/null +++ b/addons/weather/stringtable.xml @@ -0,0 +1,8 @@ + + + + + Show Wind Info + + +