summaryrefslogtreecommitdiff
path: root/mm/2s2h/DeveloperTools/EventLog.cpp
diff options
context:
space:
mode:
authorMalkierian <malkierian@gmail.com>2025-01-23 22:01:46 -0700
committerGitHub <noreply@github.com>2025-01-24 00:01:46 -0500
commit41ea4a601786af49062acc1c45d01f5b1559268b (patch)
treebe098ba1d9442b191e6cfd5020d772fa0d61d717 /mm/2s2h/DeveloperTools/EventLog.cpp
parent8caeb4b66891bd46b4c3a957fa7b8468584c03d5 (diff)
Modern menu v2 (#948)
* Axe `SearchableMenuItems.h`, moving things to `Menu.cpp` or `Menu.h` as necessary. Add `MenuTypes.h` for enums, structs, etc, for easy inclusion. Change `BenMenu` to `Menu`, and move to `Ship::` namespace rather than `BenGui::`. * Implement `BenMenu` extension of `Menu`, moving all port-specific code to `BenMenu`. `MenuTypes.h` and `Menu.h` should now be safe to include in multiple places. Window backend dropdown removed from menubar (maybe temporarily?). * Convert widgetInfo and widget draws to utilize UIWidgets Options structs. * Clean up default widget options. Add more colors, and add some of them to the menu theme dropdown. Convert widget options to use new Color enum instead of storing `ImVec4`s internally. * Fix a couple options type mismatches. Group option types together in the header. * Create `AddWidget` widget builder for dev experience clarity. Convert all existing widgets to the builder flow. * Unify search results displays. Restore tooltip functionality. * Rename `widgetInfo` to `WidgetInfo`. * WidgetOptions base struct implemented, shared_ptr stored on WidgetInfo. Move tooltip to WidgetOptions. WidgetOptions and derived structs now implement the builder flow. Rename UIWidgets::Color to Colors, Colors to ColorValues. Re-enable all menu widgets. * Fully nix the menubar entries. Add new menubar entry to explain that the settings are in the new menu and give hotkey to open it. * Address reviews. Tweak colors. Add WrappedText to Checkboxes as test case. * Implement function to add MainMenuEntry remotely. Implement widget with custom draw function calling. Partially implement Advanced Resolution, using external widget registration and custom widget functionality. Add some AR CVars to disableMap for use with IR slider. * clang * More reviews, comment AR stuff to keep it from displaying in the menu for now. * Better header define formatting. Change FloatSliderOptions builder arguments from int32 to float. * Fix default menu theme references. Harden sidebar search insertion and removal against index out of bounds issues. * Change top search clear to trigger on header or sidebar change regardless of autofocus option. * Change top bar search background to 20% opacity of menu theme color to increase visibility. * Fix all unthemed widget default colors. Missed menu theme CVar change. * :squint: * *raises hands as though holding a ball* Colors --------- Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Diffstat (limited to 'mm/2s2h/DeveloperTools/EventLog.cpp')
-rw-r--r--mm/2s2h/DeveloperTools/EventLog.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/2s2h/DeveloperTools/EventLog.cpp b/mm/2s2h/DeveloperTools/EventLog.cpp
index 6eacb3b03..e1da01d23 100644
--- a/mm/2s2h/DeveloperTools/EventLog.cpp
+++ b/mm/2s2h/DeveloperTools/EventLog.cpp
@@ -265,7 +265,7 @@ void EventLogWindow::DrawElement() {
ImGui::SameLine();
- if (UIWidgets::Button("Filters", { .size = UIWidgets::Sizes::Inline })) {
+ if (UIWidgets::Button("Filters", UIWidgets::ButtonOptions{}.Size(UIWidgets::Sizes::Inline))) {
ImGui::OpenPopup("eventLogFiltersPopup");
}
@@ -350,7 +350,8 @@ void EventLogWindow::DrawElement() {
ImGui::SameLine(0);
- if (UIWidgets::Button("Clear", { .color = UIWidgets::Colors::Red, .size = UIWidgets::Sizes::Inline })) {
+ if (UIWidgets::Button("Clear",
+ UIWidgets::ButtonOptions{ .color = UIWidgets::Colors::Red }.Size(UIWidgets::Sizes::Inline))) {
eventLogEntries.clear();
}