demo_im_anim.py 1.1 KB

1234567891011121314151617181920212223242526272829
  1. # Part of ImGui Bundle - MIT License - Copyright (c) 2022-2026 Pascal Thomet - https://github.com/pthom/imgui_bundle
  2. from imgui_bundle import imgui, imgui_md, immapp
  3. from imgui_bundle.demos_python.demo_utils.imgui_explorer_setup import get_imgui_explorer, get_package_path
  4. imgui_explorer, _has_imgui_explorer = get_imgui_explorer()
  5. def demo_gui():
  6. imgui_md.render_unindented(
  7. """
  8. # ImAnim
  9. ImAnim is an Animation Engine for Dear ImGui. Browse the demos below, and look at their code in the right panel! You may switch between C++ and Python code with the toggle at the top right of this window.
  10. """
  11. )
  12. imgui.new_line()
  13. imgui.separator()
  14. if _has_imgui_explorer:
  15. assert imgui_explorer is not None
  16. imgui_explorer.show_imgui_explorer_gui_python(
  17. imgui_explorer.ImGuiExplorerLibrary.im_anim, get_package_path()
  18. )
  19. else:
  20. imgui.text("Demo unavailable, because Dear ImGui Manual library is not included in this build.")
  21. if __name__ == "__main__":
  22. immapp.run(gui_function=demo_gui, with_markdown=True, window_size=(1000, 800))