summaryrefslogtreecommitdiffstats
path: root/scene/gui/option_button.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Register theme properties with ThemeDBYuri Sizov2023-09-111-19/+17
|
* Merge pull request #80203 from WhalesState/Dev2Rémi Verschelde2023-08-171-0/+22
|\ | | | | | | Add shortcut handling to `OptionButton`
| * Add shortcut handling to OptionButtonMounir Tohami2023-08-031-0/+22
| |
* | Fix OptionButton min size when fit longest item is enabledHaoyu Qiu2023-08-071-2/+2
|/
* Update OptionButton min size when disabling Fit to Longest ItemHaoyu Qiu2023-07-151-7/+5
|
* Fix invalid minimum size for translated messages in option buttonFlorian Kothmeier2023-06-291-1/+1
|
* Update size or size cache when toggling `expand_icon` in `Button`Rindbee2023-05-171-7/+7
| | | | | | When the `expand_icon` is switched, the size cache can be updated to solve the issue that the cache cannot be updated when the `OptionButton` is enabled with `fit_to_longest_item`.
* Merge pull request #72028 from kilojool/option_button_reselectionRémi Verschelde2023-04-031-1/+12
|\ | | | | | | OptionButton: allow reselection of selected item
| * OptionButton: allow reselection of selected itemkilojool2023-01-251-1/+12
| |
* | Auto translate popup menus of MenuButton and OptionButtonHaoyu Qiu2023-03-271-1/+4
| | | | | | | | | | | | Currently, `auto_translate` property of a `MenuButton` or `OptionButton` won't affect its popup menu. It's okay if you want to auto translate, but requires extra setup if you don't.
* | Fix Screen-Transform missing in Button Size in OptionButton::show_popupMarkus Sauermann2023-02-061-3/+5
|/ | | | | The button size is affected by the screen transform, which was previously not taken into consideration.
* Removed unused property hints and `Object::get_translatable_strings()`Juan Linietsky2023-01-091-4/+0
| | | | | | | | | | | | | | | | * Remove unused `EditorPropertyMember` and related hints, previouly used by VisualScript. Such logic should be implemented in the VS module itself. * As the above broke compatibility with the VS module, clean up the other hacks that were still in core in support of VisualScript. * `PROPERTY_USAGE_INTERNATIONALIZED` was only used in Object's `get_translatable_strings()`, which is a legacy function not used anywhere. So both are removed. * Reordered some usage flags after the above removal to minimize the diff. * General clean up. Fixes #30203. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | 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".
* Fix position and size of OptionButton PopupMenuMarkus Sauermann2022-11-121-3/+3
| | | | | Use the correct Transform2D (get_global_transform_with_canvas) for position and size.
* Add call_deferred() method to Callablekobewi2022-11-041-1/+1
|
* Improve MenuButton and OptionButtonEricEzaM2022-10-031-26/+35
| | | | | * MenuButton + OptionButton: Add method `show_popup()` which performs required popup setup before showing (prefer use of this over `get_popup()->popup()`, otherwise GH #66308 occurs) * MenuButton: Ensure that the menu can be opened with a shortcut, if one is set for the button. (GH #66403). Ensure that popupmenu item shortcuts are checked first before the MenuButton shortcut.
* Rename `PopupMenu`'s `set/get_current_index()` to `set/get_focused_item()`Michael Alexsander2022-09-061-2/+2
|
* Add a lifecycle method for manual theme item caching to ControlYuri Sizov2022-09-011-25/+44
|
* Fix some corner cases in the `Menu/OptionButton` item auto-highlightMichael Alexsander2022-08-281-4/+16
|
* Merge pull request #64768 from bruvzg/popups_hide_if_visibleRémi Verschelde2022-08-261-0/+5
|\
| * Hide MenuButton / OptionButton popup on click if it's already visible.bruvzg2022-08-231-0/+5
| |
* | Merge pull request #64635 from YeldhamDev/menu_buttons_popup_fixRémi Verschelde2022-08-241-2/+1
|\ \ | |/ |/| Make `Menu/OptionButton` item auto-highlight behave better
| * Make `Menu/OptionButton` item auto-highlight behave betterMichael Alexsander2022-08-191-2/+1
| |
* | Merge pull request #64218 from Rindbee/fix-button-minimum-size-calculationRémi Verschelde2022-08-221-1/+1
|\ \
| * | Fix case where `h_separation` might not work in `Button`Rindbee2022-08-121-1/+1
| |/ | | | | | | | | | | This patch mainly solves two things: 1. The typo of `h_separation`; 2. Negative values of `h_separation` will be treated as `0` when used, to prevent the button's minimum `width` from being reduced by `h_separation`.
* / Make `_validate_property` a multilevel methodYuri Sizov2022-08-221-3/+3
|/
* Add missing properties to default themekobewi2022-08-111-0/+3
|
* Add tests for empty/unnamed arguments to ClassDB, Variant, GDScriptYuri Sizov2022-08-081-1/+1
|
* Add fit_to_longest_item to OptionButtonkobewi2022-08-021-1/+58
|
* Remove Signal connect bindsJuan Linietsky2022-07-291-1/+1
| | | | | Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
* Fix errors and improve UX relating to new animation librariesSnailRhymer2022-05-171-1/+1
| | | | | | | | | | | | | | | - Fix a bug causing an error message when a scene containing an AnimationPlayer with a reset track is saved, by correctly referencing the temporary "default" library. - Make library dropdown in new animation window assign correct library when creating an animation. - Similarly allow choice of library when duplicating animation. - Make library dropdown default to library of currently selected animation. - Make library dropdown show when exactly one library exists, and it isn't [Global]. Include [Global] on the dropdown in this case (will be newly created if dialog is confirmed). - When appending (x) to avoid New Anim name collisions, correctly check target library instead of [Global]. - Add parentheses when appending x when duplicating animations in the library editor, for consistency. - Change titles and prompts to be distinct in name/rename/duplicate dialiogs. - Fix bug in OprionButton.get_selectable_item(true) when last is not selectable. - Fix issues where animation wasn't found on deletion/rename by correctly prepending library name. - Remove an extraneous print_line from animation_track_editor. - Add messages to errors when an animation isn't found.
* Rename theme properties to include underscoresFireForge2022-04-231-1/+1
| | | | | | | | | | | | | | - check_vadjust -> check_v_adjust - close_h_ofs -> close_h_offset - close_v_ofs -> close_v_offset - commentfocus -> comment_focus - hseparation -> h_separation - ofs -> offset - selectedframe -> selected_frame - state_machine_selectedframe -> state_machine_selected_frame - table_hseparation -> table_h_separation - table_vseparation -> table_v_separation - vseparation -> v_separation
* Implement Animation Librariesreduz2022-04-111-7/+40
| | | | | | | | | | | | * Instead of containing single animations, AnimationPlayer now contains libraries. * Libraries, in turn, contain the animations. This paves the way for implementing the possibility of importing scenes as animation libraries, finally allowing to import animations separate from the 3D models. Missing (will be done on separate PRs): * Make it possible to import scenes (dae/fbx/gltf) as animation libraries. * Make it possible for AnimationTree to import animation libraries on its own, so it does not rely on AnimationPlayer for everything.
* Hide text and icon properties in OptionButtonkobewi2022-03-191-0/+6
|
* Add item tooltip access to OptionButtonHaoyu Qiu2022-03-171-0/+10
|
* 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
|