mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-24 07:40:22 +01:00
Added ImGuiKey_PageUp, ImGuiKey_PageDown for user.
This commit is contained in:
parent
6826ab3ffd
commit
2f03511062
@ -409,6 +409,8 @@ bool ImGui_ImplDX11_Init(void* hwnd, ID3D11Device* device, ID3D11DeviceContex
|
|||||||
io.KeyMap[ImGuiKey_RightArrow] = VK_RIGHT;
|
io.KeyMap[ImGuiKey_RightArrow] = VK_RIGHT;
|
||||||
io.KeyMap[ImGuiKey_UpArrow] = VK_UP;
|
io.KeyMap[ImGuiKey_UpArrow] = VK_UP;
|
||||||
io.KeyMap[ImGuiKey_DownArrow] = VK_DOWN;
|
io.KeyMap[ImGuiKey_DownArrow] = VK_DOWN;
|
||||||
|
io.KeyMap[ImGuiKey_PageUp] = VK_PRIOR;
|
||||||
|
io.KeyMap[ImGuiKey_PageDown] = VK_NEXT;
|
||||||
io.KeyMap[ImGuiKey_Home] = VK_HOME;
|
io.KeyMap[ImGuiKey_Home] = VK_HOME;
|
||||||
io.KeyMap[ImGuiKey_End] = VK_END;
|
io.KeyMap[ImGuiKey_End] = VK_END;
|
||||||
io.KeyMap[ImGuiKey_Delete] = VK_DELETE;
|
io.KeyMap[ImGuiKey_Delete] = VK_DELETE;
|
||||||
|
@ -169,6 +169,8 @@ bool ImGui_ImplDX9_Init(void* hwnd, IDirect3DDevice9* device)
|
|||||||
io.KeyMap[ImGuiKey_RightArrow] = VK_RIGHT;
|
io.KeyMap[ImGuiKey_RightArrow] = VK_RIGHT;
|
||||||
io.KeyMap[ImGuiKey_UpArrow] = VK_UP;
|
io.KeyMap[ImGuiKey_UpArrow] = VK_UP;
|
||||||
io.KeyMap[ImGuiKey_DownArrow] = VK_DOWN;
|
io.KeyMap[ImGuiKey_DownArrow] = VK_DOWN;
|
||||||
|
io.KeyMap[ImGuiKey_PageUp] = VK_PRIOR;
|
||||||
|
io.KeyMap[ImGuiKey_PageDown] = VK_NEXT;
|
||||||
io.KeyMap[ImGuiKey_Home] = VK_HOME;
|
io.KeyMap[ImGuiKey_Home] = VK_HOME;
|
||||||
io.KeyMap[ImGuiKey_End] = VK_END;
|
io.KeyMap[ImGuiKey_End] = VK_END;
|
||||||
io.KeyMap[ImGuiKey_Delete] = VK_DELETE;
|
io.KeyMap[ImGuiKey_Delete] = VK_DELETE;
|
||||||
|
@ -257,6 +257,8 @@ bool ImGui_ImplGlfwGL3_Init(GLFWwindow* window, bool install_callbacks)
|
|||||||
io.KeyMap[ImGuiKey_RightArrow] = GLFW_KEY_RIGHT;
|
io.KeyMap[ImGuiKey_RightArrow] = GLFW_KEY_RIGHT;
|
||||||
io.KeyMap[ImGuiKey_UpArrow] = GLFW_KEY_UP;
|
io.KeyMap[ImGuiKey_UpArrow] = GLFW_KEY_UP;
|
||||||
io.KeyMap[ImGuiKey_DownArrow] = GLFW_KEY_DOWN;
|
io.KeyMap[ImGuiKey_DownArrow] = GLFW_KEY_DOWN;
|
||||||
|
io.KeyMap[ImGuiKey_PageUp] = GLFW_KEY_PAGE_UP;
|
||||||
|
io.KeyMap[ImGuiKey_PageDown] = GLFW_KEY_PAGE_DOWN;
|
||||||
io.KeyMap[ImGuiKey_Home] = GLFW_KEY_HOME;
|
io.KeyMap[ImGuiKey_Home] = GLFW_KEY_HOME;
|
||||||
io.KeyMap[ImGuiKey_End] = GLFW_KEY_END;
|
io.KeyMap[ImGuiKey_End] = GLFW_KEY_END;
|
||||||
io.KeyMap[ImGuiKey_Delete] = GLFW_KEY_DELETE;
|
io.KeyMap[ImGuiKey_Delete] = GLFW_KEY_DELETE;
|
||||||
|
@ -183,6 +183,8 @@ bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks)
|
|||||||
io.KeyMap[ImGuiKey_RightArrow] = GLFW_KEY_RIGHT;
|
io.KeyMap[ImGuiKey_RightArrow] = GLFW_KEY_RIGHT;
|
||||||
io.KeyMap[ImGuiKey_UpArrow] = GLFW_KEY_UP;
|
io.KeyMap[ImGuiKey_UpArrow] = GLFW_KEY_UP;
|
||||||
io.KeyMap[ImGuiKey_DownArrow] = GLFW_KEY_DOWN;
|
io.KeyMap[ImGuiKey_DownArrow] = GLFW_KEY_DOWN;
|
||||||
|
io.KeyMap[ImGuiKey_PageUp] = GLFW_KEY_PAGE_UP;
|
||||||
|
io.KeyMap[ImGuiKey_PageDown] = GLFW_KEY_PAGE_DOWN;
|
||||||
io.KeyMap[ImGuiKey_Home] = GLFW_KEY_HOME;
|
io.KeyMap[ImGuiKey_Home] = GLFW_KEY_HOME;
|
||||||
io.KeyMap[ImGuiKey_End] = GLFW_KEY_END;
|
io.KeyMap[ImGuiKey_End] = GLFW_KEY_END;
|
||||||
io.KeyMap[ImGuiKey_Delete] = GLFW_KEY_DELETE;
|
io.KeyMap[ImGuiKey_Delete] = GLFW_KEY_DELETE;
|
||||||
|
36
imgui.h
36
imgui.h
@ -473,23 +473,25 @@ enum ImGuiSelectableFlags_
|
|||||||
// User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array
|
// User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array
|
||||||
enum ImGuiKey_
|
enum ImGuiKey_
|
||||||
{
|
{
|
||||||
ImGuiKey_Tab,
|
ImGuiKey_Tab, // for tabbing through fields
|
||||||
ImGuiKey_LeftArrow,
|
ImGuiKey_LeftArrow, // for text edit
|
||||||
ImGuiKey_RightArrow,
|
ImGuiKey_RightArrow,// for text edit
|
||||||
ImGuiKey_UpArrow,
|
ImGuiKey_UpArrow, // for text edit
|
||||||
ImGuiKey_DownArrow,
|
ImGuiKey_DownArrow, // for text edit
|
||||||
ImGuiKey_Home,
|
ImGuiKey_PageUp,
|
||||||
ImGuiKey_End,
|
ImGuiKey_PageDown,
|
||||||
ImGuiKey_Delete,
|
ImGuiKey_Home, // for text edit
|
||||||
ImGuiKey_Backspace,
|
ImGuiKey_End, // for text edit
|
||||||
ImGuiKey_Enter,
|
ImGuiKey_Delete, // for text edit
|
||||||
ImGuiKey_Escape,
|
ImGuiKey_Backspace, // for text edit
|
||||||
ImGuiKey_A, // for CTRL+A: select all
|
ImGuiKey_Enter, // for text edit
|
||||||
ImGuiKey_C, // for CTRL+C: copy
|
ImGuiKey_Escape, // for text edit
|
||||||
ImGuiKey_V, // for CTRL+V: paste
|
ImGuiKey_A, // for text edit CTRL+A: select all
|
||||||
ImGuiKey_X, // for CTRL+X: cut
|
ImGuiKey_C, // for text edit CTRL+C: copy
|
||||||
ImGuiKey_Y, // for CTRL+Y: redo
|
ImGuiKey_V, // for text edit CTRL+V: paste
|
||||||
ImGuiKey_Z, // for CTRL+Z: undo
|
ImGuiKey_X, // for text edit CTRL+X: cut
|
||||||
|
ImGuiKey_Y, // for text edit CTRL+Y: redo
|
||||||
|
ImGuiKey_Z, // for text edit CTRL+Z: undo
|
||||||
ImGuiKey_COUNT
|
ImGuiKey_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user