Elaztek Developer Hub
Blamite Game Engine - blam!  00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
devtools_bar.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <Strings/components/utils/io/io.h>
6 
9 
17 {
18 private:
19  bool devtools_bar = true;
20  bool main_menu = true;
21 
22  bool window_wrap = false;
23 
24 public:
25  BlamImGuiWindow_DevToolsBar(bool show_in_window)
26  {
27  window_wrap = show_in_window;
28 
29  if (window_wrap)
30  {
31  main_menu = false;
32  }
33  }
34 
39  {
40  main_menu = false;
41  }
42 
46  void Draw()
47  {
48  devtools_bar = show;
49 
50  // Main Menu (titlebar)
51  if (devtools_bar)
52  {
53  if (main_menu)
54  {
56  }
57  else
58  {
59  if (window_wrap)
60  {
62  }
63 
65  }
66 
67  if (ImGui::BeginMenu("File"))
68  {
69  ImGui::MenuItem("Open .map file", NULL);
70  ImGui::MenuItem("Return to mainmenu", NULL);
71  if (ImGui::MenuItem("Open game dir", NULL)) BlamStrings::Utils::IO::OpenGameDirectory();
73  ImGui::MenuItem("Exit", NULL, duigvs("exit_via_menu"));
75  }
76  if (ImGui::BeginMenu("Tools"))
77  {
78  ImGui::MenuItem("Memory Editor", NULL);
79  ImGui::MenuItem("Object Info", NULL);
80  ImGui::MenuItem("Cheats", NULL);
81  ImGui::MenuItem("Logger", NULL, duigvs("logger"));
83  ImGui::MenuItem("Render Stack Editor", NULL, duigvs("render_stack_editor"));
85  if (ImGui::MenuItem("Take Screenshot", "F2"))
86  {
88  }
90  }
91  if (ImGui::BeginMenu("Network Tools"))
92  {
93  ImGui::MenuItem("Chat", NULL, duigvs("chat_window"));
94  ImGui::MenuItem("Network Poker", NULL);
95  ImGui::MenuItem("Test Master Server Connection", NULL, duigvs("ip_test"));
96  ImGui::MenuItem("Advanced", NULL);
98  }
99  if (ImGui::BeginMenu("Config"))
100  {
101  ImGui::MenuItem("Engine Configuration (Raw)", NULL, duigvs("config_editor"));
102  ImGui::MenuItem("Engine Configuration", NULL, duigvs("config_editor_new"));
103  ImGui::MenuItem("Theme Selector", NULL, duigvs("theme_selector"));
104  ImGui::EndMenu();
105  }
106  if (ImGui::BeginMenu("Test"))
107  {
108  ImGui::MenuItem("Crash Test", NULL, duigvs("crash_test_ui"));
109  ImGui::MenuItem("Access Key Dialog", NULL, duigvs("license_startup_prompt"));
110  ImGui::MenuItem("Win32 Dialog", NULL);
111  ImGui::MenuItem("Forceload .map", NULL);
113  ImGui::MenuItem("ImGui Test Window", NULL, ((BlamImGuiWindow_DirectX11Window*)Blam::UI::ImGUI::GetImGuiWindow("dx11_window"))->show_test_window);
114  ImGui::MenuItem("DX11 Example Window", NULL, duigvs("dx11_window"));
116  ImGui::MenuItem("Discord Rich Presence", NULL, duigvs("discord_rpc_ui"));
118  ImGui::MenuItem("Direct2D Test Window", NULL, duigvs("d2d_test"));
119  ImGui::EndMenu();
120  }
121  if (ImGui::BeginMenu("Debug"))
122  {
123  ImGui::MenuItem("Show Coordinates", NULL);
124  ImGui::MenuItem("Show Runtime Counter", NULL);
125  ImGui::MenuItem("Show FPS", NULL, ((BlamImGuiWindow_Stats*)Blam::UI::ImGUI::GetImGuiWindow("stats"))->ShowFPS());
126  ImGui::MenuItem("Show Network Info", NULL, duigvs("network_stats"));
127  ImGui::MenuItem("Show Usage Info", NULL);
128  ImGui::MenuItem("Show Stats", NULL, duigvs("stats"));
129  ImGui::MenuItem("Toggle Render Target Clearing", "F3 + R", nullptr);
130  //ImGui::MenuItem("Console (v2 demo)", NULL, &show_testing_newconsole);
131  ImGui::EndMenu();
132  }
133  if (ImGui::BeginMenu("Help"))
134  {
135  ImGui::MenuItem("ImGui User Guide", NULL, duigvs("imgui_user_guide"));
137  ImGui::MenuItem("About ImGui", NULL, duigvs("imgui_info"));
138  ImGui::MenuItem("About Blamite", NULL, duigvs("engine_info"));
139  ImGui::EndMenu();
140  }
141 
142  if (main_menu)
143  {
145  }
146  else
147  {
149 
150  if (window_wrap)
151  {
152  ImGui::Text("can't imagine why you'd need it, but here it is");
153 
154  ImGui::End();
155  }
156  }
157  }
158  }
159 };
BlamImGuiWindow_GameEngineTextViewer
Class for the engine Globals editor.
Definition: engine_text_viewer.hpp:13
Blam::UI::ImGUI::CleanupWindows
BLAM void CleanupWindows()
Cleans up any data used by the ImGUI draw list.
Definition: debug_ui.cpp:147
BlamImGuiWindow_GlobalsEditor
Class for the engine Globals editor.
Definition: globals_editor.hpp:14
listeners.hpp
imgui_style_picker.hpp
BlamImGuiWindow::Draw
virtual void Draw()
Draws the contents of the group.
Definition: imgui.h:43
config_editor.hpp
license_prompt.hpp
BlamImGuiWindow_MenuBar
Class for the main ImGUI menu bar.
Definition: menubar.hpp:24
BlamImGuiWindow_OgreHlmsDebug
Class for the Ogre HLMS Debug utility.
Definition: ogre_hlms_debug.hpp:18
BlamImGuiWindow_ImGuiDemoWindow
Wrapper for ImGui's demo window.
Definition: imgui_demo.hpp:8
duigvs
#define duigvs(x)
Macro for Blam::DebugUI::GetVisibility().
Definition: imgui.h:18
BlamImGuiWindow_ThemePicker
Class for the old and awful theme picker dialog.
Definition: theme_picker.hpp:17
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:130
imgui_user_guide.hpp
BlamImGuiWindow_DirectorTool
Class for the Director debug utility.
Definition: director.hpp:13
ImGui::EndMenu
IMGUI_API void EndMenu()
Definition: imgui_widgets.cpp:6224
menubar.hpp
ImGui::EndMainMenuBar
IMGUI_API void EndMainMenuBar()
Definition: imgui_widgets.cpp:5995
blam_ui_editor.hpp
BlamImGuiWindow::show
bool show
Controls whether or not the group should be shown. May not be used in all groups.
Definition: imgui.h:34
BlamImGuiWindow_BgfxConfig
Dialog used to configure bgfx debug, clear, and reset flags.
Definition: bgfx_config.hpp:14
BlamImGuiWindow_DiscordRPCTester
Class for the Discord Rich Presence test dialog.
Definition: discord_rpc_tester.hpp:21
BlamImGuiWindow_FontEditor
Class for the Font Editor.
Definition: font_editor.hpp:13
theme_picker.hpp
console.hpp
engine_text_viewer.hpp
BlamImGuiWindow_DevToolsBar::BlamImGuiWindow_DevToolsBar
BlamImGuiWindow_DevToolsBar(bool show_in_window)
Definition: devtools_bar.hpp:25
imgui_impl_dx11.h
BlamImGuiWindow_AboutImGUI
Class for the ImGUI about dialog.
Definition: about_imgui.hpp:10
ImGui::End
IMGUI_API void End()
Definition: imgui.cpp:6016
BlamImGuiWindow_ErrorDialog::message
const char * message
The contents of the error dialog.
Definition: error_dialog.hpp:17
BlamImGuiWindow_UpdateChecker
A class containing a theoretical update check dialog.
Definition: update_checker.hpp:21
Blam::Rendering::TakeScreenshot
BLAM void TakeScreenshot()
Instructs OGRE to save a screenshot on the next frame.
Definition: ogre.cpp:700
ImGui::BeginMainMenuBar
IMGUI_API bool BeginMainMenuBar()
Definition: imgui_widgets.cpp:5975
BlamImGuiWindow_ErrorDialog::title
const char * title
The title of the error dialog.
Definition: error_dialog.hpp:16
BlamImGuiWindow_DynamicMenuBar
Class for the main ImGUI menu bar.
Definition: dynamic_menubar.hpp:19
imgui_font_selector.hpp
rendering.h
BlamImGuiWindow_DevToolsBar::Draw
void Draw()
Draws the menu bar contents.
Definition: devtools_bar.hpp:46
BlamImGuiWindow_ErrorDialog::show_error_dialog
bool show_error_dialog
Whether or not to show the error dialog.
Definition: error_dialog.hpp:15
about_blamite.hpp
BlamImGuiWindow
Class representing an ImGUI window.
Definition: imgui.h:31
dx11_window.hpp
ImGui::MenuItem
IMGUI_API bool MenuItem(const char *label, const char *shortcut=NULL, bool selected=false, bool enabled=true)
Definition: imgui_widgets.cpp:6240
BlamImGuiWindow_ModernConfigEditor
Class for the modern Config Editor.
Definition: config_editor.hpp:14
BlamImGuiWindow_WorldEditor
Class for the World Editor utility.
Definition: world_editor.hpp:13
BlamImGuiWindow_LicensePrompt
Dialog to prompt for developer key authentication.
Definition: license_prompt.hpp:16
BlamImGuiWindow_Stats
This is the ImGUI-based implementation of the stats widget.
Definition: stats.hpp:21
ImGui::Begin
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
Definition: imgui.cpp:5397
BlamImGuiWindow_DevToolsBar
Class for the original menu bar shown with ImGUI.
Definition: devtools_bar.hpp:16
BlamImGuiWindow_ImGuiMetricsWindow
Wrapper for ImGui's built-in metrics window.
Definition: imgui_metrics.hpp:8
config_editor_new.hpp
BlamImGuiWindow_BlamUIEditor
Class for the Blam UI Editor debug utility.
Definition: blam_ui_editor.hpp:11
Blam::UI::ImGUI::AddToWindowList
BLAM void AddToWindowList(std::string key, BlamImGuiWindow *group)
Adds a new item to the ImGUI draw list.
Definition: debug_ui.cpp:180
ImGui::BeginMenuBar
IMGUI_API bool BeginMenuBar()
Definition: imgui_widgets.cpp:6012
imgui_metrics.hpp
NULL
Add a fourth parameter to bake specific font ranges NULL
Definition: README.txt:57
update_checker.hpp
BlamImGuiWindow_Exit
Class for the exit confirmation dialog.
Definition: exit.hpp:11
widgets.h
ImGui::Text
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
Definition: imgui_widgets.cpp:238
BlamImGuiWindow_DebugMenu
Class for the ImGUI-based debug menu implementation.
Definition: debug_menu.hpp:18
jtchat.hpp
font_editor.hpp
dynamic_menubar.hpp
BlamImGuiWindow_AboutBlamite
Class for the legacy ImGUI-based About box.
Definition: about_blamite.hpp:37
main_menu
BlamDebugMenu * main_menu
The current debug menu information.
Definition: debug_menu.cpp:15
ip_test.hpp
resource.h
globals.h
BlamImGuiWindow_BgfxProfilerInfo
Class for the bgfx profiler window.
Definition: bgfx_profiler.hpp:10
BlamImGuiWindow_WeirdLogger
A class for...
Definition: weird_logger.hpp:13
Blam::UI::ImGUI::ShowErrorDialog
BLAM void ShowErrorDialog(const char *title, const char *message)
Shows a simple error dialog created using ImGUI.
Definition: debug_ui.cpp:171
BlamImGuiWindow_ConfigEditorNew
Class for a GUI config editor.
Definition: config_editor_new.hpp:22
ImGui::BeginMenu
IMGUI_API bool BeginMenu(const char *label, bool enabled=true)
Definition: imgui_widgets.cpp:6081
BlamImGuiWindow_ImGUIUserGuide
Class for the ImGUI user guide.
Definition: imgui_user_guide.hpp:11
BlamImGuiWindow_JTChat
This was planned to be a chat client that would connect to some sort of java-based chat server.
Definition: jtchat.hpp:15
BlamImGuiWindow_ImGuiStyleSelectorWindow
Wrapper for ImGui's built-in style selector.
Definition: imgui_style_picker.hpp:8
ogre_scene_editor.hpp
imgui_window_list
std::map< std::string, BlamImGuiWindow * > imgui_window_list
The list of all available ImGUI windows.
Definition: debug_ui.cpp:85
bgfx_config.hpp
globals_editor.hpp
director.hpp
BlamImGuiWindow_ErrorDialog
Class used for the ImGUI-based error dialog.
Definition: error_dialog.hpp:12
BlamImGuiWindow_CrashTest
Class for the crash test dialog.
Definition: crash_test.hpp:12
BlamImGuiWindow_ImGuiConsole
Class for the ImGUI console implementation.
Definition: console.hpp:19
about_blamite_new.hpp
tag_editor.hpp
Blam::UI::ImGUI::GetWindowList
BLAM std::map< std::string, BlamImGuiWindow * > * GetWindowList()
Retrieves the current ImGUI drawing list.
Definition: debug_ui.cpp:192
Blam::UI::ImGUI::RenderWindows
BLAM void RenderWindows()
Renders all ImGUI data.
Definition: debug_ui.cpp:159
Blam::UI::ImGUI::BuildWindows
BLAM void BuildWindows()
Initializes the ImGUI draw list.
Definition: debug_ui.cpp:87
ImGui::EndMenuBar
IMGUI_API void EndMenuBar()
Definition: imgui_widgets.cpp:6040
crash.h
error_dialog.hpp
BlamImGuiWindow_AboutBlamiteNew
Class for Blamite's ImGUI-based About box.
Definition: about_blamite_new.hpp:12
imgui_impl_win32.h
BlamImGuiWindow_ConfigEditor
An incomplete configuration editor, using raw text.
Definition: config_editor.hpp:22
ImGuiWindowFlags_AlwaysAutoResize
@ ImGuiWindowFlags_AlwaysAutoResize
Definition: imgui.h:720
crash_test.hpp
BlamImGuiWindow_TagEditor
Class for the realtime tag editor.
Definition: tag_editor.hpp:14
bgfx_profiler.hpp
BlamImGuiWindow_NetworkStats
Class for the Network Stats dialog.
Definition: network_stats.hpp:16
ImGuiWindowFlags_MenuBar
@ ImGuiWindowFlags_MenuBar
Definition: imgui.h:724
imgui.h
weird_logger.hpp
world_editor.hpp
BlamImGuiWindow_IPTest
Legacy IP test dialog.
Definition: ip_test.hpp:15
Blam::UI::ImGUI::GetImGuiWindow
BLAM BlamImGuiWindow * GetImGuiWindow(std::string key)
Retrieves a drawing group with the specified ID.
Definition: debug_ui.cpp:197
ImGui::Separator
IMGUI_API void Separator()
Definition: imgui_widgets.cpp:1284
BlamImGuiWindow_ImGuiFontSelectorWindow
Wrapper for ImGui's built-in font selector.
Definition: imgui_font_selector.hpp:8
BlamImGuiWindow_DevToolsBar::SetDrawModeNotMainMenu
void SetDrawModeNotMainMenu()
Instructs the menu to draw as a menu bar within a window, rather than as part of the main menu bar.
Definition: devtools_bar.hpp:38
ImGuiWindowFlags_NoResize
@ ImGuiWindowFlags_NoResize
Definition: imgui.h:715
config_editor.hpp
imgui_demo.hpp
debug_menu.hpp
ogre_hlms_debug.hpp
BlamImGuiWindow_DirectX11Window
Class for the default ImGUI DX11 sample window.
Definition: dx11_window.hpp:11
imgui_style_editor.hpp
discord_rpc_tester.hpp
about_imgui.hpp
BlamImGuiWindow_ImGuiStyleEditorWindow
Wrapper for ImGui's built-in style editor.
Definition: imgui_style_editor.hpp:8
stats.hpp
BlamImGuiWindow_EventListenerViewer
Class for the event listener viewer.
Definition: listeners.hpp:13
exit.hpp
Blam::UI::ImGUI::GetVisibility
BLAM bool * GetVisibility(std::string key)
Retrieves the visibility of the specified draw list item.
Definition: debug_ui.cpp:209
devtools_bar.hpp
BlamImGuiWindow_OgreSceneEditor
Class for the Ogre Scene Editor utility.
Definition: ogre_scene_editor.hpp:14
network_stats.hpp
theme_editor.hpp
BlamImGuiWindow_ModernThemeEditor
Class for the modern Theme Editor.
Definition: theme_editor.hpp:12