summaryrefslogtreecommitdiff
path: root/scene/gui/option_button.cpp
AgeCommit message (Collapse)Author
2022-05-17Fix errors and improve UX relating to new animation librariesSnailRhymer
- 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.
2022-04-23Rename theme properties to include underscoresFireForge
- 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
2022-04-11Implement Animation Librariesreduz
* 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.
2022-03-19Hide text and icon properties in OptionButtonkobewi
2022-03-17Add item tooltip access to OptionButtonHaoyu Qiu
2022-03-04Add optional constructor arguments to more Control nodesHugo Locurcio
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.
2022-02-15Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde
2022-02-08Merge pull request #57692 from YeldhamDev/popping_optionsRémi Verschelde
2022-02-06Make popups from `MenuButton`, `OptionButton`, and submenus obey the layout ↵Michael Alexsander
direction
2022-02-06Enhancements and fixes for `OptionButton` and `PopupMenu`Michael Alexsander
2022-02-03Merge pull request #56992 from YeldhamDev/smarter_popmenu_focusRémi Verschelde
2022-01-28Make various improvements to OptionButtoneikobear
- 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.
2022-01-25Make popup menus focus items automatically when not using the mouseMichael Alexsander
2022-01-15OptionButton::pressed(): give focus to selectedRicardo Buring
2022-01-07Fix missing arg name in bindings for GDExtension APIRémi Verschelde
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-21Implement property array for OptionButtonkobewi
2021-12-09align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke
2021-11-03Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio
This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-10-26Add focus font color to Button and derivativesYuri Sizov
2021-09-17Merge pull request #49376 from menip/OptionButtonFixRémi Verschelde
2021-08-30Make Color Picker, Menu Button, Option Button consider camera position scale ↵menip
for popup position.
2021-08-28Add support for internal nodeskobewi
2021-07-18Optimize StringName usagereduz
* 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.
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-01-24Change themes *_color_* to *_*_colorMarcel Admiraal
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
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-12-23Rename Control margin to offsetMarcel Admiraal
2020-11-26[Complex Text Layouts] Refactor Font class, default themes and controls to ↵bruvzg
use Text Server interface. Implement interface mirroring. Add TextLine and TextParagraph classes. Handle UTF-16 input on macOS and Windows.
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-05-17Allow searching with keyboard input by default in PopupMenuHugo Locurcio
See discussion in https://github.com/godotengine/godot-proposals/issues/43.
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: Enforce separation line between function definitionsRémi Verschelde
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.
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-10Fix OptionButton docs godotengine#36803Zak Grumbles
* item_selected and item_focused docs incorrectly had 'id' as the parameter. Changed to 'index'. * Fix parameter name in ADD_SIGNAL callin code.
2020-03-26Popups are now windows also (broken!)Juan Linietsky
2020-02-28Signals: Manually port most of remaining connect_compat usesRémi Verschelde
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).
2020-02-28Signals: Port connect calls to use callable_mpRémi Verschelde
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.)
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-11Texture refactorJuan Linietsky
-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
2020-01-27Fixes OptionButton min sizeHaoyu Qiu
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-12-28Make OptionButton itself take into account the arrow margin instead of ↵Michael Alexsander
relying on the theme
2019-09-05Fixes OptionButton Not Updating if Current Selection Already SelectedEmmanuel Barroga
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.
2019-07-29Remove useless variable and line in OptionButtonNilsIrl
2019-07-29Change if to switch in OptionButtonNilsIrl
2019-07-01Remove unnecessary code and add some error explanationsqarmin
2019-06-09Connect OptionButton selection to menu's "index_pressed" signalJames Buck
Simplifies code and fixes bug where only the first item with a given ID could be selected.
2019-05-31Improvements to incremental searchTomasz Chabora
2019-05-09Change "ID" to lowercase "id"Aaron Franke
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.