Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch - NEW WATCH ALERT, ONLY $2499.99!!! #623

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions addons/watch/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,18 @@ class CfgWeapons {
displayName = CSTRING(KatminDisplayName);
picture = QPATHTOF(UI\watch_katmin.paa);
};
class KAT_Cavmin: ItemWatch {
ACE_hideItemType = "Watch";
author = "Mazinski";
descriptionShort = CSTRING(CavminDescription);
displayName = CSTRING(CavminDisplayName);
picture = QPATHTOF(UI\watch_cavmin.paa);
};
class KAT_STS: ItemWatch {
ACE_hideItemType = "Watch";
author = "Mazinski";
descriptionShort = CSTRING(STSDescription);
displayName = CSTRING(STSDisplayName);
picture = QPATHTOF(UI\watch_sts.paa);
};
};
210 changes: 210 additions & 0 deletions addons/watch/RscTitles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,214 @@ class RscTitles
};
};
};
class KAT_Cavmin
{
idd = 20935;
enableSimulation = 1;
movingEnable = 0;
fadeIn=0;
fadeOut=1;
duration = 10e10;
onLoad = "uiNamespace setVariable ['KAT_Cavmin', _this select 0];";
class controls
{
class CavminImage: RscPicture
{
idc = 20800;
text = "\x\kat\addons\watch\UI\watch_cavmin.paa";
x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(15));
y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(18.5));
w = QUOTE(FRAME_W(25));
h = QUOTE(FRAME_H(25));
};
class CavminCompass: CavminImage
{
idc = 20802;
text = "\x\kat\addons\watch\UI\watch_cavmin_compass.paa";
};
class CavminOverlay: CavminImage
{
idc = 20803;
text = "\x\kat\addons\watch\UI\watch_cavmin_face.paa";
};
class CavminTime: RscText
{
idc = 20804;
style = ST_CENTER;
shadow = 0;
font = "EtelkaMonospacePro";
text = "12:00"; //--- ToDo: Localize;
x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(6.2));
y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(5.7));
w = QUOTE(FRAME_W(7.5));
h = QUOTE(FRAME_H(4));
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
sizeEx = QUOTE(FRAME_H(3));
};
class CavminHR: RscText
{
idc = 20805;
style = ST_CENTER;
valign = "middle";
shadow = 0;
font = "EtelkaMonospaceProBold";
text = "80"; //--- ToDo: Localize;
x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(7.2));
y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(9.1));
w = QUOTE(FRAME_W(2.5));
h = QUOTE(FRAME_H(1.5));
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
sizeEx = QUOTE(FRAME_H(2));
};
class CavminAltitude: RscText
{
idc = 20806;
style = ST_CENTER;
valign = "middle";
shadow = 0;
font = "EtelkaMonospaceProBold";
text = "1000";
x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(0.3));
y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(9.1));
w = QUOTE(FRAME_W(2.5));
h = QUOTE(FRAME_H(1.5));
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
sizeEx = QUOTE(FRAME_H(2));
};
class CavminBearing: RscText
{
idc = 20807;
style = ST_CENTER;
valign = "middle";
shadow = 0;
font = "EtelkaMonospaceProBold";
text = "1000";
x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(6.2));
y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(8.8));
w = QUOTE(FRAME_W(7.5));
h = QUOTE(FRAME_H(4));
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
sizeEx = QUOTE(FRAME_H(2.5));
};
};
};
class KAT_sts
{
idd = 21935;
enableSimulation = 1;
movingEnable = 0;
fadeIn=0;
fadeOut=1;
duration = 10e10;
onLoad = "uiNamespace setVariable ['KAT_STS', _this select 0];";
class controls
{
class STSImage: RscPicture
{
idc = 21800;
text = "\x\kat\addons\watch\UI\watch_sts.paa";
x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(15));
y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(18.5));
w = QUOTE(FRAME_W(25));
h = QUOTE(FRAME_H(25));
};
class StsBigAlt: STSImage
{
idc = 21802;
text = "\x\kat\addons\watch\UI\watch_sts_bigAlt.paa";
x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(15));
y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(20.65));
w = QUOTE(FRAME_W(25));
h = QUOTE(FRAME_H(25));
};
class StsSmallAlt: StsBigAlt
{
idc = 21803;
text = "\x\kat\addons\watch\UI\watch_sts_smallAlt.paa";
};
class STSTime: RscText
{
idc = 21804;
style = ST_CENTER;
shadow = 0;
font = "PuristaSemibold";
text = "12:00"; //--- ToDo: Localize;
x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(6.2));
y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(3.6));
w = QUOTE(FRAME_W(7.5));
h = QUOTE(FRAME_H(4));
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,0.9};
sizeEx = QUOTE(FRAME_H(2.5));
};
class STSHR: RscText
{
idc = 21805;
style = ST_CENTER;
valign = "middle";
shadow = 0;
font = "PuristaMedium";
text = "80"; //--- ToDo: Localize;
x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(8.2));
y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(6));
w = QUOTE(FRAME_W(2.5));
h = QUOTE(FRAME_H(1.5));
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,0.9};
sizeEx = QUOTE(FRAME_H(2));
};
class STSO2: RscText
{
idc = 21806;
style = ST_CENTER;
valign = "middle";
shadow = 0;
font = "PuristaMedium";
text = "1000";
x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(-0.6));
y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(6));
w = QUOTE(FRAME_W(2.5));
h = QUOTE(FRAME_H(1.5));
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,0.9};
sizeEx = QUOTE(FRAME_H(2));
};
class STSAltitude: RscText
{
idc = 21807;
style = ST_CENTER;
valign = "middle";
shadow = 0;
font = "PuristaSemibold";
text = "1000";
x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(6.3));
y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(13.4));
w = QUOTE(FRAME_W(7.5));
h = QUOTE(FRAME_H(4));
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,0.9};
sizeEx = QUOTE(FRAME_H(2.2));
};
class STSDescent: RscText
{
idc = 21808;
style = ST_CENTER;
valign = "middle";
shadow = 0;
font = "PuristaSemibold";
text = "0";
x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(1));
y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(11.1));
w = QUOTE(FRAME_W(2.5));
h = QUOTE(FRAME_H(1.7));
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,0.9};
sizeEx = QUOTE(FRAME_H(1));
};
};
};
};
Binary file added addons/watch/UI/watch_cavmin.paa
Binary file not shown.
Binary file added addons/watch/UI/watch_cavmin_compass.paa
Binary file not shown.
Binary file added addons/watch/UI/watch_cavmin_face.paa
Binary file not shown.
Binary file added addons/watch/UI/watch_sts.paa
Binary file not shown.
Binary file added addons/watch/UI/watch_sts_bigAlt.paa
Binary file not shown.
Binary file added addons/watch/UI/watch_sts_smallAlt.paa
Binary file not shown.
6 changes: 5 additions & 1 deletion addons/watch/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
PREP(hideKWatch);
PREP(showKWatch);
PREP(hideCWatch);
PREP(hideSWatch);
PREP(showKWatch);
PREP(showCWatch);
PREP(showSWatch);
26 changes: 26 additions & 0 deletions addons/watch/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,29 @@ if (!hasInterface) exitWith {};

true
}, { false }, [24, [false, false, false]], false] call CBA_fnc_addKeybind;

["KAT Cav Watch", QGVAR(showCavmin), "Show Cavmin", {
// Conditions: canInteract
if (!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call ACEFUNC(common,canInteractWith)) || {!('KAT_Cavmin' in assignedItems ACE_player)}) exitWith { false };

if !(GETMVAR(GVAR(CavminActive),false)) then {
[ACE_player] call FUNC(showCWatch);
} else {
call FUNC(hideCWatch);
};

true
}, { false }, [24, [false, false, false]], false] call CBA_fnc_addKeybind;

["KAT STS Watch", QGVAR(showSTS), "Show STS", {
// Conditions: canInteract
if (!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call ACEFUNC(common,canInteractWith)) || {!('KAT_STS' in assignedItems ACE_player)}) exitWith { false };

if !(GETMVAR(GVAR(STSActive),false)) then {
[ACE_player] call FUNC(showSWatch);
} else {
call FUNC(hideSWatch);
};

true
}, { false }, [24, [false, false, false]], false] call CBA_fnc_addKeybind;
4 changes: 3 additions & 1 deletion addons/watch/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ class CfgPatches {
requiredVersion = REQUIRED_VERSION;
units[] = { };
weapons[] = {
"KAT_Katmin"
"KAT_Katmin",
"KAT_Cavmin",
"KAT_STS"
};
magazines[] = { };
requiredAddons[] = {
Expand Down
19 changes: 19 additions & 0 deletions addons/watch/functions/fnc_hideCWatch.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "..\script_component.hpp"
/*
* Author: Garth 'L-H' de Wet
* Modified: Mazinski
* Removes the KWatch from the screen.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call kat_watch_fnc_hideKWatch
*
* Public: No
*/
GVAR(CavminActive) = false;
"KAT_Cavmin" cutText ["","PLAIN",0,true];
19 changes: 19 additions & 0 deletions addons/watch/functions/fnc_hideSWatch.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "..\script_component.hpp"
/*
* Author: Garth 'L-H' de Wet
* Modified: Mazinski
* Removes the KWatch from the screen.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call kat_watch_fnc_hideKWatch
*
* Public: No
*/
GVAR(STSActive) = false;
"KAT_STS" cutText ["","PLAIN",0,true];
Loading
Loading