Fix stream render with menu bar

This commit is contained in:
dijunkun
2024-06-26 14:58:15 +08:00
parent be78496992
commit 8076e7f662
16 changed files with 1175 additions and 1154 deletions

View File

@@ -0,0 +1,31 @@
#include "render.h"
int Render::MenuWindow() {
ImGui::PushStyleColor(ImGuiCol_MenuBarBg, ImVec4(0, 0, 0, 0));
static bool a, b, c, d, e;
ImGui::SetNextWindowPos(ImVec2(0, 0), ImGuiCond_Always);
ImGui::BeginChild("MenuWindow",
ImVec2(main_window_width_, menu_window_height_),
ImGuiChildFlags_Border, ImGuiWindowFlags_NoScrollbar);
if (ImGui::BeginMenuBar()) {
if (ImGui::BeginMenu("Menu")) {
ImGui::SetWindowFontScale(0.5f);
ImGui::MenuItem("Auto-resizing window", NULL, &a);
ImGui::MenuItem("Constrained-resizing window", NULL, &b);
ImGui::MenuItem("Fullscreen window", NULL, &c);
ImGui::MenuItem("Long text display", NULL, &d);
ImGui::MenuItem("Manipulating window titles", NULL, &e);
ImGui::SetWindowFontScale(1.0f);
ImGui::EndMenu();
}
ImGui::EndMenuBar();
}
SettingWindow();
ImGui::SetWindowFontScale(1.0f);
ImGui::PopStyleColor();
ImGui::EndChild();
return 0;
}