diff --git a/addons/optionsmenu/gui/aceMenuIcon_ca.paa b/addons/optionsmenu/gui/aceMenuIcon_ca.paa new file mode 100644 index 0000000000..0e3c1853e2 Binary files /dev/null and b/addons/optionsmenu/gui/aceMenuIcon_ca.paa differ diff --git a/addons/optionsmenu/gui/define.hpp b/addons/optionsmenu/gui/define.hpp index c2b1faf9cf..9620bdd7e6 100644 --- a/addons/optionsmenu/gui/define.hpp +++ b/addons/optionsmenu/gui/define.hpp @@ -12,6 +12,11 @@ class RscHTML; class RscText; +class RscControlsGroupNoHScrollbars; +class RscPicture; +class RscButtonMenu; + + #ifndef ACE_DEFINE_H #define ACE_DEFINE_H diff --git a/addons/optionsmenu/gui/pauseMenu.hpp b/addons/optionsmenu/gui/pauseMenu.hpp index 34f368df4a..e3a283d2c7 100644 --- a/addons/optionsmenu/gui/pauseMenu.hpp +++ b/addons/optionsmenu/gui/pauseMenu.hpp @@ -108,62 +108,90 @@ class RscDisplayMain: RscStandardDisplay { idc = 80085; }; - class ACE_news: RscControlsGroupNoScrollbars { - idc = 80086; - x = "safezoneX + safezoneW - (16 *(((safezoneW / safezoneH) min 1.2) / 40))"; - y = "safezoneY + (18.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))"; - w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "4.95 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - class controls { - class ACE_NewsTitle: RscText { - text = CSTRING(aceNews); - colorBackground[] = {(162/255),(28/255),(28/255),0.8}; - idc = -1; - x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)"; - y = "0 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "15 *(((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - }; - class ACE_VersionInfo: RscText { - idc = 68; - x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)"; - y = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - colorBackground[] = {0,0,0,0.5}; - }; - class ACE_NewsBackground: RscText { - idc = -1; - x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)"; - y = "2.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "5.75 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - colorBackground[] = {0,0,0,0.5}; - }; - class ACE_NewsText: RscHTML { - idc = 69; - x = "0.5 * (((safezoneW / safezoneH) min 1.2) / 40)"; - y = "2.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "14 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "2.75 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + class ACE_news_apex: RscControlsGroupNoHScrollbars { + idc = 80090; + x = "safezoneX + safezoneW - 10 * (pixelW * pixelGrid * 2) - (4 * pixelH)"; + y = "safezoneY + safezoneH - (3 * 2 + 1) * (pixelH * pixelGrid * 2) - 3 * (4 * pixelH)"; + w = "10 * (pixelW * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 2)"; + class Controls { + class Background: RscPicture { + idc = 80091; + text = "\a3\Ui_f\data\GUI\Rsc\RscDisplayMain\gradientMods_ca.paa"; + colorText[] = {0,0,0,0.75}; + x = "(10 - 4 * 2) * (pixelW * pixelGrid * 2)"; + y = 0; + w = "4 * 2 * (pixelW * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 2)"; + angle = 180; + }; + class BackgroundIcon: RscPicture { + idc = 80092; + text = "\a3\Ui_f\data\GUI\Rsc\RscDisplayMain\backgroundModsIcon_ca.paa"; + colorText[] = {0,0,0,0.75}; + x = "(10 - 2 * 2) * (pixelW * pixelGrid * 2)"; + y = 0; + w = "2 * 2 * (pixelW * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 2)"; + angle = 180; + }; + class Icon: RscPicture { + idc = 80093; + text = QPATHTOF(gui\aceMenuIcon_ca.paa); + colorText[] = {1,1,1,0.5}; + x = "(10 - 2) * (pixelW * pixelGrid * 2)"; + y = 0; + w = "2 * (pixelW * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 2)"; + }; + class CurrentVersionInfo: RscText { + idc = 80094; + style = 1; + text = ""; + sizeEx = "(pixelH * pixelGrid * 1.5)"; + font = "RobotoCondensedLight"; + shadow = 1; + colorBackground[] = {0,0,0,0}; + x = 0; + y = 0; + w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 1)"; + onLoad = "(_this select 0) ctrlenable false;"; + }; + class HTTPVersionInfo: RscHTML { + idc = 80095; shadow = 0; class H1 { - font = "RobotoCondensed"; + sizeEx = "(pixelH * pixelGrid * 1.5)"; + font = "RobotoCondensedLight"; fontBold = "RobotoCondensedLight"; - sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)"; + align = "right"; }; class H2: H1 { - sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; - font = "RobotoCondensedLight"; + sizeEx = "(pixelH * pixelGrid * 1.5)"; }; class P: H1 { - sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - fontBold = "RobotoCondensedLight"; + sizeEx = "(pixelH * pixelGrid * 1.5)"; }; - colorBold[] = {0.6,0.6,0.6,1}; - colorLink[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])",1}; - colorLinkActive[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])",1}; + x = 0; + y = "2 * (pixelH * pixelGrid * 1)"; + w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 1)"; + onLoad = "(_this select 0) ctrlenable false;"; + }; + class Button: RscButtonMenu { + idc = 80096; + colorBackground[] = {0,0,0,0}; + colorBackgroundFocused[] = {0,0,0,0}; + colorBackground2[] = {0,0,0,0}; + x = 0; + y = 0; + w = "10 * (pixelW * pixelGrid * 2)"; + h = "2 * (pixelH * pixelGrid * 2)"; + + tooltip = "Download latest and report issues:"; + url = "https://github.com/acemod/ACE3"; }; }; }; diff --git a/addons/optionsmenu/init_loadMainMenuBox.sqf b/addons/optionsmenu/init_loadMainMenuBox.sqf index 9c556e5128..a9b8f5a02a 100644 --- a/addons/optionsmenu/init_loadMainMenuBox.sqf +++ b/addons/optionsmenu/init_loadMainMenuBox.sqf @@ -15,17 +15,18 @@ */ #include "script_component.hpp" -if (missionNamespace getVariable [QGVAR(newsLoaded), false]) exitWith {}; -GVAR(newsLoaded) = true; - //Need to load from profileNamespace because ace_settings might not be init if world = empty if (profileNamespace getVariable [QGVAR(showNewsOnMainMenu), true]) then { - ((_this select 0) displayCtrl 80086) ctrlShow true; + ((_this select 0) displayCtrl 80090) ctrlShow true; - private ["_version"]; - _version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr"); - ((_this select 0) displayCtrl 68) ctrlSetText format ["Installed Version: %1", _version]; - ((_this select 0) displayCtrl 69) htmlLoad "http://ace3mod.com/version.html"; + private _ace3VersionStr = (getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr")) select [0,5]; + ((_this select 0) displayCtrl 80094) ctrlSetText format ["Version: %1", _ace3VersionStr]; + ((_this select 0) displayCtrl 80095) htmlLoad "http://ace3mod.com/version.html"; } else { - ((_this select 0) displayCtrl 80086) ctrlShow false; + ((_this select 0) displayCtrl 80090) ctrlShow false; }; + +/* +Note: switch version.html to simpler format and right align +

Latest: {{site.ace.version.major}}.{{site.ace.version.minor}}.{{site.ace.version.patch}}

+*/