Perfect window now :D
This commit is contained in:
parent
a65439a383
commit
941a8e98dc
17
src/gui.cpp
17
src/gui.cpp
@ -24,16 +24,25 @@ gui::Gui::~Gui() noexcept {
|
|||||||
|
|
||||||
void gui::Gui::render_gui() {
|
void gui::Gui::render_gui() {
|
||||||
if (initialized) {
|
if (initialized) {
|
||||||
|
constexpr ImGuiWindowFlags flags = ImGuiWindowFlags_NoMove |
|
||||||
|
ImGuiWindowFlags_NoResize |
|
||||||
|
ImGuiWindowFlags_NoCollapse |
|
||||||
|
ImGuiWindowFlags_NoTitleBar;
|
||||||
|
|
||||||
ImGui_ImplOpenGL3_NewFrame();
|
ImGui_ImplOpenGL3_NewFrame();
|
||||||
ImGui_ImplGlfw_NewFrame();
|
ImGui_ImplGlfw_NewFrame();
|
||||||
ImGui::NewFrame();
|
ImGui::NewFrame();
|
||||||
|
|
||||||
//TODO GUI
|
//TODO GUI
|
||||||
if (!ImGui::Begin("Billy")) {
|
{
|
||||||
ImGui::End();
|
const ImGuiViewport &viewport = *ImGui::GetMainViewport();
|
||||||
ImGui::Render();
|
ImGui::SetNextWindowPos(viewport.Pos);
|
||||||
return;
|
ImGui::SetNextWindowSize(viewport.Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Never collapsed.
|
||||||
|
ImGui::Begin("Billy", nullptr, flags);
|
||||||
|
|
||||||
ImGui::Text("Hello world!");
|
ImGui::Text("Hello world!");
|
||||||
ImGui::Text("Average framerate: %.3f ms/frame (%.1f FPS)", 1000.f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
|
ImGui::Text("Average framerate: %.3f ms/frame (%.1f FPS)", 1000.f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user