Elaztek Developer Hub
Blamite Game Engine - blam!  00346.12.11.21.0529.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  {
37  ImGui::Text("dear imgui, %s", ImGui::GetVersion());
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.");
42  if (ImGui::Button("License Info")) show_imgui_license = true;
43  ImGui::End();
44  }
45 
46  // ImGui license information
48  {
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 
76  ImGui::End();
77  }
78  }
79  };
80 }
ImGuiInputTextFlags_ReadOnly
@ ImGuiInputTextFlags_ReadOnly
Definition: imgui.h:769
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
ImGui::GetTextLineHeight
IMGUI_API float GetTextLineHeight()
Definition: imgui.cpp:6837
ImGui::End
IMGUI_API void End()
Definition: imgui.cpp:6016
ImVec2
Definition: imgui.h:179
ImGui::Begin
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
Definition: imgui.cpp:5397
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::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
ImGui::SetNextWindowSize
IMGUI_API void SetNextWindowSize(const ImVec2 &size, ImGuiCond cond=0)
Definition: imgui.cpp:6741
ImGuiInputTextFlags_AllowTabInput
@ ImGuiInputTextFlags_AllowTabInput
Definition: imgui.h:765
IM_ARRAYSIZE
#define IM_ARRAYSIZE(_ARR)
Definition: imgui.h:75
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
ImGui::InputTextMultiline
IMGUI_API bool InputTextMultiline(const char *label, char *buf, size_t buf_size, const ImVec2 &size=ImVec2(0, 0), ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=NULL, void *user_data=NULL)
Definition: imgui_widgets.cpp:3074
ImGuiWindowFlags_AlwaysAutoResize
@ ImGuiWindowFlags_AlwaysAutoResize
Definition: imgui.h:720
ImGui::GetVersion
const IMGUI_API char * GetVersion()
Definition: imgui.cpp:3235
ImGui::Separator
IMGUI_API void Separator()
Definition: imgui_widgets.cpp:1284
ImGuiWindowFlags_NoResize
@ ImGuiWindowFlags_NoResize
Definition: imgui.h:715
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