public static IImGuiPlatform Create(Type type, CursorShapesAsset cursors, IniSettingsAsset iniSettings)
        {
            switch (type)
            {
            case Type.InputManager: return(new ImGuiPlatformInputManager(cursors, iniSettings));

#if HAS_INPUTSYSTEM
            case Type.InputSystem: return(new ImGuiPlatformInputSystem(cursors, iniSettings));
#endif
            default:
                Debug.LogError($"[DearImGui] {type} platform not available.");
                return(null);
            }
        }
 public ImGuiPlatformInputManager(CursorShapesAsset cursorShapes, IniSettingsAsset iniSettings)
 {
     _cursorShapes = cursorShapes;
     _iniSettings  = iniSettings;
 }
Beispiel #3
0
 public ImGuiPlatformInputManager(CursorShapesAsset cursorShapes, IniSettingsAsset iniSettings)
 {
     _cursorShapes = cursorShapes;
     _iniSettings  = iniSettings;
     _callbacks.ImeSetInputScreenPos = (x, y) => Input.compositionCursorPos = new Vector2(x, y);
 }
Beispiel #4
0
 public ImGuiPlatformInputSystem(CursorShapesAsset cursorShapes, IniSettingsAsset iniSettings)
 {
     _cursorShapes = cursorShapes;
     _iniSettings  = iniSettings;
     _callbacks.ImeSetInputScreenPos = (x, y) => _keyboard.SetIMECursorPosition(new Vector2(x, y));
 }