feat: Implement initial Sprite Editor application with basic UI components
- Added main application class `SpriteEditorApp` with layout setup. - Created menu bar with placeholder options. - Implemented `BottomToolbarView`, `LeftSidebarView`, `MainEditorView`, `RightSidebarView` with basic UI elements. - Added dialog classes for `ExportSettingsDialog` and `FlipbookCreatorDialog` to manage export settings and flipbook creation. - Introduced support for loading and displaying images in the flipbook creator. - Established a structure for handling sprite sheet composition and preview rendering.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
from tkinter import ttk
|
||||
|
||||
|
||||
class BottomToolbarView(ttk.LabelFrame):
|
||||
def __init__(self, parent) -> None:
|
||||
super().__init__(parent, text="Bottom Toolbar (Placeholder)")
|
||||
self.columnconfigure(0, weight=1)
|
||||
self.toolbar_expanded = True
|
||||
|
||||
toolbar_header = ttk.Frame(self)
|
||||
toolbar_header.grid(row=0, column=0, sticky="ew", padx=8, pady=(6, 2))
|
||||
toolbar_header.columnconfigure(0, weight=1)
|
||||
|
||||
ttk.Label(toolbar_header, text="Animation / Timeline / Quick Tools").grid(row=0, column=0, sticky="w")
|
||||
self.toggle_button = ttk.Button(toolbar_header, text="Collapse", command=self._toggle)
|
||||
self.toggle_button.grid(row=0, column=1, sticky="e")
|
||||
|
||||
self.toolbar_content = ttk.Frame(self)
|
||||
self.toolbar_content.grid(row=1, column=0, sticky="ew", padx=8, pady=(0, 8))
|
||||
|
||||
for index, label in enumerate(
|
||||
[
|
||||
"Play (Placeholder)",
|
||||
"Stop (Placeholder)",
|
||||
"Add Frame (Placeholder)",
|
||||
"Remove Frame (Placeholder)",
|
||||
"Onion Skin (Placeholder)",
|
||||
]
|
||||
):
|
||||
ttk.Button(self.toolbar_content, text=label).grid(row=0, column=index, padx=4, pady=4)
|
||||
|
||||
def _toggle(self) -> None:
|
||||
self.toolbar_expanded = not self.toolbar_expanded
|
||||
if self.toolbar_expanded:
|
||||
self.toolbar_content.grid(row=1, column=0, sticky="ew", padx=8, pady=(0, 8))
|
||||
self.toggle_button.config(text="Collapse")
|
||||
else:
|
||||
self.toolbar_content.grid_forget()
|
||||
self.toggle_button.config(text="Expand")
|
||||
|
||||
Reference in New Issue
Block a user