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!
00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
exit.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
components/ui/imgui/imgui.h
"
4
5
#include "
components/resources/engine_text/engine_text.h
"
6
#include "core.h"
7
11
class
BlamImGuiWindow_Exit
:
public
BlamImGuiWindow
12
{
13
public
:
14
18
void
Draw
()
19
{
20
if
(!
show
)
21
{
22
return
;
23
}
24
25
ImGui::OpenPopup
(
ENGINE_TEXT
(
"imgui_exit_confirm_title"
).c_str());
26
27
if
(
ImGui::BeginPopupModal
(
ENGINE_TEXT
(
"imgui_exit_confirm_title"
).c_str(), &
show
,
ImGuiWindowFlags_AlwaysAutoResize
))
28
{
29
ImGui::Text
(
ENGINE_TEXT
(
"imgui_exit_confirm_text"
).c_str());
30
ImGui::Separator
();
31
32
if
(
ImGui::Button
(
ENGINE_TEXT
(
"yes"
).c_str(),
ImVec2
(120, 0)))
33
{
34
SDL_Event
*
event
=
new
SDL_Event
();
35
event
->type = SDL_QUIT;
36
SDL_PushEvent(event);
37
}
38
39
ImGui::SameLine
();
40
41
if
(
ImGui::Button
(
ENGINE_TEXT
(
"no"
).c_str(),
ImVec2
(120, 0)))
42
{
43
ImGui::CloseCurrentPopup
();
44
show
=
false
;
45
}
46
47
ImGui::EndPopup
();
48
}
49
}
50
};
SDL_Event
union SDL_Event SDL_Event
Definition:
imgui_impl_sdl.h:21
ImGui::EndPopup
IMGUI_API void EndPopup()
Definition:
imgui.cpp:7675
BlamImGuiWindow::show
bool show
Controls whether or not the group should be shown. May not be used in all groups.
Definition:
imgui.h:34
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
BlamImGuiWindow
Class representing an ImGUI window.
Definition:
imgui.h:31
ImVec2
Definition:
imgui.h:179
ImGui::OpenPopup
IMGUI_API void OpenPopup(const char *str_id)
Definition:
imgui.cpp:7453
BlamImGuiWindow_Exit
Class for the exit confirmation dialog.
Definition:
exit.hpp:11
ImGui::Text
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
Definition:
imgui_widgets.cpp:238
BlamImGuiWindow_Exit::Draw
void Draw()
Shows the exit confirmation prompt.
Definition:
exit.hpp:18
ImGuiWindowFlags_AlwaysAutoResize
@ ImGuiWindowFlags_AlwaysAutoResize
Definition:
imgui.h:720
ImGui::CloseCurrentPopup
IMGUI_API void CloseCurrentPopup()
Definition:
imgui.cpp:7581
ENGINE_TEXT
#define ENGINE_TEXT(string_id)
Definition:
engine_text.h:7
imgui.h
ImGui::Separator
IMGUI_API void Separator()
Definition:
imgui_widgets.cpp:1284
SDL_Event
Definition:
SdlEmulationLayer.h:735
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 Sun Dec 10 2023 18:04:28 for Blamite Game Engine - blam! by
1.8.17