Medical - Hide cursor when unconscious (#8269)

* Hide cursor when blocking inputs

* Update addons/common/DisableMouseDialog.hpp

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Update addons/common/functions/fnc_disableUserInput.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Update addons/common/DisableMouseDialog.hpp

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
BaerMitUmlaut 2021-06-27 22:39:17 +02:00 committed by GitHub
parent 2ea0106550
commit 9291d9b714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 37 deletions

View File

@ -0,0 +1,10 @@
class CfgWrapperUI {
class Cursors {
class Arrow;
class GVAR(blank): Arrow {
// This texture has a single 99% transparent pixel and is otherwise blank
// The single pixel is necessary, otherwise appears as a black 32 px square
texture = QPATHTOF(data\blank_cursor_ca.paa);
};
};
};

View File

@ -0,0 +1,18 @@
class ctrlMapEmpty;
class GVAR(DisableMouse_Dialog) {
idd = -1;
movingEnable = 0;
onLoad = QUOTE(with uiNameSpace do { GVAR(dlgDisableMouse) = _this # 0; };);
objects[] = {};
class controlsBackground {
// Transparent map allows setting custom cursor
class Background: ctrlMapEmpty {
idc = 101;
fade = 1;
x = "safezoneXAbs";
y = "safezoneY";
w = "safezoneWAbs";
h = "safezoneH";
};
};
};

View File

@ -49,29 +49,3 @@ class GVAR(ProgressBar_Dialog) {
}; };
}; };
}; };
class GVAR(DisableMouse_Dialog) {
idd = -1;
movingEnable = 0;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgDisableMouse)),_this select 0)];);
objects[] = {};
class controlsBackground {
class Background {
idc = -1;
moving = 0;
font = "TahomaB";
text = "";
sizeEx = 0;
lineSpacing = 0;
type = 0;
style = 0;
size = 1;
colorBackground[] = {0, 0, 0, 0};//0.5
colorText[] = {0, 0, 0, 0};
x = "safezoneX";
y = "safezoneY";
w = "safezoneW";
h = "safezoneH";
};
};
};

View File

@ -14,18 +14,17 @@ class CfgPatches {
}; };
}; };
#include "CfgEventHandlers.hpp"
#include "CfgLocationTypes.hpp"
#include "CfgSounds.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgMagazines.hpp"
#include "CfgMoves.hpp"
#include "CfgVoice.hpp"
#include "CfgUnitInsignia.hpp"
#include "CfgEden.hpp" #include "CfgEden.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgLocationTypes.hpp"
#include "CfgMagazines.hpp"
#include "CfgMoves.hpp"
#include "CfgSounds.hpp"
#include "CfgUnitInsignia.hpp"
#include "CfgVehicles.hpp"
#include "CfgVoice.hpp"
#include "CfgWeapons.hpp"
#include "CfgWrapperUI.hpp"
class ACE_Rsc_Display_Base { class ACE_Rsc_Display_Base {
idd = -1; idd = -1;
@ -62,6 +61,7 @@ class ACE_Rsc_Control_Base {
#include "ACE_Settings.hpp" #include "ACE_Settings.hpp"
#include "define.hpp" #include "define.hpp"
#include "ProgressScreen.hpp" #include "ProgressScreen.hpp"
#include "DisableMouseDialog.hpp"
#include "HintConfig.hpp" #include "HintConfig.hpp"
#include "RscInfoType.hpp" #include "RscInfoType.hpp"
#include "CompassControl.hpp" #include "CompassControl.hpp"

Binary file not shown.

View File

@ -41,6 +41,10 @@ if (_state) then {
private _display = uiNamespace getVariable QGVAR(dlgDisableMouse); private _display = uiNamespace getVariable QGVAR(dlgDisableMouse);
// Hide cursor by using custom transparent cursor
private _map = _display displayCtrl 101;
_map ctrlMapCursor ["", QGVAR(blank)];
_display displayAddEventHandler ["KeyDown", { _display displayAddEventHandler ["KeyDown", {
params ["", "_key"]; params ["", "_key"];