Skip to content
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
1 change: 1 addition & 0 deletions addons/common/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ PREP(addIntel);
PREP(callGlobalFnc);
PREP(callReinforcements);
PREP(crateFiller);
PREP(join);
PREP(doFlakFire);
PREP(noApiFunction);
PREP(parseCsv);
32 changes: 32 additions & 0 deletions addons/common/functions/fnc_join.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include "..\script_component.hpp"
/*
* Author: veteran29
* Join a server. Meant to be used from main menu.
* Based on article from KillZonekid
*
* Arguments:
* 0: Spotlight tile control that was clicked <CONTROL>
* 1: Server address <STRING>
* 2: Server port <NUMBER>
*
* Return Value:
* None
*
* Public: No
*/

params ["_button", "_server", ["_port", 2302]];

// if no world is loaded missionNamespace will be empty
// copy logging function from uiNamespace
if (isNil "CBA_fnc_log") then {
CBA_fnc_log = uiNamespace getVariable "CBA_fnc_log";
};
// Disable Enchanced Multiplayer Menu for compatiblity with this script
uiNamespace setVariable ["EMM_multiplayerMenu_enabled", false];

INFO_2("Auto joining to %1:%2",_server,_port);

connectToServer [_server, _port, "130"]; // 130 is the default password for the server

nil
22 changes: 9 additions & 13 deletions addons/spotlight_cup/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
class RscDisplayPassword {
ADDON = QUOTE(with uiNamespace do {\
[_this select 0] call COMPILE_SCRIPT(XEH_displayPassword);\
});
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};

class RscMsgBox {
ADDON = QUOTE(with uiNamespace do {\
[_this select 0] call COMPILE_SCRIPT(XEH_msgBox);\
});
};
59 changes: 3 additions & 56 deletions addons/spotlight_cup/CfgMainMenuSpotlight.hpp
Original file line number Diff line number Diff line change
@@ -1,64 +1,11 @@
class CfgMainMenuSpotlight { // RscDisplayMain >> Spotlight works but is considered obsolete since SPOTREP #00064
class spotlight_cup {
text = QUOTE(Tactical Training Team - CUP Server); // Text displayed on the square button, converted to upper-case
text = CSTRING(text); // Text displayed on the square button, converted to upper-case
textIsQuote = 0; // 1 to add quotation marks around the text
picture = QPATHTOEF(common,data\ttt_logo_co.paa); // Square picture, ideally 512x512
//video = "\a3\Ui_f\Video\spotlight_1_Apex.ogv"; // Video played on mouse hover
action = QUOTE(call (uiNamespace getVariable QQFUNC(joinServer))); // Code called upon clicking, passed arguments are [<button:Control>]
action = QUOTE(ARR_3([_this,'game.tacticalteam.de',2322]) call (uiNamespace getVariable QQEFUNC(common,join)));
actionText = CSTRING(joinHover); // Text displayed in top left corner of on-hover white frame
condition = "true"; // Condition for showing the spotlight
condition = QUOTE(true); // Condition for showing the spotlight
};

//deactivate all other menus
delete ApexProtocol;
delete BootCamp;
delete EastWind;

delete Orange_CampaignGerman;
delete Orange_Showcase_IDAP;
delete Orange_Showcase_LoW;
delete Orange_Campaign;

delete Showcase_TankDestroyers;

delete Tacops_Campaign_03;
delete Tacops_Campaign_02;
delete Tacops_Campaign_01;

delete Tanks_Campaign_01;

delete OldMan;

delete Contact_Campaign;

delete gm_campaign_01;

delete SP_FD14;

delete AoW_Showcase_AoW;
delete AoW_Showcase_Future;

delete Extraction_lxWS;
delete Showcase_Alchemist_lxWS;
delete Showcase_VR_lxWS;

delete vn_showcase_macv;
delete vn_showcase_macv_13;
delete vn_showcase_pavn;
delete vn_showcase_pavn_13;
delete vn_sogba;

delete SPE_Arsenal;
delete SPE_Campagin_OperationCobra_04;
delete SPE_Coop_Der_Zahnarzt;
delete SPE_Faction_Showcase_GER;
delete SPE_Faction_Showcase_US;
delete SPE_Coop_Attack_on_Mortain;
delete SPE_Coop_Battle_of_St_Barthelemy;
delete SPE_Coop_Panzerkampfwagen;
delete SPE_Coop_Prizefighter;

delete Scenario_TrainingDay_RF;
delete Scenario_FireSeason_RF;
delete Scenario_AirControl_RF;
};
1 change: 0 additions & 1 deletion addons/spotlight_cup/XEH_PREP.hpp

This file was deleted.

26 changes: 26 additions & 0 deletions addons/spotlight_cup/XEH_displayPassword.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include "script_component.hpp"
/*
* Author: veteran29
* Handles initialization of password display.
*
* Arguments:
* 0: Server password prompt display <DISPLAY>
*
* Return Value:
* None
*
* Public: No
*/

params ["_display"];

if !(uiNamespace getVariable [QGVAR(autoConfirm), true]) exitWith {INFO("Auto password confirm disabled")};

private _ctrlConfirm = _display displayCtrl IDC_OK;
private _ctrlPassword = _display displayCtrl IDC_PASSWORD;

if (ctrlText _ctrlPassword == "") exitWith {};

ctrlActivate _ctrlConfirm;

nil
22 changes: 22 additions & 0 deletions addons/spotlight_cup/XEH_msgBox.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include "script_component.hpp"
/*
* Author: veteran29
* Handle initialization of message box. Disables auto password confirm if wrong password was provided.
*
* Arguments:
* 0: RscMsgBox display [DISPLAY]
*
* Return Value:
* None
*
* Public: No
*/

params ["_display"];

private _ctrlText = _display displayCtrl IDC_MSGBOX_TEXT;
if (ctrlText _ctrlText != localize "STR_Msg_MP_Password") exitWith {};

INFO("Invalid server password, disabling auto confirm");

uiNamespace setVariable [QGVAR(autoConfirm), false];
1 change: 0 additions & 1 deletion addons/spotlight_cup/XEH_postInit.sqf

This file was deleted.

8 changes: 0 additions & 8 deletions addons/spotlight_cup/XEH_preInit.sqf

This file was deleted.

2 changes: 0 additions & 2 deletions addons/spotlight_cup/XEH_preStart.sqf

This file was deleted.

6 changes: 3 additions & 3 deletions addons/spotlight_cup/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ class CfgPatches {
// Meta information for editor
name = COMPONENT_NAME;
author = ECSTRING(main,TacticalTrainingTeam);
authors[] = {"Addi", "Andx"};
authors[] = {"Addi", "Andx", "veteran29"};
url = ECSTRING(main,URL);

// Minimum compatible version. When the game's version is lower, pop-up warning will appear when launching the game. Note: was disabled on purpose some time late into Arma 2: OA.
requiredVersion = REQUIRED_VERSION;
// Required addons, used for setting load order. (CfgPatches classname NOT PBO filename!)
// When any of the addons are missing, a pop-up warning will appear when launching the game.
requiredAddons[] = {"ttt_common","CUP_Creatures_People_LoadOrder"};
requiredAddons[] = {"cba_ui", "ttt_common","CUP_Creatures_People_LoadOrder"};
// List of objects (CfgVehicles classes) contained in the addon. Important also for Zeus content (units and groups) unlocking.
units[] = {};
// List of weapons (CfgWeapons classes) contained in the addon.
weapons[] = {};

// Optional. If this is 1, if any of requiredAddons[] entry is missing in your game the entire config will be ignored and return no error (but in rpt) so useful to make a compat Mod (Since Arma 3 2.14)
skipWhenMissingDependencies = 1;
VERSION_CONFIG;
Expand Down
101 changes: 0 additions & 101 deletions addons/spotlight_cup/functions/fnc_joinServer.sqf

This file was deleted.

1 change: 1 addition & 0 deletions addons/spotlight_cup/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Setzt eine Kachel im Hauptmenü von Arma um direkt auf dem CUP-Server zu verbind
## Referenzen

<https://community.bistudio.com/wiki/Arma_3:_Main_Menu#Spotlight>
<https://community.bistudio.com/wiki/connectToServer>

## Maintainer

Expand Down
5 changes: 5 additions & 0 deletions addons/spotlight_cup/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
#include "\z\ttt\addons\main\script_macros.hpp"

#include "\a3\ui_f\hpp\defineResincl.inc"

#define IDC_SERVERSTATUS_PASSWORD 1002
#define IDC_SERVERSTATUS_LOGIN 1003
#define IDC_SERVERSTATUS_MISSIONS 1004
#define IDC_MSGBOX_TEXT 101
4 changes: 4 additions & 0 deletions addons/spotlight_cup/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
<English>Join server: Tactical Training Team - CUP</English>
<German>Server beitreten: Tactical Training Team - CUP</German>
</Key>
<Key ID="STR_ttt_Spotlight_Cup_text">
<English>Tactical Training Team - CUP Server</English>
<German>Tactical Training Team - CUP Server</German>
</Key>
</Package>
</Project>
22 changes: 9 additions & 13 deletions addons/spotlight_event/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
class RscDisplayPassword {
ADDON = QUOTE(with uiNamespace do {\
[_this select 0] call COMPILE_SCRIPT(XEH_displayPassword);\
});
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};

class RscMsgBox {
ADDON = QUOTE(with uiNamespace do {\
[_this select 0] call COMPILE_SCRIPT(XEH_msgBox);\
});
};
Loading