summaryrefslogtreecommitdiffstats
path: root/scene/gui/option_button.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@cb411fa960f0b7fdbd97dcdb4c90f9346360ee0eSpartan3222024-11-121-1/+1
|\
| * Merge pull request #97890 from timothyqiu/id-focusedThaddeus Crews2024-11-121-1/+1
| |\ | | | | | | | | | Fix `PopupMenu.id_focused` signal using index as ID
| | * Fix `PopupMenu.id_focused` signal using index as IDHaoyu Qiu2024-10-071-1/+1
| | |
* | | Merge commit godotengine/godot@8004c7524fb9f43425c4d6f614410a76678e0f7cSpartan3222024-10-301-3/+3
|\| |
| * | Rename internal Button icon to button_icon to match exposed methodsAaron Franke2024-10-291-3/+3
| |/
* | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Always store ID of PopupMenu itemskobewi2024-08-201-1/+1
|
* Fix a bunch of orphan StringName errors at ProjectSettings/Editor exitYuri Rubinsky2024-07-091-0/+1
|
* [Scene] Add `SceneStringNames::item_selected`A Thousand Ships2024-06-191-1/+1
|
* Improve button min. size calculation.bruvzg2024-05-161-1/+1
|
* Fix PropertyListHelper::_get_property returning a valid value even if an ↵Gilles Roudière2024-05-101-0/+1
| | | | | | index is outside the array valid indices Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
* Add PropertyListHelper in all simple caseskobewi2024-04-111-46/+18
|
* Add a `h_separation` between icons in `CheckButton`/`CheckBox`风青山2024-02-211-2/+0
| | | | | | | | | | Previously, the `h_separation` between internal elements and custom elements was added when `text` was not empty. That is, this `h_separation` does not exist when there is a valid custom `icon` but `text` is empty. Now, the `h_separation` between the internal element and the custom element is added when the internal element and any custom element exist (both width are greater than `0`).
* Merge pull request #88145 from Ratamacue9112/tweak-option-button-property-orderRémi Verschelde2024-02-171-3/+15
|\ | | | | | | Tweak property order in the inspector for OptionButton
| * Tweak property order in the inspector for OptionButtonRatamacue91122024-02-171-3/+15
| |
* | Make auto translation inheritableMichael Alexsander2024-02-151-4/+1
|/
* Make the drawing logic clearer in `Button`Rindbee2024-01-181-1/+3
| | | | | | | | | | | The drawing logic follows the calculation logic in `Button::get_minimum_size`. According to the order of `stylebox`, `icon`, and `text`, and follow properties such as alignment mode, to fill the display space of the button. Add a `Button::_set_h_separation_is_valid_when_no_text` for Button derived classes (like `OptionButton`) that expects a `h_separation` between `icon` and theme icon even if the `text` is empty.
* Add const references detected by clang-tidyWilson E. Alvarez2023-12-161-2/+2
|
* 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.