mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
- make the ImGui popup close on request.
This commit is contained in:
parent
fd4680c347
commit
0f74a5c3a4
3 changed files with 14 additions and 3 deletions
|
@ -10233,10 +10233,11 @@ void videoNextPage(void)
|
|||
videoEndDrawing(); //}}}
|
||||
|
||||
// Draw the ImGui menu on top of the game content, but below the console (if open.)
|
||||
if (GUICapture & 2)
|
||||
if (GUICapture & 6)
|
||||
{
|
||||
ImGui::Render();
|
||||
GLInterface.DrawImGui(ImGui::GetDrawData());
|
||||
GUICapture &= ~4;
|
||||
}
|
||||
|
||||
// Draw the console plus debug output on top of everything else.
|
||||
|
|
|
@ -7069,8 +7069,13 @@ void M_DisplayMenus(void)
|
|||
if (GUICapture & 2)
|
||||
{
|
||||
ImGui_Begin_Frame();
|
||||
bool b;
|
||||
bool b = true;
|
||||
ImGui::ShowDemoWindow(&b);
|
||||
if (!b)
|
||||
{
|
||||
GUICapture &= ~2;
|
||||
GUICapture |= 4;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "textures.h"
|
||||
#include "palette.h"
|
||||
#include "imgui.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "imgui_impl_sdl.h"
|
||||
#include "imgui_impl_opengl3.h"
|
||||
#include "baselayer.h"
|
||||
|
@ -101,7 +102,11 @@ void GLInstance::Init(int ydim)
|
|||
ImGui::StyleColorsDark();
|
||||
ImGui_Init_Backend();
|
||||
ImGui_ImplOpenGL3_Init();
|
||||
if (!ttf.Size()) ttf = kloadfile("demolition/Roboto-Regular.ttf", 0);
|
||||
if (!ttf.Size())
|
||||
{
|
||||
//ttf = kloadfile("demolition/Capsmall_clean.ttf", 0);
|
||||
ttf = kloadfile("demolition/Roboto-Regular.ttf", 0);
|
||||
}
|
||||
if (ttf.Size()) io.Fonts->AddFontFromMemoryTTF(ttf.Data(), ttf.Size(), std::clamp(ydim / 40, 10, 30));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue