feat: Enhance editor card management and shortcut functionality
- Introduced new shortcut categories for graphics, screen, and sprite editors, improving accessibility and organization. - Updated DungeonEditorV2 and other editor classes to register cards with the EditorCardManager, allowing for better control and visibility management. - Refactored shortcut registration for dungeon, graphics, screen, and sprite editors, ensuring consistent user experience across the application. - Improved initialization processes to handle dynamic card visibility and shortcuts effectively.
This commit is contained in:
@@ -22,6 +22,13 @@ void EditorCardManager::RegisterCard(const CardInfo& info) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if already registered to avoid duplicates
|
||||
if (cards_.find(info.card_id) != cards_.end()) {
|
||||
printf("[EditorCardManager] WARNING: Card '%s' already registered, skipping duplicate\n",
|
||||
info.card_id.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
cards_[info.card_id] = info;
|
||||
printf("[EditorCardManager] Registered card: %s (%s)\n",
|
||||
info.card_id.c_str(), info.display_name.c_str());
|
||||
|
||||
Reference in New Issue
Block a user