diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /vguimatsurface/Cursor.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'vguimatsurface/Cursor.h')
| -rw-r--r-- | vguimatsurface/Cursor.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/vguimatsurface/Cursor.h b/vguimatsurface/Cursor.h new file mode 100644 index 0000000..10166df --- /dev/null +++ b/vguimatsurface/Cursor.h @@ -0,0 +1,75 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Methods associated with the cursor +// +// $Revision: $ +// $NoKeywords: $ +//=============================================================================// + +#ifndef MATSURFACE_CURSOR_H +#define MATSURFACE_CURSOR_H + +#ifdef _WIN32 +#pragma once +#endif + +#include "VGuiMatSurface/IMatSystemSurface.h" +#include <vgui/Cursor.h> + +//----------------------------------------------------------------------------- +// Initializes cursors +//----------------------------------------------------------------------------- +void InitCursors(); + + +//----------------------------------------------------------------------------- +// Selects a cursor +//----------------------------------------------------------------------------- +void CursorSelect(vgui::HCursor hCursor); + + +//----------------------------------------------------------------------------- +// Activates the current cursor +//----------------------------------------------------------------------------- +void ActivateCurrentCursor(); + + +//----------------------------------------------------------------------------- +// Handles software cursors +//----------------------------------------------------------------------------- +void EnableSoftwareCursor( bool bEnable ); +bool ShouldDrawSoftwareCursor(); +int GetSoftwareCursorTexture( float *px, float *py ); + +//----------------------------------------------------------------------------- +// handles mouse movement +//----------------------------------------------------------------------------- +void CursorSetPos(void *hwnd, int x, int y); +void CursorGetPos(void *hwnd, int &x, int &y); + + +//----------------------------------------------------------------------------- +// Purpose: prevents vgui from changing the cursor +//----------------------------------------------------------------------------- +void LockCursor( bool bEnable ); + + +//----------------------------------------------------------------------------- +// Purpose: unlocks the cursor state +//----------------------------------------------------------------------------- +bool IsCursorLocked(); + +//----------------------------------------------------------------------------- +// Purpose: loads a custom cursor file from the file system +//----------------------------------------------------------------------------- +vgui::HCursor Cursor_CreateCursorFromFile( char const *curOrAniFile, char const *pPathID ); + +// Helper for shutting down cursors +void Cursor_ClearUserCursors(); + +#endif // MATSURFACE_CURSOR_H + + + + + |