示例#1
0
 public int this[ImGuiKey key] {
     get {
         return(_nativePtr->KeyMap[(int)key]);
     }
     set {
         _nativePtr->KeyMap[(int)key] = value;
     }
 }
示例#2
0
 public static int GetKeyIndex(ImGuiKey key)
 {
     return(ImGuiNative.igGetKeyIndex(key));
 }
示例#3
0
文件: ImGui.cs 项目: se5a/ImGuiCS
 public static int GetKeyIndex(ImGuiKey key)
 => ImGuiNative.igGetKeyIndex(key);
示例#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);
            }
        }
示例#5
0
 public abstract int igGetKeyIndex(ImGuiKey imgui_key);
示例#6
0
 public static extern bool PIsKeyDown(ImGuiKey key);
示例#7
0
 public static extern bool IsKeyPressed(ImGuiKey key);