From 6b3aa3e0a2318a3b46911b519ad86821ca7fa380 Mon Sep 17 00:00:00 2001 From: JonBons Date: Tue, 24 Jan 2023 13:57:10 -0600 Subject: [PATCH] Common - Hide cursor during progress bar (#9128) * Common - Hide cursor during progress bar (w/ CBA setting) * Fix base class define * Removed CBA setting for disabling hiding of the cursor for the ACE progress bar Co-authored-by: PabstMirror --- addons/common/DisableMouseDialog.hpp | 1 - addons/common/ProgressScreen.hpp | 11 ++++++----- addons/common/config.cpp | 2 ++ addons/common/functions/fnc_progressBar.sqf | 5 +++++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/addons/common/DisableMouseDialog.hpp b/addons/common/DisableMouseDialog.hpp index c723ea759e..75689cf652 100644 --- a/addons/common/DisableMouseDialog.hpp +++ b/addons/common/DisableMouseDialog.hpp @@ -1,4 +1,3 @@ -class ctrlMapEmpty; class GVAR(DisableMouse_Dialog) { idd = -1; movingEnable = 0; diff --git a/addons/common/ProgressScreen.hpp b/addons/common/ProgressScreen.hpp index 6770ca598b..bef2994e7d 100644 --- a/addons/common/ProgressScreen.hpp +++ b/addons/common/ProgressScreen.hpp @@ -1,19 +1,20 @@ class GVAR(ProgressBar_Dialog) { idd = -1; movingEnable = 0; - onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBG)),(_this select 0) displayCtrl 1)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBar)),(_this select 0) displayCtrl 2)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBarTitle)),(_this select 0) displayCtrl 3)];); + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgProgress)),_this select 0)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBG)),(_this select 0) displayCtrl 1)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBar)),(_this select 0) displayCtrl 2)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBarTitle)),(_this select 0) displayCtrl 3)];); objects[] = {}; class controlsBackground { - class Background { - idc = -1; + class Background: ctrlMapEmpty { + idc = 101; moving = 0; + fade = 1; font = "TahomaB"; text = ""; sizeEx = 0; lineSpacing = 0; - type = 0; - style = 0; + style = 48; + type = 101; size = 1; colorBackground[] = {0, 0, 0, 0.0}; colorText[] = {0, 0, 0, 0}; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 0df756d034..758957987e 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -58,6 +58,8 @@ class ACE_Rsc_Control_Base { h = 0; }; +class ctrlMapEmpty; + #include "ACE_Settings.hpp" #include "define.hpp" #include "ProgressScreen.hpp" diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf index 6639b21948..a08f236886 100644 --- a/addons/common/functions/fnc_progressBar.sqf +++ b/addons/common/functions/fnc_progressBar.sqf @@ -30,6 +30,11 @@ private _player = ACE_player; closeDialog 0; createDialog QGVAR(ProgressBar_Dialog); +// Hide cursor by using custom transparent cursor +private _display = uiNamespace getVariable QGVAR(dlgProgress); +private _map = _display displayCtrl 101; +_map ctrlMapCursor ["", QGVAR(blank)]; + (uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetText _localizedTitle; //Adjust position based on user setting: