mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Render main window first
This commit is contained in:
@@ -186,18 +186,15 @@ void UserInterface::NewFrame()
|
|||||||
ImGui_ImplGlfw_NewFrame();
|
ImGui_ImplGlfw_NewFrame();
|
||||||
ImGui::NewFrame();
|
ImGui::NewFrame();
|
||||||
|
|
||||||
|
// Main window
|
||||||
|
mainwindow.Render();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UserInterface::Render()
|
void UserInterface::Render()
|
||||||
{
|
{
|
||||||
ImVec2 geometry(static_cast<float>(Rendering::manager().Width()), static_cast<float>(Rendering::manager().Height()));
|
ImVec2 geometry(static_cast<float>(Rendering::manager().Width()), static_cast<float>(Rendering::manager().Height()));
|
||||||
|
|
||||||
// Main window
|
|
||||||
mainwindow.Render();
|
|
||||||
|
|
||||||
// warning modal dialog
|
|
||||||
Log::Render();
|
|
||||||
|
|
||||||
// file modal dialog
|
// file modal dialog
|
||||||
geometry.x *= 0.4f;
|
geometry.x *= 0.4f;
|
||||||
geometry.y *= 0.4f;
|
geometry.y *= 0.4f;
|
||||||
@@ -210,6 +207,9 @@ void UserInterface::Render()
|
|||||||
FileDialog::Instance()->CloseDialog(currentFileDialog.c_str());
|
FileDialog::Instance()->CloseDialog(currentFileDialog.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// warning modal dialog
|
||||||
|
Log::Render();
|
||||||
|
|
||||||
// Rendering
|
// Rendering
|
||||||
ImGui::Render();
|
ImGui::Render();
|
||||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||||
@@ -609,7 +609,7 @@ void MainWindow::Render()
|
|||||||
ImGui::SetNextWindowSize(ImVec2(300, 300), ImGuiCond_FirstUseEver);
|
ImGui::SetNextWindowSize(ImVec2(300, 300), ImGuiCond_FirstUseEver);
|
||||||
|
|
||||||
|
|
||||||
ImGui::Begin( ICON_FA_CIRCLE_NOTCH " v-mix", NULL, ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoCollapse);
|
ImGui::Begin(IMGUI_TITLE_MAINWINDOW, NULL, ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoCollapse);
|
||||||
|
|
||||||
// Menu Bar
|
// Menu Bar
|
||||||
if (ImGui::BeginMenuBar())
|
if (ImGui::BeginMenuBar())
|
||||||
@@ -661,12 +661,11 @@ void MainWindow::Render()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// content
|
// content
|
||||||
ImGuiToolkit::Icon(7, 1);
|
// ImGuiToolkit::Icon(7, 1);
|
||||||
ImGui::SameLine(0, 10);
|
// ImGui::SameLine(0, 10);
|
||||||
|
// ImGuiToolkit::PushFont(ImGuiToolkit::FONT_ITALIC);
|
||||||
ImGuiToolkit::PushFont(ImGuiToolkit::FONT_ITALIC);
|
// ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
|
||||||
ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
|
// ImGui::PopFont();
|
||||||
ImGui::PopFont();
|
|
||||||
|
|
||||||
if( ImGui::Button( ICON_FA_FOLDER_OPEN " Open File" ) && !loadThread.joinable())
|
if( ImGui::Button( ICON_FA_FOLDER_OPEN " Open File" ) && !loadThread.joinable())
|
||||||
{
|
{
|
||||||
@@ -773,7 +772,7 @@ void UserInterface::OpenTextEditor(std::string text)
|
|||||||
void MainWindow::drawTextEditor(bool* p_open)
|
void MainWindow::drawTextEditor(bool* p_open)
|
||||||
{
|
{
|
||||||
static bool show_statusbar = true;
|
static bool show_statusbar = true;
|
||||||
ImGui::Begin( ICON_FA_CODE " Shader Editor", p_open, ImGuiWindowFlags_HorizontalScrollbar | ImGuiWindowFlags_MenuBar);
|
ImGui::Begin(IMGUI_TITLE_SHADEREDITOR, p_open, ImGuiWindowFlags_HorizontalScrollbar | ImGuiWindowFlags_MenuBar);
|
||||||
ImGui::SetWindowSize(ImVec2(800, 600), ImGuiCond_FirstUseEver);
|
ImGui::SetWindowSize(ImVec2(800, 600), ImGuiCond_FirstUseEver);
|
||||||
if (ImGui::BeginMenuBar())
|
if (ImGui::BeginMenuBar())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -54,5 +54,9 @@
|
|||||||
#define COLOR_FRAME_MOVE 230, 30, 230
|
#define COLOR_FRAME_MOVE 230, 30, 230
|
||||||
#define COLOR_CURSOR 10, 100, 255
|
#define COLOR_CURSOR 10, 100, 255
|
||||||
|
|
||||||
|
#define IMGUI_TITLE_MAINWINDOW ICON_FA_CIRCLE_NOTCH " v-mix"
|
||||||
|
#define IMGUI_TITLE_MEDIAPLAYER ICON_FA_FILM " Media Player"
|
||||||
|
#define IMGUI_TITLE_SHADEREDITOR ICON_FA_CODE " Shader Editor"
|
||||||
|
|
||||||
|
|
||||||
#endif // VMIX_DEFINES_H
|
#endif // VMIX_DEFINES_H
|
||||||
|
|||||||
Reference in New Issue
Block a user