Refactor EditorManager and TestManager for improved UI and testing functionality

- Enhanced the DrawMenuBar method in EditorManager to improve the alignment and display of version information and session management.
- Updated the button size in MapPropertiesSystem for better usability.
- Introduced detailed ROM availability checks in RomDependentTestSuite, improving error handling and test coverage.
- Enhanced the TestManager UI to provide a more informative dashboard with detailed ROM status and actions, including a refresh option for the current ROM reference.
This commit is contained in:
scawful
2025-09-25 16:12:13 -04:00
parent c072ec9791
commit 205ea6f695
4 changed files with 154 additions and 42 deletions

View File

@@ -764,16 +764,23 @@ void EditorManager::DrawMenuBar() {
SameLine();
}
// Settings and version (far right)
SeparatorEx(ImGuiSeparatorFlags_Vertical);
// Settings and version (properly aligned to right)
std::string version_text = absl::StrFormat("v%s", version_.c_str());
float version_width = CalcTextSize(version_text.c_str()).x;
float settings_width = CalcTextSize(ICON_MD_DISPLAY_SETTINGS).x + 16;
SameLine(GetWindowWidth() - version_width - settings_width - 15);
ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
SameLine();
PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
if (Button(ICON_MD_DISPLAY_SETTINGS)) {
show_display_settings = !show_display_settings;
}
PopStyleColor();
SameLine();
Text("v%s", version_.c_str());
Text("%s", version_text.c_str());
EndMenuBar();
}

View File

@@ -68,7 +68,7 @@ void MapPropertiesSystem::DrawSimplifiedMapSettings(int& current_world, int& cur
}
TableNextColumn();
if (ImGui::Button(current_map_lock ? ICON_MD_LOCK : ICON_MD_LOCK_OPEN, ImVec2(30, 0))) {
if (ImGui::Button(current_map_lock ? ICON_MD_LOCK : ICON_MD_LOCK_OPEN, ImVec2(40, 0))) {
current_map_lock = !current_map_lock;
}
HOVER_HINT(current_map_lock ? "Unlock Map" : "Lock Map");