Example #1
0
 public int this[ImGuiKey key] {
     get {
         return(_nativePtr->KeyMap[(int)key]);
     }
     set {
         _nativePtr->KeyMap[(int)key] = value;
     }
 }
Example #2
0
 public static int GetKeyIndex(ImGuiKey key)
 {
     return(ImGuiNative.igGetKeyIndex(key));
 }
Example #3
0
 public static int GetKeyIndex(ImGuiKey key)
 => ImGuiNative.igGetKeyIndex(key);
Example #4
0
        public static Keys ToOpenTKKey(ImGuiKey key)
        {
            switch (key)
            {
            case ImGuiKey.Tab:
                return(Keys.Tab);

            case ImGuiKey.LeftArrow:
                return(Keys.Left);

            case ImGuiKey.RightArrow:
                return(Keys.Right);

            case ImGuiKey.UpArrow:
                return(Keys.Up);

            case ImGuiKey.DownArrow:
                return(Keys.Down);

            case ImGuiKey.PageUp:
                return(Keys.PageUp);

            case ImGuiKey.PageDown:
                return(Keys.PageDown);

            case ImGuiKey.Home:
                return(Keys.Home);

            case ImGuiKey.End:
                return(Keys.End);

            case ImGuiKey.Insert:
                return(Keys.Insert);

            case ImGuiKey.Delete:
                return(Keys.Delete);

            case ImGuiKey.Backspace:
                return(Keys.Backspace);

            case ImGuiKey.Space:
                return(Keys.Space);

            case ImGuiKey.Enter:
                return(Keys.Enter);

            case ImGuiKey.Escape:
                return(Keys.Escape);

            case ImGuiKey.A:
                return(Keys.A);

            case ImGuiKey.C:
                return(Keys.C);

            case ImGuiKey.V:
                return(Keys.V);

            case ImGuiKey.X:
                return(Keys.X);

            case ImGuiKey.Y:
                return(Keys.Y);

            case ImGuiKey.Z:
                return(Keys.Z);

            case ImGuiKey.KeyPadEnter:
                return(Keys.KeyPadEnter);

            default:
                throw new ArgumentOutOfRangeException(nameof(key), key, null);
            }
        }
Example #5
0
 public abstract int igGetKeyIndex(ImGuiKey imgui_key);
Example #6
0
 public static extern bool PIsKeyDown(ImGuiKey key);
Example #7
0
 public static extern bool IsKeyPressed(ImGuiKey key);