Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
crash_test.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../../debug_ui.h"
4 
6 
8 {
15  {
16  public:
20  CrashTest() {}
21 
26 
30  void Draw()
31  {
32  //Crash test
33  if (show)
34  {
35  ImGui::OpenPopup(" SOMEBODY PULL A NUKE");
36  if (ImGui::BeginPopupModal(" SOMEBODY PULL A NUKE", NULL, ImGuiWindowFlags_AlwaysAutoResize))
37  {
38  ImGui::Text("Are you sure you want to crash the engine?\n\n");
39  ImGui::Separator();
40 
41  if (ImGui::Button("Yes", ImVec2(120, 0))) { BLAM_ASSERTM(0, "User manually invoked the crash."); /*raise(SIGSEGV);*/ }
42  ImGui::SameLine();
43  if (ImGui::Button("No", ImVec2(120, 0))) { ImGui::CloseCurrentPopup(); show = false; }
44  ImGui::EndPopup();
45  }
46  }
47  }
48  };
49 }
Blam::DebugUI::Windows::CrashTest::~CrashTest
~CrashTest()
Empty destructor.
Definition: crash_test.hpp:25
Blam::DebugUI::Windows::CrashTest
Class for the crash test dialog.
Definition: crash_test.hpp:14
Blam::DebugUI::Windows::CrashTest::CrashTest
CrashTest()
Empty constructor.
Definition: crash_test.hpp:20
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_ASSERTM
#define BLAM_ASSERTM(x, msg)
Invokes an engine assertion, with an optional message.
Definition: crash.h:26
crash.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::DebugUI::Windows::CrashTest::Draw
void Draw()
Prompts the user for a confirmation, and invokes an assertion failure if confirmed.
Definition: crash_test.hpp:30