mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +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(); //}}}
|
videoEndDrawing(); //}}}
|
||||||
|
|
||||||
// Draw the ImGui menu on top of the game content, but below the console (if open.)
|
// Draw the ImGui menu on top of the game content, but below the console (if open.)
|
||||||
if (GUICapture & 2)
|
if (GUICapture & 6)
|
||||||
{
|
{
|
||||||
ImGui::Render();
|
ImGui::Render();
|
||||||
GLInterface.DrawImGui(ImGui::GetDrawData());
|
GLInterface.DrawImGui(ImGui::GetDrawData());
|
||||||
|
GUICapture &= ~4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the console plus debug output on top of everything else.
|
// Draw the console plus debug output on top of everything else.
|
||||||
|
|
|
@ -7069,8 +7069,13 @@ void M_DisplayMenus(void)
|
||||||
if (GUICapture & 2)
|
if (GUICapture & 2)
|
||||||
{
|
{
|
||||||
ImGui_Begin_Frame();
|
ImGui_Begin_Frame();
|
||||||
bool b;
|
bool b = true;
|
||||||
ImGui::ShowDemoWindow(&b);
|
ImGui::ShowDemoWindow(&b);
|
||||||
|
if (!b)
|
||||||
|
{
|
||||||
|
GUICapture &= ~2;
|
||||||
|
GUICapture |= 4;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "textures.h"
|
#include "textures.h"
|
||||||
#include "palette.h"
|
#include "palette.h"
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
|
#include "gamecontrol.h"
|
||||||
#include "imgui_impl_sdl.h"
|
#include "imgui_impl_sdl.h"
|
||||||
#include "imgui_impl_opengl3.h"
|
#include "imgui_impl_opengl3.h"
|
||||||
#include "baselayer.h"
|
#include "baselayer.h"
|
||||||
|
@ -101,7 +102,11 @@ void GLInstance::Init(int ydim)
|
||||||
ImGui::StyleColorsDark();
|
ImGui::StyleColorsDark();
|
||||||
ImGui_Init_Backend();
|
ImGui_Init_Backend();
|
||||||
ImGui_ImplOpenGL3_Init();
|
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));
|
if (ttf.Size()) io.Fonts->AddFontFromMemoryTTF(ttf.Data(), ttf.Size(), std::clamp(ydim / 40, 10, 30));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue