[feat] use self designed title bar instead of system default title bar

This commit is contained in:
dijunkun
2024-07-31 17:43:02 +08:00
parent 5b6bdee25a
commit 7b42923418
12 changed files with 205 additions and 50 deletions

View File

@@ -5,7 +5,7 @@ int Render::StatusBar() {
ImGui::PushStyleColor(ImGuiCol_MenuBarBg, ImVec4(0, 0, 0, 1));
static bool a, b, c, d, e;
ImGui::SetNextWindowPos(
ImVec2(0, main_window_height_ - status_bar_height_ - 1),
ImVec2(0, main_window_height_default_ - status_bar_height_ - 1),
ImGuiCond_Always);
ImGui::BeginChild(
@@ -15,17 +15,17 @@ int Render::StatusBar() {
ImDrawList* draw_list = ImGui::GetWindowDrawList();
draw_list->AddCircleFilled(
ImVec2(15, main_window_height_ - status_bar_height_ + 9.0f), 5,
ImVec2(15, main_window_height_default_ - status_bar_height_ + 9.0f), 5,
ImColor(signal_connected_ ? 0.0f : 1.0f, signal_connected_ ? 1.0f : 0.0f,
0.0f),
100);
draw_list->AddCircle(
ImVec2(15, main_window_height_ - status_bar_height_ + 10.0f), 6,
ImVec2(15, main_window_height_default_ - status_bar_height_ + 10.0f), 6,
ImColor(1.0f, 1.0f, 1.0f), 100);
ImGui::SetWindowFontScale(0.5f);
draw_list->AddText(
ImVec2(25, main_window_height_ - status_bar_height_ + 3.0f),
ImVec2(25, main_window_height_default_ - status_bar_height_ + 3.0f),
ImColor(0.0f, 0.0f, 0.0f),
signal_connected_
? localization::signal_connected[localization_language_index_].c_str()