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() {
|
||||
if (initialized) {
|
||||
constexpr ImGuiWindowFlags flags = ImGuiWindowFlags_NoMove |
|
||||
ImGuiWindowFlags_NoResize |
|
||||
ImGuiWindowFlags_NoCollapse |
|
||||
ImGuiWindowFlags_NoTitleBar;
|
||||
|
||||
ImGui_ImplOpenGL3_NewFrame();
|
||||
ImGui_ImplGlfw_NewFrame();
|
||||
ImGui::NewFrame();
|
||||
|
||||
//TODO GUI
|
||||
if (!ImGui::Begin("Billy")) {
|
||||
ImGui::End();
|
||||
ImGui::Render();
|
||||
return;
|
||||
{
|
||||
const ImGuiViewport &viewport = *ImGui::GetMainViewport();
|
||||
ImGui::SetNextWindowPos(viewport.Pos);
|
||||
ImGui::SetNextWindowSize(viewport.Size);
|
||||
}
|
||||
|
||||
// Never collapsed.
|
||||
ImGui::Begin("Billy", nullptr, flags);
|
||||
|
||||
ImGui::Text("Hello world!");
|
||||
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