mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-08-03 17:23:40 -04:00
* InputRouter uses scan codes (make AZERTY not shit), UI related input remains key codes * Input.GetGlyph and Input.GetButtonOrigin return the local key name e.g if forward is bound to "W" it will show as "Z" on azerty layouts
39 lines
1.2 KiB
Modula-2
39 lines
1.2 KiB
Modula-2
|
|
include "inputsystem/iinputsystem.h"
|
|
|
|
native enum InputStandardCursor_t;
|
|
|
|
native accessor g_pInputSystem as NativeEngine.InputSystem
|
|
{
|
|
void RegisterWindowWithSDL( CastTo[OsSpecificWindowHandle_t] IntPtr hwnd );
|
|
void UnregisterWindowFromSDL( CastTo[OsSpecificWindowHandle_t] IntPtr hwnd );
|
|
void SetEditorMainWindow( CastTo[OsSpecificWindowHandle_t] IntPtr hwnd );
|
|
void OnEditorGameFocusChange( CastTo[OsSpecificWindowHandle_t] IntPtr hwnd, bool bIsFocused );
|
|
|
|
public void SetCursorPosition( int x, int y, CastTo[PlatWindow_t] IntPtr window );
|
|
|
|
bool HasMouseFocus();
|
|
bool IsAppActive();
|
|
|
|
bool IsIMEAllowed();
|
|
void SetIMEAllowed( bool bAllowed );
|
|
void SetIMETextLocation( int x, int y, int nWidth, int nHeight );
|
|
void DismissIME();
|
|
|
|
string CodeToString( ButtonCode code );
|
|
string GetKeyDisplayName( ButtonCode code );
|
|
ButtonCode StringToButtonCode( string pString );
|
|
|
|
ButtonCode VirtualKeyToButtonCode( int nVirtualKey );
|
|
int ButtonCodeToVirtualKey( ButtonCode code );
|
|
|
|
void SetRelativeMouseMode( bool bState );
|
|
bool GetRelativeMouseMode();
|
|
|
|
void SetCursorStandard( InputStandardCursor_t cursor );
|
|
void SetCursorUser( string pName );
|
|
|
|
bool LoadCursorFromFile( string pFileName, string pName, int nHotX, int nHotY );
|
|
void ShutdownUserCursors();
|
|
}
|