storyquest_bootstrap: Improve dialog size, position, and keyboard behaviour #1845
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously the dialog was not centred on the editor. Make it so by using
EditorInterface.popup_dialog_centered().
Previously, if the editor scale was not 100%, the dialog would not be
the correct size. For example, if the scale was 200%, the dialog would
be tiny and the Create button would not be visible until you resize the
dialog. In the editor, you have to manually scale everything according
to the current scale factor! Do so before popping up the dialog.
Previously you could still interact with the editor even when the dialog was
open. This is inconsistent with other tools like the Project Settings dialog.
Set exclusive to true to prevent this.
Previously, hitting Tab in the description field would insert a tab character.
We do not want tab characters in the description! Set tab_input_mode to false,
which allows pressing Tab to move focus to the Create button.
Make hitting Ctrl+Enter in either of the single-line text fields submit the
form.
Make hitting Esc in the dialog close it unless the copy process is running, just
as if you pressed the (X) in the titlebar.