feat: Implement Custom ImGui Assertion Handler to Enhance Stability
- Added a custom assertion handler for ImGui to log assertion failures instead of crashing the application. - Implemented a mechanism to back up and reset ImGui workspace settings after multiple assertion failures. - Updated the window creation process to set the custom assertion handler conditionally based on build configuration. - Enhanced the welcome screen to truncate project names for better display in the UI.
This commit is contained in:
@@ -634,11 +634,15 @@ void WelcomeScreen::DrawProjectCard(const RecentProject& project, int index) {
|
||||
ImGui::Text(ICON_MD_VIDEOGAME_ASSET);
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
// Project name (compact)
|
||||
// Project name (compact, shorten if too long)
|
||||
ImGui::SetCursorScreenPos(ImVec2(content_pos.x + 32, content_pos.y + 8));
|
||||
ImGui::PushTextWrapPos(cursor_pos.x + card_size.x - 8);
|
||||
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[0]); // Default font
|
||||
ImGui::TextColored(kTriforceGold, "%s", project.name.c_str());
|
||||
std::string short_name = project.name;
|
||||
if (short_name.length() > 22) {
|
||||
short_name = short_name.substr(0, 19) + "...";
|
||||
}
|
||||
ImGui::TextColored(kTriforceGold, "%s", short_name.c_str());
|
||||
ImGui::PopFont();
|
||||
ImGui::PopTextWrapPos();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user