summaryrefslogtreecommitdiff
path: root/scene/gui/base_button.h
AgeCommit message (Collapse)Author
2023-01-13Button shortcuts no longer "press" the Button.Juan Linietsky
* Button shortcuts were treated as generic input events on buttons. This means that to activate a button shortcut you had to press and release. * This logic is removed and now shortcuts always activate on press. * This makes the editor feel more responsive and solves problems related to this behavior. Fixes #45033 and possibly others.
2023-01-09Fix unpressable buttonsDanil Alexeev
2023-01-08Use BitField<> in core type masksJuan Linietsky
* All core types masks are now correctly marked as bitfields. * The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks. * Most bitmask operations replaced by functions in BitField<> * Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is. * Documentation and API dump updated to reflect bitfields in core types.
2023-01-05One Copyright Update to rule them allRémi Verschelde
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".
2022-12-22Add configuration warning when ButtonGroup is used with non-toggleable buttonsMarkus Sauermann
Also fix ambiguous documentation of ButtonGroup.
2022-10-20Make `BaseButton` Shortcut feedback togglableGeorge L. Albany
2022-10-13Move Shortcut Context to Control and ensure that `shortcut_input` adheres to ↵Eric M
contexts. Also ensure that controls with no context are only triggered AFTER nodes which do have a context.
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-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
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-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker
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-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-07-13Add set_pressed_no_signal method to BaseButtonkobewi
2021-03-23Rename ButtonList enum and members to MouseButtonAaron Franke
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-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-10-13Remove redundant property "enabled_focus_mode"FIF15
Fixes #41529.
2020-09-09Rename ShortCut to Shortcut which is more grammatically correctHugo Locurcio
See https://github.com/godotengine/godot/issues/16863#issuecomment-685236980.
2020-07-10Add override keywords.Marcel Admiraal
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-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-12Remove redundant author doc commentsIAmActuallyCthulhu
2019-06-20Merge pull request #25573 from nekomatata/button-shortcut-fixRémi Verschelde
Fixed shortcut events in BaseButton (now acts the same as ui_accept action)
2019-06-20Fixed shortcut events in BaseButton (now acts the same as ui_accept action)PouleyKetchoupp
2019-06-19Made use of semicolons more consitent, fixed formattingJohnJLight
2019-05-29Fix BaseButton not emitting signal with virtual functionvolzhs
Fix #29258
2019-05-21Refactor BaseButton event handlingvolzhs
also _toggled() function and "toggled" signal called when unpressed by ButtonGroup
2019-04-03Option for BaseButton to keep button down when moving the pointer outside ↵PouleyKetchoupp
while pressed
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-14Expose ButtonGroup's "get_buttons()" to GDScriptMichael Alexsander Silva Dias
2018-11-19BaseButton: add shortcut_in_tooltiplupoDharkael
This flag disables the input related information in the tooltip. It is exposed as a member variable in gdscript.
2018-09-24Added hover_pressed style to CheckBox and CheckButtonDualMatrix
Added hover_pressed style to CheckBox and CheckButton. If no style is defined for this property it will default to the pressed property.
2018-03-13Add a binary mask to allow configuration of which mouse buttons the ↵Goutte
BaseButton will respond to.
2018-01-18Fix typos in code and docs with codespellRémi Verschelde
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
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-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-05-20Removal of InputEvent as built-in Variant type..Juan Linietsky
this might cause bugs I haven't found yet..
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
2017-03-05A Whole New World (clang-format edition)Rémi Verschelde
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
2017-01-13Renamed button functions to be more verboes, same with Range unit value -> ratioJuan Linietsky