summaryrefslogtreecommitdiffstats
path: root/scene/gui/option_button.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add optional constructor arguments to more Control nodesHugo Locurcio2022-03-041-1/+2
| | | | | | | | | This can be used to make editor code more compact. However, as of writing, these constructor arguments cannot be used from the scripting API. This was already provided for Label and CheckBox, but it was missing for other Control nodes where it made sense to provide a default value.
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-0/+2
|
* Merge pull request #57692 from YeldhamDev/popping_optionsRémi Verschelde2022-02-081-13/+31
|\
| * Enhancements and fixes for `OptionButton` and `PopupMenu`Michael Alexsander2022-02-061-13/+31
| |
* | Make popups from `MenuButton`, `OptionButton`, and submenus obey the layout ↵Michael Alexsander2022-02-061-1/+4
|/ | | | direction
* Merge pull request #56992 from YeldhamDev/smarter_popmenu_focusRémi Verschelde2022-02-031-1/+8
|\
| * Make popup menus focus items automatically when not using the mouseMichael Alexsander2022-01-251-1/+8
| |
* | Make various improvements to OptionButtoneikobear2022-01-281-18/+30
|/ | | | | | - Allow OptionButton selection to be set to -1 to signify no selection, both via API and in the editor. - Reset OptionButton selection to -1 when the selected item has been removed. - Fully convert PopupMenu to a zero-based ID system, which improves an inconsistency in generated IDs when making new items in the editor.
* OptionButton::pressed(): give focus to selectedRicardo Buring2022-01-151-0/+1
|
* Fix missing arg name in bindings for GDExtension APIRémi Verschelde2022-01-071-1/+2
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Implement property array for OptionButtonkobewi2021-12-211-38/+67
|
* align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke2021-12-091-1/+1
|
* Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio2021-11-031-1/+1
| | | | | This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
* Add focus font color to Button and derivativesYuri Sizov2021-10-261-1/+5
|
* Merge pull request #49376 from menip/OptionButtonFixRémi Verschelde2021-09-171-1/+1
|\
| * Make Color Picker, Menu Button, Option Button consider camera position scale ↵menip2021-08-301-1/+1
| | | | | | | | for popup position.
* | Add support for internal nodeskobewi2021-08-281-1/+1
|/
* Optimize StringName usagereduz2021-07-181-22/+22
| | | | | | | | | | | * 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.
* Initialize class variables with default values in scene/ [2/2]Rafał Mikrut2021-02-091-1/+0
|
* Change themes *_color_* to *_*_colorMarcel Admiraal2021-01-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Changed: font_color_accel -> font_accelerator_color font_color_bg -> font_unselected_color font_color_disabled -> font_disabled_color font_color_fg -> font_selected_color font_color_hover -> font_hover_color font_color_hover_pressed -> font_hover_pressed_color font_color_pressed -> font_pressed_color font_color_readonly -> font_readonly_color font_color_selected -> font_selected_color font_color_shadow -> font_shadow_color font_color_uneditable -> font_uneditable_color icon_color_disabled -> icon_disabled_color icon_color_hover -> icon_hover_color icon_color_hover_pressed -> icon_hover_pressed_color icon_color_normal -> icon_normal_color icon_color_pressed -> icon_pressed_color Also includes: font_outline_modulate -> font_outline_color tab_fg -> tab_selected tab_bg -> tab_unselected
* 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 🎆
* Rename Control margin to offsetMarcel Admiraal2020-12-231-6/+6
|
* [Complex Text Layouts] Refactor Font class, default themes and controls to ↵bruvzg2020-11-261-5/+24
| | | | | | | | use Text Server interface. Implement interface mirroring. Add TextLine and TextParagraph classes. Handle UTF-16 input on macOS and Windows.
* 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
* Allow searching with keyboard input by default in PopupMenuHugo Locurcio2020-05-171-3/+0
| | | | See discussion in https://github.com/godotengine/godot-proposals/issues/43.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-11/+22
| | | | | 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/+5
| | | | | | | | | | | | | | | | | | | | | | | 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-39/+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.
* Fix OptionButton docs godotengine#36803Zak Grumbles2020-04-101-2/+2
| | | | | | * item_selected and item_focused docs incorrectly had 'id' as the parameter. Changed to 'index'. * Fix parameter name in ADD_SIGNAL callin code.
* Popups are now windows also (broken!)Juan Linietsky2020-03-261-20/+19
|
* Signals: Manually port most of remaining connect_compat usesRémi Verschelde2020-02-281-1/+2
| | | | | | | | It's tedious work... Some can't be ported as they depend on private or protected methods of different classes, which is not supported by callable_mp (even if it's a class inherited by the current one).
* Signals: Port connect calls to use callable_mpRémi Verschelde2020-02-281-5/+2
| | | | | | | | | Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-3/+3
| | | | objects and made them default.
* Texture refactorJuan Linietsky2020-02-111-5/+5
| | | | | | | | -Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
* Fixes OptionButton min sizeHaoyu Qiu2020-01-271-1/+8
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Make OptionButton itself take into account the arrow margin instead of ↵Michael Alexsander2019-12-281-2/+12
| | | | relying on the theme
* Fixes OptionButton Not Updating if Current Selection Already SelectedEmmanuel Barroga2019-09-051-0/+6
| | | When the option button's current selection is updated to a different text/icon, the selected option does not update until you unselect the option and then select it again.
* Remove useless variable and line in OptionButtonNilsIrl2019-07-291-1/+0
|
* Change if to switch in OptionButtonNilsIrl2019-07-291-30/+33
|
* Remove unnecessary code and add some error explanationsqarmin2019-07-011-1/+1
|
* Connect OptionButton selection to menu's "index_pressed" signalJames Buck2019-06-091-19/+2
| | | | | Simplifies code and fixes bug where only the first item with a given ID could be selected.
* Improvements to incremental searchTomasz Chabora2019-05-311-0/+1
|
* Change "ID" to lowercase "id"Aaron Franke2019-05-091-8/+8
| | | | Reasoning: ID is not an acronym, it is simply short for identification, so it logically should not be capitalized. But even if it was an acronym, other acronyms in Godot are not capitalized, like p_rid, p_ip, and p_json.
* Make buttons that trigger popups have the same scaleMichael Alexsander Silva Dias2019-04-291-3/+3
|
* Merge pull request #28205 from mikolasan/26937-hide-popup-menuRémi Verschelde2019-04-291-0/+5
|\ | | | | Hide popup menu when OptionButton is hidden
| * Fix popup visibility for OptionButton, MenuButton and ColorPickerButtonNikolay Neupokoev2019-04-221-0/+5
| | | | | | | | | | | | Hide popup when its button or another parent object is hidden Fixes #26937
* | Merge pull request #22301 from YeldhamDev/button_popup_highlightRémi Verschelde2019-04-251-0/+2
|\ \ | |/ |/| Enable toggle behaviour for buttons that trigger popups
| * Enable toggle behaviour for buttons that trigger popupsMichael Alexsander Silva Dias2018-12-111-0/+2
| |