Nav: Examples: DirectX11, Glfw+GL3: Basic code to map keyboard inputs when io.NavFlags & ImGuiNavFlags_EnableKeyboard is set. (will iterate/tweak before spreading to other examples). (#787)

This commit is contained in:
omar
2018-01-25 15:48:30 +01:00
parent 5f7f27c8de
commit 3967ff58b2
4 changed files with 46 additions and 2 deletions

View File

@ -125,7 +125,9 @@ int main(int, char**)
UpdateWindow(hwnd);
// Setup ImGui binding
ImGuiIO& io = ImGui::GetIO(); (void)io;
ImGui_ImplDX11_Init(hwnd, g_pd3dDevice, g_pd3dDeviceContext);
//io.NavFlags |= ImGuiNavFlags_EnableKeyboard;
// Setup style
ImGui::StyleColorsClassic();
@ -138,7 +140,6 @@ int main(int, char**)
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - Read 'extra_fonts/README.txt' for more instructions and details.
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
//ImGuiIO& io = ImGui::GetIO();
//io.Fonts->AddFontDefault();
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Roboto-Medium.ttf", 16.0f);
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Cousine-Regular.ttf", 15.0f);