 |
Blamite Game Engine - blam!
00272.10.26.20.0001.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
3 #include "../debug_ui.h"
5 #include <Strings/components/utils/io/io.h>
6 #include <Strings/components/utils/utilities.h>
29 bool old_devtools_bar =
false;
30 bool show_menubar =
true;
32 int commit_hash_label = 0;
34 bool show_imgui_font_picker =
false;
35 bool show_imgui_metrics =
false;
36 bool show_imgui_style_picker =
false;
37 bool show_imgui_style_editor =
false;
70 if (ImGui::BeginMainMenuBar())
74 if (ImGui::BeginMenu(
"File"))
76 ImGui::MenuItem(
"Open .map file", NULL,
false,
false);
ShowNYITooltip();
77 ImGui::MenuItem(
"Return to mainmenu", NULL,
false,
false);
ShowNYITooltip();
78 if (ImGui::MenuItem(
"Open game dir", NULL)) BlamStrings::Utils::IO::OpenGameDirectory();
80 if (ImGui::MenuItem(
"Open Report Viewer", NULL)) BlamStrings::Utils::OpenLocalWebURL(
"/reports/index.html");
85 if (ImGui::BeginMenu(
"Tools"))
89 if (ImGui::BeginMenu(
"Network"))
96 if (ImGui::BeginMenu(
"Rendering"))
104 if (ImGui::BeginMenu(
"Test"))
106 if (ImGui::BeginMenu(
"Deprecated"))
108 ImGui::TextColored(ImVec4(1, 0, 0, 1),
"These items will be replaced/removed in the future.");
112 ImGui::MenuItem(
"Old Menu", NULL, &old_devtools_bar);
117 if (ImGui::BeginMenu(
"Rendering"))
131 if (ImGui::BeginMenu(
"ImGUI"))
133 ImGui::MenuItem(
"Font Selector", NULL, &show_imgui_font_picker);
134 ImGui::MenuItem(
"Metrics", NULL, &show_imgui_metrics);
135 ImGui::MenuItem(
"Style Selector", NULL, &show_imgui_style_picker);
136 ImGui::MenuItem(
"Style Editor", NULL, &show_imgui_style_editor);
150 if (ImGui::BeginMenu(
"Network Tools"))
152 ImGui::MenuItem(
"this menu is a placeholder, come back later", NULL,
false,
false);
ShowNYITooltip();
155 if (ImGui::BeginMenu(
"Debug"))
157 if (ImGui::MenuItem(
"Debug Menu",
"PgUp"))
161 if (debug_menu_stack_item)
173 if (ImGui::BeginMenu(
"Settings"))
175 ImGui::MenuItem(
"Configuration Editor", NULL,
false,
false);
ShowNYITooltip();
180 if (ImGui::BeginMenu(
"Monitoring"))
182 ImGui::MenuItem(
"Show FPS", NULL,
false,
false);
ShowNYITooltip();
184 ImGui::MenuItem(
"Show Usage Info", NULL,
false,
false);
ShowNYITooltip();
187 if (ImGui::BeginMenu(
"Help"))
197 ImGui::SameLine(ImGui::GetWindowWidth() - (commit_hash_label + 15));
199 if (ImGui::IsItemHovered())
201 ImGui::BeginTooltip();
202 ImGui::PushTextWrapPos(450.0f);
203 ImGui::TextUnformatted(
"Current git commit of this build");
207 ImGui::TextUnformatted(
"If this build was created locally, this number will be inaccurate. Only builds acquired from Jenkins or BuildMaster will be accurate.");
210 ImGui::PopTextWrapPos();
214 ImVec2 commit_label_size = ImGui::GetItemRectSize();
216 commit_hash_label = commit_label_size.x;
218 ImGui::EndMainMenuBar();
222 if (old_devtools_bar)
224 ImGui::Begin(
"Old Menu", &old_devtools_bar, ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize);
228 ImGui::Text(
"can't imagine why you'd need it, but here it is");
233 if (show_imgui_font_picker)
235 ImGui::ShowFontSelector(
"Choose Font");
238 if (show_imgui_metrics)
240 ImGui::ShowMetricsWindow(&show_imgui_metrics);
243 if (show_imgui_style_picker)
245 ImGui::ShowStyleSelector(
"Choose Style");
248 if (show_imgui_style_editor)
250 if (ImGui::Begin(
"ImGui Style Editor", &show_imgui_style_editor))
252 ImGui::ShowStyleEditor();
@ d2d_test
Definition: debug_ui.h:382
@ tag_editor
Definition: debug_ui.h:389
@ discord_rpc_ui
Definition: debug_ui.h:383
@ theme_editor
Definition: debug_ui.h:399
@ dx11_window
Definition: debug_ui.h:367
@ render_stack_editor
Definition: debug_ui.h:386
Class for the default ImGUI DX11 sample window.
Definition: dx11_window.hpp:13
@ engine_info_new
Definition: debug_ui.h:392
@ imgui_info
Definition: debug_ui.h:393
@ imgui_user_guide
Definition: debug_ui.h:397
#define WSV_ERROR
Macro for 'Error' log seveirty. Original pre-enum value was 2.
Definition: logger.h:17
@ debug_menu
Definition: debug_ui.h:394
BLAM void TakeScreenshot()
Captures the current frame and saves it to a file.
Definition: screenshot.cpp:100
@ font_editor
Definition: debug_ui.h:384
@ theme_selector
Definition: debug_ui.h:398
@ license_startup_prompt
Definition: debug_ui.h:375
Class representing an ImGUI drawing group/draw list item.
Definition: debug_ui.h:409
#define CURRENT_COMMIT
Definition: version_data.h:14
BLAM ImGUIDrawingGroup * GetDrawListItem(DrawListItem key)
Retrieves a drawing group with the specified ID.
Definition: drawing_list.cpp:21
@ crash_test_ui
Definition: debug_ui.h:381
BLAM void LogEventForce(std::string message, LogSeverity severity)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:150
@ exit_via_menu
Definition: debug_ui.h:396
Legacy namespace to contain data for the legacy ImGUI console.
Definition: debug_ui.h:494
@ Text
Master text object that wraps around both BitmapText and DWText.
Definition: render_stack.h:73
BLAM bool * RenderTargetClearing()
Retrieves whether or not to enable render target clearing.
Definition: render_manage.cpp:608
#define duigvs(x)
Macro for Blam::DebugUI::GetVisibility().
Definition: debug_ui.h:20
BLAM StackObjectBase * GetStackItem(std::string id)
Retrieves an item from the render stack.
Definition: render_stack.cpp:75
@ network_stats
Definition: debug_ui.h:385