Skip to content

[pull] main from ManimCommunity:main #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions manim/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from ..utils.module_ops import scene_classes_from_file

if dearpygui_imported:
dpg.create_context()
window = dpg.generate_uuid()


Expand All @@ -23,7 +24,10 @@ def configure_pygui(renderer, widgets, update=True):
if update:
dpg.delete_item(window)
else:
dpg.setup_viewport()
dpg.create_viewport()
dpg.setup_dearpygui()
dpg.show_viewport()

dpg.set_viewport_title(title=f"Manim Community v{__version__}")
dpg.set_viewport_width(1015)
dpg.set_viewport_height(540)
Expand Down Expand Up @@ -70,7 +74,7 @@ def scene_selection_callback(sender, data):
if widget != "separator":
del widget_config_copy["name"]
del widget_config_copy["widget"]
getattr(dpg, f"add_{widget}")(name, **widget_config_copy)
getattr(dpg, f"add_{widget}")(label=name, **widget_config_copy)
else:
dpg.add_separator()

Expand Down
Loading