ampersand38 344 Posted July 24, 2018 OBSOLETE: use https://community.bistudio.com/wiki/Arma_3:_Main_Menu#Spotlight Mod the Arma 3 main menu center spotlight button to join a specific server with 1 click. Based on KK's work. See it in action. GitHub Main components: config.cpp class CfgPatches { class amp_spotlight { units[] = {}; weapons[] = {}; requiredVersion = 0.6; requiredAddons[] = {}; version = 2.0; versionStr = 2.0; versionAr[] = {2, 0}; author = "Ampersand"; }; }; class RscStandardDisplay; class RscDisplayMain: RscStandardDisplay { class Spotlight { class AwesomeServer { text = "[ OFFICIAL ] Arma 3 Zeus by Bohemia Interactive (EU) #15"; // Text displayed on the square button, converted to upper-case textIsQuote = 0; // 1 to add quotation marks around the text picture = "\amp_spotlight\button.paa"; // Square picture, ideally 512x512 //video = "\a3\Ui_f\Video\spotlight_1_Apex.ogv"; // Video played on mouse hover //action = "0 = [_this, 'your.domain.here', '2302', 'yourpasshere'] execVM '\amp_spotlight\joinServer.sqf';"; action = "0 = [_this, '85.190.155.165', '2302', ''] execVM '\amp_spotlight\joinServer.sqf';"; actionText = "Join server: [ OFFICIAL ] Arma 3 Zeus by Bohemia Interactive (EU) #15"; // Text displayed in top left corner of on-hover white frame condition = "true"; // Condition for showing the spotlight }; }; }; joinServer.sqf #include "\A3\Ui_f\hpp\defineResincl.inc" params [ ["_buttons", []], ["_IP", "127.0.0.1"], ["_PORT", "2302"], ["_PASS", ""], ["_TIMEOUT", 30] ]; ctrlactivate ((ctrlparent (_buttons # 0)) displayctrl 105); /* 1 _IP 2 _PORT 3 _PASS 4 IDC_CANCEL 5 IDD_MISSION 6 IDD_DEBRIEFING 7 IDD_MP_SETUP 8 IDD_MULTIPLAYER 9 IDC_MULTI_TAB_DIRECT_CONNECT 10 IDD_IP_ADDRESS 11 IDC_IP_ADDRESS 12 IDC_IP_PORT 13 IDC_MULTI_SESSIONS 14 IDC_OK 15 IDC_MULTI_JOIN 16 IDD_PASSWORD 17 IDC_PASSWORD 18 diag_tickTime + _TIMEOUT */ onEachFrame format [ " onEachFrame { ctrlActivate (findDisplay %8 displayCtrl %9); onEachFrame { private _ctrlServerAddress = findDisplay %10 displayCtrl 2300; _ctrlServerAddress controlsGroupCtrl %11 ctrlSetText ""%1""; _ctrlServerAddress controlsGroupCtrl %12 ctrlSetText ""%2""; ctrlActivate (_ctrlServerAddress controlsGroupCtrl %14); onEachFrame { ((findDisplay %8 displayCtrl %13) lbData 0) call { if (diag_tickTime > %18) then { diag_log ""RCTS Timeout (no server)""; onEachFrame {}; }; if !(_this isEqualTo '') then { findDisplay %8 displayCtrl %13 lbSetCurSel 0; onEachFrame { ctrlActivate (findDisplay %8 displayCtrl %15); onEachFrame { if (diag_tickTime > %18) then { diag_log ""RCTS Timeout (cannot join)""; onEachFrame {}; }; if (!isNull findDisplay %16) then { private _ctrlPassword = findDisplay %16 displayCtrl %17; _ctrlPassword ctrlSetTextColor [0,0,0,0]; _ctrlPassword ctrlSetText ""%3""; ctrlActivate (findDisplay %16 displayCtrl %14); }; if (getClientStateNumber >= 3) then { diag_log ""RCTS Success""; onEachFrame {}; }; }; }; }; }; }; }; }; ", _IP, _PORT, _PASS, IDC_CANCEL, IDD_MISSION, IDD_DEBRIEFING, IDD_MP_SETUP, IDD_MULTIPLAYER, IDC_MULTI_TAB_DIRECT_CONNECT, IDD_IP_ADDRESS, IDC_IP_ADDRESS, IDC_IP_PORT, IDC_MULTI_SESSIONS, IDC_OK, IDC_MULTI_JOIN, IDD_PASSWORD, IDC_PASSWORD, diag_tickTime + _TIMEOUT]; 3 4 Share this post Link to post Share on other sites
Flinty 454 Posted July 25, 2018 Pretty cool actually, never would have thought about something like this. Nice one mate! Share this post Link to post Share on other sites
beaar 78 Posted July 25, 2018 That's awesome! Shame it's not a native feature :P Share this post Link to post Share on other sites
ampersand38 344 Posted July 27, 2018 Small edit to allow connecting to domain names instead of ip. 1 Share this post Link to post Share on other sites
dystopian1 23 Posted August 11, 2018 Button fails if there are cached lines in servers listbox. This can happen if you have working LAN server and last MP page was LAN. To fix it double onEachFrame after JOIN button pressing, it will skip 1 frame and clear cached servers: ctrlActivate (_ctrlServerAddress controlsGroupCtrl %14); onEachFrame { onEachFrame { ((findDisplay %8 displayCtrl %13) lbData 0) call Also actionText = "$STR_disp_multi_join" is most suitable localized string for config. 1 1 Share this post Link to post Share on other sites
ampersand38 344 Posted January 30, 2023 @Diaverso Carrasco I think you mean to reply here instead of in . BIKI says left and right are hard coded.https://community.bistudio.com/wiki/Arma_3:_Main_Menu#Spotlight Share this post Link to post Share on other sites
Diaverso Carrasco 1 Posted January 30, 2023 @ampersand38 Look at other mods that I remember seeing seen. the mod is this: https://steamcommunity.com/sharedfiles/filedetails/?id=2606775107&searchtext=poplife In the image, you see that it has changed the 3 icons, But it has so many pbo, that I get lost trying to find anything related. Share this post Link to post Share on other sites
ampersand38 344 Posted January 30, 2023 @Diaverso Carrasco I haven't looked into left and right panels myself, so unable to give advice on that. FYI for server join, this mod's method is obsolete. Use this instead: action = "connectToServer ['127.0.0.1', 2302, '']"; Share this post Link to post Share on other sites