fix style

This commit is contained in:
2025-05-05 21:04:23 +03:00
parent 2bb16c9929
commit 69ad52660d
3 changed files with 31 additions and 2 deletions

View File

@@ -19,12 +19,33 @@ namespace example
void ui_layer::render() void ui_layer::render()
{ {
VE_PUSH_FONT(REGULAR, 20);
if (ImGui::BeginMainMenuBar())
{
if (ImGui::BeginMenu("File"))
{
if (ImGui::MenuItem("New")) {}
if (ImGui::MenuItem("Open", "Ctrl+O")) {}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Edit"))
{
if (ImGui::MenuItem("Undo", "CTRL+Z")) {}
if (ImGui::MenuItem("Redo", "CTRL+Y", false, false)) {} // Disabled item
ImGui::Separator();
if (ImGui::MenuItem("Cut", "CTRL+X")) {}
if (ImGui::MenuItem("Copy", "CTRL+C")) {}
if (ImGui::MenuItem("Paste", "CTRL+V")) {}
ImGui::EndMenu();
}
ImGui::EndMainMenuBar();
}
ImGui::SetNextWindowPos(m_pos); ImGui::SetNextWindowPos(m_pos);
ImGui::SetNextWindowSize(m_size); ImGui::SetNextWindowSize(m_size);
if (!ImGui::Begin(VE_NAME("Test signal"), nullptr, m_win_flags)) ImGui::End(); if (!ImGui::Begin(VE_NAME("Test signal"), nullptr, m_win_flags)) ImGui::End();
VE_PUSH_FONT(REGULAR, 20);
if (ImGui::Button("Test signal", ImVec2(128, 130))) if (ImGui::Button("Test signal", ImVec2(128, 130)))
EMIT(test_event::TEST_EVEN, std::string("test event message"), 1, "test event log msg"); EMIT(test_event::TEST_EVEN, std::string("test event message"), 1, "test event log msg");
VE_POP_FONT(); VE_POP_FONT();

View File

@@ -19,7 +19,7 @@ namespace example
void ui_layer_double::render() void ui_layer_double::render()
{ {
ImGui::SetNextWindowPos(ImVec2{ 10.f, 10.f }); ImGui::SetNextWindowPos(ImVec2{ 100.f, 800.f });
ImGui::SetNextWindowSize(m_size); ImGui::SetNextWindowSize(m_size);
if (!ImGui::Begin(VE_NAME("Test signal_double"), nullptr, m_win_flags)) ImGui::End(); if (!ImGui::Begin(VE_NAME("Test signal_double"), nullptr, m_win_flags)) ImGui::End();
@@ -32,6 +32,10 @@ namespace example
if (ImGui::Button("Test on_attach", ImVec2(128, 130))) on_attach(); if (ImGui::Button("Test on_attach", ImVec2(128, 130))) on_attach();
VE_POP_FONT(); VE_POP_FONT();
VE_PUSH_FONT(ICON, 12);
ImGui::Button(VE::style::icon::ICON_ALIGN_RIGHT, ImVec2{20, 20});
VE_POP_FONT();
ImGui::End(); ImGui::End();
} }

View File

@@ -50,7 +50,11 @@ namespace VE::style
st.Colors[ImGuiCol_FrameBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); st.Colors[ImGuiCol_FrameBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
st.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); st.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f);
st.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); st.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f);
// st.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
// st.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
st.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); st.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
st.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); st.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
st.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f); st.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
st.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f); st.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.13f, 0.12f, 0.15f, 1.00f);