- 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.
33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
import tkinter as tk
|
|
|
|
|
|
def create_menu_bar(root: tk.Tk, on_open_flipbook_creator=None) -> None:
|
|
menu_bar = tk.Menu(root)
|
|
|
|
file_menu = tk.Menu(menu_bar, tearoff=0)
|
|
file_menu.add_command(label="New (Placeholder)")
|
|
file_menu.add_command(label="Open (Placeholder)")
|
|
file_menu.add_command(label="Save (Placeholder)")
|
|
file_menu.add_separator()
|
|
file_menu.add_command(label="Exit", command=root.quit)
|
|
menu_bar.add_cascade(label="File", menu=file_menu)
|
|
|
|
edit_menu = tk.Menu(menu_bar, tearoff=0)
|
|
edit_menu.add_command(label="Undo (Placeholder)")
|
|
edit_menu.add_command(label="Redo (Placeholder)")
|
|
menu_bar.add_cascade(label="Edit", menu=edit_menu)
|
|
|
|
view_menu = tk.Menu(menu_bar, tearoff=0)
|
|
view_menu.add_command(label="Zoom In (Placeholder)")
|
|
view_menu.add_command(label="Zoom Out (Placeholder)")
|
|
menu_bar.add_cascade(label="View", menu=view_menu)
|
|
|
|
tools_menu = tk.Menu(menu_bar, tearoff=0)
|
|
if on_open_flipbook_creator is None:
|
|
tools_menu.add_command(label="Flipbook Creator", state=tk.DISABLED)
|
|
else:
|
|
tools_menu.add_command(label="Flipbook Creator", command=on_open_flipbook_creator)
|
|
menu_bar.add_cascade(label="Tools", menu=tools_menu)
|
|
|
|
root.config(menu=menu_bar)
|