summaryrefslogtreecommitdiffstats
path: root/scene/gui/popup.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Scene] Add `SceneStringNames::panel`A Thousand Ships2024-05-301-1/+1
|
* Fix Tree and FileSystemList edit popup double events and ESC behavior.bruvzg2024-05-171-2/+10
|
* Use Core/Scene stringnames consistentlykobewi2024-05-131-4/+4
|
* Make handling of rename line-edit popups more robustPedro J. Estébanez2024-05-071-0/+6
|
* Merge pull request #86553 from Koyper/fix_popup_panel_content_scalingRémi Verschelde2024-04-181-2/+3
|\ | | | | | | Fix non-embedded tooltips, popups and dialogs resizing to match Viewport content scale factors != 1.0
| * Fix non-embedded Windows resizing to match Viewport content scale factorKoyper2024-04-171-2/+3
| |
* | Remove `Popup`'s unused "panel" styleMichael Alexsander2024-04-131-2/+0
|/
* Use `Vector*` component-wise `min/max/clamp` functions where applicableA Thousand Ships2024-03-201-2/+1
|
* Update deferred calls to use Callableskobewi2024-01-091-1/+1
|
* Fix internal events not being delivered to some Window typesMarkus Sauermann2023-11-141-2/+1
| | | | | | | | | | `AcceptDialog`, `Popup` and `PopupMenu` no longer subscribe to "window_input" signal, because that is only sent if it is not an internal signal. Instead they receive events in `_input_from_window`. They ensure that the event is also propagated to their super-function, just like previously the signals would be treated.
* Register theme properties with ThemeDBYuri Sizov2023-09-111-16/+11
|
* Support controller input on popup/dialogsRicardo Subtil2023-08-131-2/+1
|
* Fix auto-reparenting logic in the `ProgressDialog`Yuri Sizov2023-05-291-0/+1
| | | | | | * Make sure `Popup` signals are disconnected when unparented. * Remove a fail condition from `Window::is_embedded` when not in tree.
* Use defined key mapping for closing popups and dialogsArman Elgudzhyan2023-05-201-1/+1
| | | | As opposed to hardcoding the escape key. Also removed such hardcoding in a few other places as well as a hardcoded enter key in one of the affected input fields.
* [Editor] Fix editor progress dialog auto closing on ESC press, and on ↵bruvzg2023-02-141-3/+8
| | | | application focus loss.
* Use range iterators in LocalVector loopskobewi2023-01-211-3/+3
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Prevent `Popup`s it the edited scene tree from closing on focus loss. Hide ↵bruvzg2022-10-111-10/+28
| | | | irrelevant `Popup` flags from the editor inspector.
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-20/+20
| | | | change warnings=all to use /W4.
* Add dumb and manual theme caching systems to WindowYuri Sizov2022-09-011-13/+17
|
* Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde2022-08-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTIFICATION_THEME_CHANGED" This reverts commit 4b817a565cab8af648c88cfc7ab6481e86ee3625. Fixes #64988. Fixes #64997. This caused several regressions (#64988, #64997, https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605) which point at a flaw in the current logic: - `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with `NOTIFCATION_THEME_CHANGED` as introduced in #62845. - Some classes use their `THEME_CHANGED` to cache theme items in member variables (e.g. `style_normal`, etc.), and use those member variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE` notification is now deferred, they end up accessing invalid state and this can lead to not applying theme properly (e.g. for EditorHelp) or crashing (e.g. for EditorLog or CodeEdit). So we need to go back to the drawing board and see if `THEME_CHANGED` can be called earlier so that the previous logic still works? Or can we refactor all engine code to make sure that: - `ENTER_TREE` and similar do not depend on theme properties cached in member variables. - Or `THEME_CHANGE` does trigger a general UI update to make sure that any bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE` does arrive for the first time. But that means having a temporary invalid (and possibly still crashing) state, and doing some computations twice which might be heavy (e.g. `EditorHelp::_update_doc()`).
* Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record2022-08-271-2/+1
|
* Single-window mode popups and edited scene windows fixes.bruvzg2022-06-131-10/+1
| | | | | | Fix single-window mode popup not closing when OptionBox is clicked. Fix single-window mode submenus closing when parent menu item, that was used to open it is clicked (using same safe-area logic as platform specific code). Disallow windows that are part of an edited scene from being set as exclusive or popup to prevent it from locking up the editor.
* popup deferred hide suppressed if reopenedderammo2022-05-131-1/+15
| | | | | | | | | popup no longer tries to close itself a second time popup no longer closes after having been reopened fixed bug in RenameDialog not calling base (by inspection) fixes #59181 fixes #60921 reverts #59287
* Remove set_as_minsize()kobewi2022-03-061-4/+0
|
* Improve popup window handling.bruvzg2022-02-251-27/+20
| | | | Add window FLAG_POPUP and a platform specific routines to control popup auto-hiding and event forwarding.
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-11/+18
|
* Revert "Add missing SNAME macro optimization to all theme methods call"Rémi Verschelde2022-02-081-2/+2
| | | | | | | | This reverts commit a988fad9a092053434545c32afae91ccbdfbe792. As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used everywhere but only in critical code paths. For theme methods specifically, it was by design that only getters use `SNAME` and not setters.
* Add missing SNAME macro optimization to all theme methods calljmb4622022-02-061-2/+2
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Use "enum class" for input enumsAaron Franke2021-11-121-1/+1
|
* Fix popup trying to emit a non existing signal when closedHungryProton2021-10-311-2/+0
|
* Merge pull request #51920 from ↵Rémi Verschelde2021-09-231-4/+4
|\ | | | | | | jmb462/missing-sname-macro-optimization-in-some-functions
| * Add missing SNAME macro optimization for StringName in some functionsjmb4622021-08-201-4/+4
| |
* | Add support for internal nodeskobewi2021-08-281-1/+1
|/
* Fix logic for Popup closing when parent is focusedPouleyKetchoupp2021-07-211-0/+1
| | | | | | | The member popped_up is used to avoid closing a Popup before it had a chance to be focused. It wasn't reset properly when the popup is hidden, causing the Popup to close right after showing in some random cases (spotted on X11, might not happen on Windows).
* Optimize StringName usagereduz2021-07-181-3/+3
| | | | | | | | | | | * Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Merge pull request #41851 from EricEzaM/PR/popup-menu-hysteresisRémi Verschelde2020-11-161-1/+13
|\ | | | | Added hysteresis for popup sub-menus
| * Added hysteresis for popup sub-menusEric M2020-11-081-1/+13
| | | | | | | | This adds a small lag effect when opening submenus which allow the user to move directly to an item on the submenu without worrying about avoiding the autohide regions.
* | Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
|/ | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Renamed toplevel to be top_levelDuroxxigar2020-10-011-2/+2
|
* Merge pull request #41456 from nekomatata/x11-fix-popupsRémi Verschelde2020-09-031-27/+41
|\ | | | | Popup fixes for X11 display server
| * Fix popup closed when an ancestor window is focusedPouleyKetchoupp2020-08-221-27/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, only the direct parent were taken into account. Popups like contextual menus could stay open if an ancestor which is not a direct parent was focused. Reproduction steps (any platform): - Select a node in the scene tree - Left click the node to start renaming - Right click to open the copy/paste contextual menu - Left click in the scene tree to deselect the node Also closing popup when focusing out of the application, without waiting for the parent to get focus to do so.
* | PopupMenu rework and enhancementsEricEzaM2020-09-011-0/+22
|/ | | | Many scrolling behaviour improvements and the ability to limit popup size.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-4/+8
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-12/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Reworked tooltips to use the popup system.Juan Linietsky2020-03-261-4/+4
|
* Popups have also been converted to windowsJuan Linietsky2020-03-261-1/+34
| | | | Controls using the old modal API have been replaced to use popups.