summaryrefslogtreecommitdiff
path: root/scene/gui/popup.cpp
AgeCommit message (Collapse)Author
2022-02-08Revert "Add missing SNAME macro optimization to all theme methods call"Rémi Verschelde
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.
2022-02-06Add missing SNAME macro optimization to all theme methods calljmb462
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-11-12Use "enum class" for input enumsAaron Franke
2021-10-31Fix popup trying to emit a non existing signal when closedHungryProton
2021-09-23Merge pull request #51920 from ↵Rémi Verschelde
jmb462/missing-sname-macro-optimization-in-some-functions
2021-08-28Add support for internal nodeskobewi
2021-08-20Add missing SNAME macro optimization for StringName in some functionsjmb462
2021-07-21Fix logic for Popup closing when parent is focusedPouleyKetchoupp
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).
2021-07-18Optimize StringName usagereduz
* 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.
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-11-16Merge pull request #41851 from EricEzaM/PR/popup-menu-hysteresisRémi Verschelde
Added hysteresis for popup sub-menus
2020-11-08Added hysteresis for popup sub-menusEric M
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.
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-10-01Renamed toplevel to be top_levelDuroxxigar
2020-09-03Merge pull request #41456 from nekomatata/x11-fix-popupsRémi Verschelde
Popup fixes for X11 display server
2020-09-01PopupMenu rework and enhancementsEricEzaM
Many scrolling behaviour improvements and the ability to limit popup size.
2020-08-22Fix popup closed when an ancestor window is focusedPouleyKetchoupp
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.
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
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.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-03-26Reworked tooltips to use the popup system.Juan Linietsky
2020-03-26Popups have also been converted to windowsJuan Linietsky
Controls using the old modal API have been replaced to use popups.
2020-03-26Popups are now windows also (broken!)Juan Linietsky
2020-03-26Working multiple window support, including editorJuan Linietsky
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-08-14Merge pull request #31267 from sparkart/fix_optionbutton_offsetRémi Verschelde
Fix Offset with OptionButton Popup
2019-08-14Exposed set_as_minsize to gdscriptFabian
2019-08-12Fix Offset with OptionButton PopupEmmanuel Barroga
Fixes the offset issue with the OptionButton's popup.
2019-07-09Improve the node configuration warning displayHugo Locurcio
- Refer to properties explicitly when possible - When multiple warnings are returned, always separate them by one blank line to make them easier to distinguish - Improve grammar and formatting
2019-07-06Fix editor remaining dimmed after certain actionsBojidar Marinov
Fixes #30368
2019-06-25Fix Popup::popup_centered not centering at the first callGuilherme Felipe
2019-05-28Merge pull request #28454 from homer666/popup-centered-maxsizeRémi Verschelde
Add `popup_centered_clamped()` method to Popup
2019-04-30Add Popup::popup_centered_clamped methodhomer666
- Also replace redundant duplicate code in editor dialogs with calls to popup_centered_clamped()
2019-04-29Make buttons that trigger popups have the same scaleMichael Alexsander Silva Dias
2019-02-13Fix button alignment of Package Installer on OSXNaoto Kondo
This problem occurs only in the HiDPI environment.
2019-01-14Hide visible popups by default if visible when entering tree, unless on ↵Juan Linietsky
editor. Fixes #24737
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-09-07Many fixes to gradient editor, which was pretty broken. Closes #19308Juan Linietsky
2018-06-06Fix #16069, #19292, #19267 and #18940Guilherme Felipe
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-09-27Remove unecessary anchors&margins set causing bad display (sons of containers)Gilles Roudiere
2017-09-22Remove set_area_as_parent_rect and replace it by ↵Gilles Roudiere
set_anchors_and_margins_preset(PRESET_WIDE)
2017-08-27Dead code tells no talesRémi Verschelde
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-24Convert Object::cast_to() to the static versionHein-Pieter van Braam
Currently we rely on some undefined behavior when Object->cast_to() gets called with a Null pointer. This used to work fine with GCC < 6 but newer versions of GCC remove all codepaths in which the this pointer is Null. However, the non-static cast_to() was supposed to be null safe. This patch makes cast_to() Null safe and removes the now redundant Null checks where they existed. It is explained in this article: https://www.viva64.com/en/b/0226/
2017-08-21Merge pull request #10351 from neikeq/enums-are-for-the-weakJuan Linietsky
ClassDB: Provide the enum name of integer constants
2017-08-20ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry