Files
sbox-public/engine/Definitions/engine/inputsystem.def
Matt Stevens fc22506058 InputRouter uses scan codes for non-ui input, glyphs translate to local key names (#4429)
* 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
2026-03-31 15:41:12 +01:00

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();
}