mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-04 07:01:04 +01:00 
			
		
		
		
	Examples: Enabled Docking + Nav by default in the branch. (#351)
This commit is contained in:
		@@ -26,7 +26,9 @@ int main(int, char**)
 | 
			
		||||
    IMGUI_CHECKVERSION();
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;     // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    ImGui_ImplAllegro5_Init(display);
 | 
			
		||||
 | 
			
		||||
    // Setup style
 | 
			
		||||
 
 | 
			
		||||
@@ -241,7 +241,8 @@
 | 
			
		||||
    IMGUI_CHECKVERSION();
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;     // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    ImGui_ImplOSX_Init();
 | 
			
		||||
    ImGui_ImplOpenGL2_Init();
 | 
			
		||||
 
 | 
			
		||||
@@ -98,7 +98,8 @@ int main(int argc, char** argv)
 | 
			
		||||
    // Setup ImGui binding
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;     // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    ImGui_ImplFreeGLUT_Init();
 | 
			
		||||
    ImGui_ImplFreeGLUT_InstallFuncs();
 | 
			
		||||
 
 | 
			
		||||
@@ -33,8 +33,9 @@ int main(int, char**)
 | 
			
		||||
    IMGUI_CHECKVERSION();
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;   // Enable Gamepad Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;       // Enable Keyboard Controls
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;      // Enable Gamepad Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    ImGui_ImplGlfw_InitForOpenGL(window, true);
 | 
			
		||||
    ImGui_ImplOpenGL2_Init();
 | 
			
		||||
 
 | 
			
		||||
@@ -76,8 +76,9 @@ int main(int, char**)
 | 
			
		||||
    IMGUI_CHECKVERSION();
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;   // Enable Gamepad Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;       // Enable Keyboard Controls
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;      // Enable Gamepad Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    ImGui_ImplGlfw_InitForOpenGL(window, true);
 | 
			
		||||
    ImGui_ImplOpenGL3_Init(glsl_version);
 | 
			
		||||
 
 | 
			
		||||
@@ -347,8 +347,9 @@ int main(int, char**)
 | 
			
		||||
    IMGUI_CHECKVERSION();
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;   // Enable Gamepad Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;       // Enable Keyboard Controls
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;      // Enable Gamepad Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    // Setup GLFW binding
 | 
			
		||||
    ImGui_ImplGlfw_InitForVulkan(window, true);
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,9 @@ int main(int, char**)
 | 
			
		||||
    IMGUI_CHECKVERSION();
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;     // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    ImGui_Marmalade_Init(true);
 | 
			
		||||
 | 
			
		||||
    // Setup style
 | 
			
		||||
 
 | 
			
		||||
@@ -38,7 +38,8 @@ int main(int, char**)
 | 
			
		||||
    IMGUI_CHECKVERSION();
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;       // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    ImGui_ImplSDL2_InitForOpenGL(window, gl_context);
 | 
			
		||||
    ImGui_ImplOpenGL2_Init();
 | 
			
		||||
 
 | 
			
		||||
@@ -76,7 +76,8 @@ int main(int, char**)
 | 
			
		||||
    IMGUI_CHECKVERSION();
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;       // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    ImGui_ImplSDL2_InitForOpenGL(window, gl_context);
 | 
			
		||||
    ImGui_ImplOpenGL3_Init(glsl_version);
 | 
			
		||||
 
 | 
			
		||||
@@ -335,7 +335,8 @@ int main(int, char**)
 | 
			
		||||
    // Setup ImGui binding
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;       // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    // Setup SDL binding
 | 
			
		||||
    ImGui_ImplSDL2_InitForVulkan(window);
 | 
			
		||||
 
 | 
			
		||||
@@ -116,7 +116,8 @@ int main(int, char**)
 | 
			
		||||
    IMGUI_CHECKVERSION();
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;       // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    ImGui_ImplWin32_Init(hwnd);
 | 
			
		||||
    ImGui_ImplDX10_Init(g_pd3dDevice);
 | 
			
		||||
 
 | 
			
		||||
@@ -119,7 +119,8 @@ int main(int, char**)
 | 
			
		||||
    IMGUI_CHECKVERSION();
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;       // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    ImGui_ImplWin32_Init(hwnd);
 | 
			
		||||
    ImGui_ImplDX11_Init(g_pd3dDevice, g_pd3dDeviceContext);
 | 
			
		||||
 
 | 
			
		||||
@@ -290,7 +290,8 @@ int main(int, char**)
 | 
			
		||||
    IMGUI_CHECKVERSION();
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;       // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    ImGui_ImplWin32_Init(hwnd);
 | 
			
		||||
    ImGui_ImplDX12_Init(g_pd3dDevice, NUM_FRAMES_IN_FLIGHT, 
 | 
			
		||||
 
 | 
			
		||||
@@ -79,7 +79,9 @@ int main(int, char**)
 | 
			
		||||
    IMGUI_CHECKVERSION();
 | 
			
		||||
    ImGui::CreateContext();
 | 
			
		||||
    ImGuiIO& io = ImGui::GetIO(); (void)io;
 | 
			
		||||
    //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;       // Enable Keyboard Controls
 | 
			
		||||
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;           // Enable Docking
 | 
			
		||||
 | 
			
		||||
    ImGui_ImplWin32_Init(hwnd);
 | 
			
		||||
    ImGui_ImplDX9_Init(g_pd3dDevice);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user