Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
about_imgui.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../debug_ui.h"
4 
6 {
13  {
14  protected:
15  bool show_imgui_license = false;
16 
17  public:
21  AboutImGUI() {};
22 
27 
31  void Draw()
32  {
33  // About ImGui
34  if (show)
35  {
36  ImGui::Begin("About ImGui", &show, ImGuiWindowFlags_AlwaysAutoResize);
37  ImGui::Text("dear imgui, %s", ImGui::GetVersion());
38  ImGui::Separator();
39  ImGui::Text("By Omar Cornut and all github contributors.");
40  ImGui::Text("ImGui is licensed under the MIT License, see LICENSE for more information.");
41  ImGui::Separator();
42  if (ImGui::Button("License Info")) show_imgui_license = true;
43  ImGui::End();
44  }
45 
46  // ImGui license information
48  {
49  ImGui::SetNextWindowSize(ImVec2(700, 400));
50  ImGui::Begin("ImGui License", &show_imgui_license, ImGuiWindowFlags_NoResize);
51  static bool read_only = true;
52  static char text[1024 * 16] =
53  "The MIT License (MIT)"
54  "\n"
55  "\nCopyright(c) 2014 - 2015 Omar Cornut and ImGui contributors"
56  "\n"
57  "\nPermission is hereby granted, free of charge, to any person obtaining a copy"
58  "\nof this software and associated documentation files(the 'Software'), to deal"
59  "\nin the Software without restriction, including without limitation the rights"
60  "\nto use, copy, modify, merge, publish, distribute, sublicense, and / or sell"
61  "\ncopies of the Software, and to permit persons to whom the Software is"
62  "\nfurnished to do so, subject to the following conditions :"
63  "\n"
64  "\nThe above copyright notice and this permission notice shall be included in all"
65  "\ncopies or substantial portions of the Software."
66  "\n"
67  "\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR"
68  "\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,"
69  "\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE"
70  "\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER"
71  "\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,"
72  "\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE"
73  "\nSOFTWARE.";
74 
75  ImGui::InputTextMultiline("##source", text, IM_ARRAYSIZE(text), ImVec2(-1.0f, ImGui::GetTextLineHeight() * 24), ImGuiInputTextFlags_AllowTabInput | (read_only ? ImGuiInputTextFlags_ReadOnly : 0));
76  ImGui::End();
77  }
78  }
79  };
80 }
Blam::DebugUI::Windows::AboutImGUI::Draw
void Draw()
Draws the about dialog and the MIT license if enabled.
Definition: about_imgui.hpp:31
Blam::DebugUI::Windows::AboutImGUI::AboutImGUI
AboutImGUI()
Empty constructor.
Definition: about_imgui.hpp:21
Blam::EngineDefs::GetVersion
const BLAM char * GetVersion()
Retrieves the version of the engine in the following format:
Definition: engine_definitions.cpp:108
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::Windows::AboutImGUI::show_imgui_license
bool show_imgui_license
Toggles the ImGUI MIT license window.
Definition: about_imgui.hpp:15
Blam::DebugUI::ImGUIDrawingGroup
Class representing an ImGUI drawing group/draw list item.
Definition: debug_ui.h:359
Blam::DebugUI::Windows::AboutImGUI
Class for the ImGUI about dialog.
Definition: about_imgui.hpp:12
Blam::DebugUI::Windows::AboutImGUI::~AboutImGUI
~AboutImGUI()
Empty destructor.
Definition: about_imgui.hpp:26
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