I have AcceptDialog that does what I want, except two things - I want to disable dragging, meaning it will be locked in one place. And I want to hide close button, so user is forced to click on the Ok button.
From what I’ve seen in documentation there is nothing that would allow doing it (no property to disable dragging, no method to fetch the close button to hide it). Which means my only option is to create custom Window. But before I start reinventing the wheel I wanted to ask is it really impossible to do.
As far as I’m aware they kept the interface to the dialog pretty lean because it uses (or at least, can use) OS-native dialogs. I don’t think you have a lot of control over them without diving into the underlying C++ code.
Do you need it to be a native dialogue? If it’s not, then Godot uses an “embedded” window that is mostly a PanelContainer and two buttons. You could make your own PanelContainer and button, show/hide at will.
Creating a panel with single button is what came to my mind first after finding out that you can’t do what I want with AcceptDialog.
I didn’t want to create anything custom at first because pop up window is extremely basic UI element and it is bound to be included out of the box. And while I was right, unfortunately it has limitations as @hexgrid explained.
I’m not sure how to force background UI elements to be disabled with custom panel, but I suppose I can just add some transparent layer in between and turn it off/on with the panel.