mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Demo: Tweaked the Child demos, added a menu bar to the second child to test some navigation functions.
This commit is contained in:
parent
e6c0b212e8
commit
38d45ee73f
@ -1056,7 +1056,6 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
||||
static bool disable_mouse_wheel = false;
|
||||
ImGui::Checkbox("Disable Mouse Wheel", &disable_mouse_wheel);
|
||||
|
||||
ImGui::Text("Without border");
|
||||
static int line = 50;
|
||||
bool goto_line = ImGui::Button("Goto");
|
||||
ImGui::SameLine();
|
||||
@ -1083,8 +1082,16 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
||||
// Child 2: rounded border
|
||||
{
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 5.0f);
|
||||
ImGui::BeginChild("Child2", ImVec2(0,300), true, (disable_mouse_wheel ? ImGuiWindowFlags_NoScrollWithMouse : 0));
|
||||
ImGui::Text("With border");
|
||||
ImGui::BeginChild("Child2", ImVec2(0,300), true, (disable_mouse_wheel ? ImGuiWindowFlags_NoScrollWithMouse : 0) | ImGuiWindowFlags_MenuBar);
|
||||
if (ImGui::BeginMenuBar())
|
||||
{
|
||||
if (ImGui::BeginMenu("Menu"))
|
||||
{
|
||||
ShowExampleMenuFile();
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
ImGui::EndMenuBar();
|
||||
}
|
||||
ImGui::Columns(2);
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user