Elaztek Developer Hub
Switch Project...
blam!
Editing Kit
Guerilla
Sapien
Tool
Foundry
Libraries
Keystone
Strings
Forums
Discord
Doxygen
Jenkins
Guides
Gitlab
Blamite Game Engine - blam!
00346.12.11.21.0529.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
}
SDL_Event
union SDL_Event SDL_Event
Definition:
imgui_impl_sdl.h:21
ImGui::EndPopup
IMGUI_API void EndPopup()
Definition:
imgui.cpp:7675
ImGui::BeginPopupModal
IMGUI_API bool BeginPopupModal(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
Definition:
imgui.cpp:7647
engine_text.h
ImGui::SameLine
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition:
imgui.cpp:7147
ImVec2
Definition:
imgui.h:179
ImGui::OpenPopup
IMGUI_API void OpenPopup(const char *str_id)
Definition:
imgui.cpp:7453
ImGui::Text
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
Definition:
imgui_widgets.cpp:238
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
ImGuiWindowFlags_AlwaysAutoResize
@ ImGuiWindowFlags_AlwaysAutoResize
Definition:
imgui.h:720
ImGui::CloseCurrentPopup
IMGUI_API void CloseCurrentPopup()
Definition:
imgui.cpp:7581
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
ImGui::Separator
IMGUI_API void Separator()
Definition:
imgui_widgets.cpp:1284
Blam::DebugUI::Windows
Legacy namespace to contain data for the legacy ImGUI console.
Definition:
ui.h:14
ImGui::Button
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
Definition:
imgui_widgets.cpp:644
blam
components
ui
imgui
imgui_windows
exit.hpp
Generated on Sat Dec 11 2021 06:13:40 for Blamite Game Engine - blam! by
1.8.17