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:
@@ -85,17 +85,8 @@ absl::Status SpriteEditor::Update() {
|
||||
}
|
||||
|
||||
void SpriteEditor::DrawToolset() {
|
||||
static gui::Toolset toolbar;
|
||||
toolbar.Begin();
|
||||
|
||||
if (toolbar.AddAction(ICON_MD_PEST_CONTROL_RODENT, "Vanilla Sprites")) {
|
||||
show_vanilla_editor_ = !show_vanilla_editor_;
|
||||
}
|
||||
if (toolbar.AddAction(ICON_MD_ADD_MODERATOR, "Custom Sprites")) {
|
||||
show_custom_editor_ = !show_custom_editor_;
|
||||
}
|
||||
|
||||
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