SourceClass Modal
from egui import Modalclass Modal:A modal dialog.
Similar to a egui.Window but centered and with a backdrop that
blocks input to the rest of the UI.
You can show multiple modals on top of each other. The topmost modal will always be the most recently shown one. If multiple modals are newly shown in the same frame, the order of the modals is undefined (either first or second could be top).
Methods§
Sourcedef area(self, /, area: Area) -> Modal§
Set the area of the modal.
Default is Modal.default_area.
Sourcedef backdrop_color(self, /, color: Color32) -> Modal§
Set the backdrop color of the modal.
Default is Color32.from_black_alpha(100).
Source@staticmethod
def default_area(id: str) -> Area§
Returns an area customized for a modal.
Makes these changes to the default area: - sense: hover - anchor: center - order: foreground
Sourcedef frame(self, /, frame: Frame) -> Modal§
Set the frame of the modal.
Default is Frame.popup.
Sourcedef show(self, /, ctx: Context) -> Any§
Show the modal.