summaryrefslogtreecommitdiffstats
path: root/scene/gui/option_button.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
| |
* | Fixes differences between docs and item_selected and item_focused signals in ↵azagaya2019-02-111-0/+7
| | | | | | | | | | | | optionbutton Description in docs about item_selected and item_focused signals in optionbutton is fixed to match the real behaviour. Also, get_item_index function is added.
* | Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+1
| | | | | | 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.
* Visual Shaders are back.Juan Linietsky2018-07-141-1/+1
|
* Add default paramater value for OptionButton::add_icon_itemGeequlim2018-05-081-1/+1
|
* Add support for radio-looking items with iconPedro J. Estébanez2018-04-091-1/+1
| | | | | | Letting users of `PopupMenu` use them. `OptionButton` was one of those interested and is updated in this commit. Fixes #18063.
* Use radio-button-like menu entries where applicablePedro J. Estébanez2018-03-271-1/+1
|
* Add item_focused signal to OptionButtonFabio Alessandrelli2018-02-231-0/+7
| | | | And id_focused to Popupmenu.
* Fixes OptionButton selection index being reset to zero at instanciationAlexander Alekseev2018-02-191-1/+2
| | | | | Bug: engine tries to set selected item before items were added during save scene/run project, because of wrong properties order. Fixes #10213.
* Bind many more properties to scriptsBojidar Marinov2018-01-121-1/+1
| | | | | | | Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | 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.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Added "get_popup" method for OptionButton and minor changes.Michael Alexsander Silva Dias2017-12-251-36/+41
|
* fix certain popup close clicks with popup buttonsBernhard Liebl2017-12-101-0/+1
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|