summaryrefslogtreecommitdiff
path: root/scene/gui/base_button.cpp
AgeCommit message (Collapse)Author
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
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-07-20Changed some code showed in LGTM and Coverageqarmin
2019-06-20Fixed shortcut events in BaseButton (now acts the same as ui_accept action)PouleyKetchoupp
2019-06-12BaseButton: Make shortcuts call virtual methodsRémi Verschelde
When buttons are not in Toggle Mode, shortcuts used to only trigger the `pressed` signal, without calling the `_pressed` virtual method, contrarily to what happens when you click the button. For Toggle Mode buttons, it did call the `_toggled` virtual method together with emitting the `toggled` signal *twice*. This commit harmonizes it all and makes shortcuts behave the same as mouse clicks or `ui_accept`, for both toggle and non-toggle modes. Fixes #29604.
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-05-01Merge pull request #25453 from nekomatata/button-keep-pressed-optionRémi Verschelde
Add option to keep button pressed when moving cursor outside while pressing
2019-04-30Merge pull request #27796 from Leytak/patch-2Rémi Verschelde
Reset button state on exit tree
2019-04-08Small fixes, mostly dupicated codeqarmin
2019-04-08Reset button state on exit treeAlexey Kashlakov
Steps to reproduce a bug: 1) Hold / hover the button 2) Remove it (or parent node) from the tree 3) When we return the button back to the tree, it's pressed / hover
2019-04-03Option for BaseButton to keep button down when moving the pointer outside ↵PouleyKetchoupp
while pressed
2019-01-21ButtonGroup.get_pressed_button bugfix, fixes issue #25057Kraus
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-11-08-Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky
-Removed one and zero hints for properties, replaced by default value
2018-10-06Remove redundant "== false" codeAaron Franke
Some of this code has been re-organized. f
2018-10-02Merge pull request #22062 from Leytak/patch-1Rémi Verschelde
Discard button pressing flags on disable
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-09-14Discard button pressing flags on disableAlexey Kashlakov
Is it a bug? 1) Click the button and hold 2) Disable it (for example I bind this action on keyboard) 3) Release the mouse and move it outside the button 4) Enable the button 5) It's still pressed, but shouldn't
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-08-24Make some debug prints verbose-only, remove othersRémi Verschelde
2018-05-07Merge pull request #17451 from Goutte/feat-base-button-maskJuan Linietsky
Allow configuration of which mouse buttons the BaseButton responds to
2018-04-10Merge pull request #17081 from endragor/no-press-when-scrollRémi Verschelde
Make Button not emit press when container is scrolled
2018-04-09Make BaseButton not emit press when container is scrolledRuslan Mustakov
This fixes the problem described in #13996 in a proper way. This also adds "deadzone" property to ScrollContainer. It can be used on mobile, where taps are not as precise as mouse clicks. Player could slightly move their finger when tapping, in which case we still want the button to be pressed rather than the container to be scrolled.
2018-03-13Add a binary mask to allow configuration of which mouse buttons the ↵Goutte
BaseButton will respond to.
2018-03-05Fix BaseButton not always calling _pressed()bncastle
Fix "ui_accept" action in BaseButton.cpp not calling _pressed() func in GDScript
2018-02-162D editor GUI input rework. Changes are:Gilles Roudiere
- The input handling is done into several distinct functions, and the code is more consistent. - The actions' history is more precise ("Edited CanvasItem" is now "Rotated CanvasItem","Moved CanvasItem",etc...) - Fixed a little bug about input key events not forwarded correctly to plugins - IK is followed by default when you move a bone node, the alt-key allow you to move it normally
2018-01-28Allow focus on disabled buttonsHein-Pieter van Braam
This behavior better matches other gui toolkits. A selected disabled button still can't be interacted with but it can now be selected. This seems to be what QT and GTK do also. This fixes #16131
2018-01-09Fix signal arguments shadowing member variablesRémi Verschelde
Fixes #10212.
2018-01-06Remove button from button_group when freevolzhs
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.