Blamite Game Engine - blam!
00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
exit.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "../debug_ui.h"
4
5
#include "
components/resources/engine_text/engine_text.h
"
6
#include "
core.h
"
7
8
namespace
Blam::DebugUI::Windows
9
{
13
class
Exit
:
public
Blam::DebugUI::ImGUIDrawingGroup
14
{
15
public
:
19
void
Draw
()
20
{
21
//Exiting via the menu
22
if
(
show
)
23
{
24
ImGui::OpenPopup(
ENGINE_TEXT
(
"imgui_exit_confirm_title"
).c_str());
25
if
(ImGui::BeginPopupModal(
ENGINE_TEXT
(
"imgui_exit_confirm_title"
).c_str(), &
show
, ImGuiWindowFlags_AlwaysAutoResize))
26
{
27
ImGui::Text
(
ENGINE_TEXT
(
"imgui_exit_confirm_text"
).c_str());
28
ImGui::Separator();
29
30
if
(ImGui::Button(
ENGINE_TEXT
(
"yes"
).c_str(), ImVec2(120, 0)))
31
{
32
SDL_Event*
event
=
new
SDL_Event();
33
event
->type = SDL_QUIT;
34
SDL_PushEvent(event);
35
}
36
ImGui::SameLine();
37
38
if
(ImGui::Button(
ENGINE_TEXT
(
"no"
).c_str(), ImVec2(120, 0)))
39
{
40
ImGui::CloseCurrentPopup();
41
show
=
false
;
42
}
43
ImGui::EndPopup();
44
}
45
}
46
}
47
};
48
}
engine_text.h
Blam::DebugUI::ImGUIDrawingGroup::show
bool show
Controls whether or not the group should be shown. May not be used in all groups.
Definition:
debug_ui.h:362
Blam::DebugUI::ImGUIDrawingGroup
Class representing an ImGUI drawing group/draw list item.
Definition:
debug_ui.h:359
Blam::DebugUI::Windows::Exit
Class for the exit confirmation dialog.
Definition:
exit.hpp:13
Blam::DebugUI::Windows::Exit::Draw
void Draw()
Shows the exit confirmation prompt.
Definition:
exit.hpp:19
ENGINE_TEXT
#define ENGINE_TEXT(string_id)
Definition:
engine_text.h:7
core.h
Blam::DebugUI::Windows
Legacy namespace to contain data for the legacy ImGUI console.
Definition:
debug_ui.h:434
Text
@ Text
Master text object that wraps around both BitmapText and DWText.
Definition:
render_stack.h:73
blam
components
ui
imgui
imgui_windows
exit.hpp
Generated on Tue Jan 12 2021 01:11:27 for Blamite Game Engine - blam! by
1.8.17