summaryrefslogtreecommitdiff
path: root/scene/gui/base_button.cpp
AgeCommit message (Collapse)Author
2022-08-24Merge pull request #64635 from YeldhamDev/menu_buttons_popup_fixRémi Verschelde
Make `Menu/OptionButton` item auto-highlight behave better
2022-08-22Replace Array return types with TypedArraykobewi
2022-08-19Make `Menu/OptionButton` item auto-highlight behave betterMichael Alexsander
2022-05-19Use range iterators for RBSet in most casesAaron Record
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-04-05[Input] Add extra `shortcut_input` input processing step to process Unicode ↵bruvzg
character input with Alt / Ctrl modifiers, after processing of shortcuts.
2022-03-07Fix typo in BaseButton shortcut context methodsHugo Locurcio
2022-02-15Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde
2022-02-03Remove get_focus_owner() from Control, replaced by ↵Gilles Roudière
get_viewport()->gui_get_focus_owner()
2022-01-28Improve some signal bindings to use specific `Object` subtypesRémi Verschelde
2022-01-25Allow unsetting `shortcut_context`.bruvzg
2022-01-23BaseButton: Rename `pressed` property to `button_pressed`Rémi Verschelde
This fixes a conflict with the `pressed` signal. The new name is temporary and only intended to solve the conflict for upcoming alpha builds. Discussions are still ongoing regarding the BaseButton API and how to rename and refactor more of its properties, signals and methods to have a clearer API in 4.0.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-21Fix BaseButton's localization for tooltip with shortcutZae
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-11-12Use "enum class" for input enumsAaron Franke
2021-08-23Entirely removes BIND_VMETHOD in favor of GDVIRTUALreduz
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-22Replace BIND_VMETHOD by new GDVIRTUAL syntaxreduz
* New syntax is type safe. * New syntax allows for type safe virtuals in native extensions. * New syntax permits extremely fast calling. Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`. These will require API rework on a separate PR as they work different than the rest of the functions. Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
2021-08-15command palette improvementsBhuvan Vemula
2021-08-09Added EditorCommandPaletteBhuvan Vemula
2021-08-05Shortcut: Rename `shortcut` property to `event`Rémi Verschelde
Having a property which has the same name as its class leads to confusing situations (e.g. `BaseButton` has a `shortcut` property of type `Shortcut` which has a `shortcut` property of type `InputEvent`). Also renames `is_event` to `matches_event`, and `is_valid` to `has_valid_event` to better reflect what the methods check.
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-07-13Add set_pressed_no_signal method to BaseButtonkobewi
2021-06-21Rename `is_a_parent_of()` to `is_ancestor_of()`Lightning_A
2021-06-09Merge pull request #49155 from ↵Rémi Verschelde
winterpixelgames/button-pressed-during-button-up-signal Emit button_up signal after setting pressed to false.
2021-06-09Merge pull request #47280 from winterpixelgames/focus_doesnt_change_hoverRémi Verschelde
Dont Change Hovering during Control Focus Events
2021-05-27Emit button_up signal after setting pressed to false.Jason Knight
2021-05-06Adds a pressed signal to ButtonGroupGilles Roudière
2021-04-05Fix crashes in *_input functionsRafał Mikrut
2021-03-22Removed the alteration of status.hovering during Focus Enter and Focus Exit ↵Jason Knight
events. This is incorrect and not fully implemented, and results in inconsistency in the UI and in the hovering variable.
2021-02-10Removed _change_notifyreduz
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
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-30Exposed shortcut_context property to scripting and added documentation.Eric M
I didn't expose this as a property or add documentation in the original PR #42109.
2020-11-23Implement new shortcuts system.Eric M
unhandled_key_input changed to unhandled_button_input. Controls can set a 'shortcut_context' which they can then use to determine if their shortcuts should be triggered or not, based on if the viewport's focused GUI control is a child of their 'shortcut context'.
2020-11-23Added accept_event() calls for SceneTreeDock and BaseButtonEric M
2020-10-24Rename button group property to button_groupAaron Franke
2020-10-13Remove redundant property "enabled_focus_mode"FIF15
Fixes #41529.
2020-09-15Merge pull request #41776 from EricEzaM/PR/tooltip-bugfixesRémi Verschelde
Tooltip flickering and targeting fixes.
2020-09-15Tooltip flickering and targeting fixes.Eric M
2020-09-09Rename ShortCut to Shortcut which is more grammatically correctHugo Locurcio
See https://github.com/godotengine/godot/issues/16863#issuecomment-685236980.
2020-09-07Use != 0 instead of > 0 when checking bit mask.Marcel Admiraal
2020-07-02Uncheck 'Pressed' if toggle_mode is uncheckedgeorgikoemdzhiev
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: 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-04-02Replace NULL with nullptrlupoDharkael
2020-03-26Open sub-windows as embedded if the OS does not support themJuan Linietsky
2020-03-26Added a Window node, and made it the scene root.Juan Linietsky
Still a lot of work to do.
2020-01-09Fixes BaseButton not triggering the "pressed" signal on "Button Press" ↵OverloadedOrama
Action Mode This should fix #34935
2020-01-03Fixes button flashing when releasing mousebutton outsidefossegutten