from __future__ import annotations from imgui_bundle import imgui from typing import TYPE_CHECKING if TYPE_CHECKING: from src.gui_2 import App def render_text_viewer(app: 'App', label: str, content: str, text_type: str = 'text', force_open: bool = False, id_suffix: str = "") -> None: if imgui.button(f"[+]##{id_suffix or str(id(content))}") or force_open: app.text_viewer_type = text_type app.show_windows["Text Viewer"] = True app.text_viewer_title = label app.text_viewer_content = content