refactor(editor): centralize sidebar management for card-based editors
- Updated EditorManager to handle sidebar drawing for card-based editors, improving consistency across editor types. - Removed individual toolbar implementations from GraphicsEditor, ScreenEditor, and SpriteEditor, as sidebar functionality is now centralized. - Enhanced EditorCardManager to manage card visibility and selection more effectively, including improved UI feedback for empty card categories. Benefits: - Streamlined editor interface and improved user experience by consolidating sidebar management, making it easier to navigate and manage editor cards.
This commit is contained in:
@@ -169,23 +169,8 @@ absl::Status GraphicsEditor::Update() {
|
||||
}
|
||||
|
||||
void GraphicsEditor::DrawToolset() {
|
||||
static gui::Toolset toolbar;
|
||||
toolbar.Begin();
|
||||
|
||||
if (toolbar.AddAction(ICON_MD_EDIT, "Sheet Editor")) {
|
||||
show_sheet_editor_ = !show_sheet_editor_;
|
||||
}
|
||||
if (toolbar.AddAction(ICON_MD_VIEW_LIST, "Sheet Browser")) {
|
||||
show_sheet_browser_ = !show_sheet_browser_;
|
||||
}
|
||||
if (toolbar.AddAction(ICON_MD_PERSON, "Player Animations")) {
|
||||
show_player_animations_ = !show_player_animations_;
|
||||
}
|
||||
if (toolbar.AddAction(ICON_MD_CONSTRUCTION, "Prototype Viewer")) {
|
||||
show_prototype_viewer_ = !show_prototype_viewer_;
|
||||
}
|
||||
|
||||
toolbar.End();
|
||||
// Sidebar is now drawn by EditorManager for card-based editors
|
||||
// This method kept for compatibility but sidebar handles card toggles
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user