mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
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:
parent
2ea0106550
commit
9291d9b714
10
addons/common/CfgWrapperUI.hpp
Normal file
10
addons/common/CfgWrapperUI.hpp
Normal 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);
|
||||
};
|
||||
};
|
||||
};
|
18
addons/common/DisableMouseDialog.hpp
Normal file
18
addons/common/DisableMouseDialog.hpp
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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 "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 {
|
||||
idd = -1;
|
||||
@ -62,6 +61,7 @@ class ACE_Rsc_Control_Base {
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "define.hpp"
|
||||
#include "ProgressScreen.hpp"
|
||||
#include "DisableMouseDialog.hpp"
|
||||
#include "HintConfig.hpp"
|
||||
#include "RscInfoType.hpp"
|
||||
#include "CompassControl.hpp"
|
||||
|
BIN
addons/common/data/blank_cursor_ca.paa
Normal file
BIN
addons/common/data/blank_cursor_ca.paa
Normal file
Binary file not shown.
@ -41,6 +41,10 @@ if (_state) then {
|
||||
|
||||
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", {
|
||||
params ["", "_key"];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user