summaryrefslogtreecommitdiffstats
path: root/scene/gui/button.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix button icon_color_disabled alpha channelmashumafi2022-01-301-3/+2
|
* Improve locale detection.bruvzg2022-01-181-1/+1
| | | | | Use separate language, script and country lists. Add locale selection dialog and property hint.
* Merge pull request #55225 from bruvzg/fix_ligature_cursor_and_ot_featuresRémi Verschelde2022-01-101-3/+3
|\
| * [TextServer] Improve ligature cursor handling.bruvzg2022-01-091-3/+3
| | | | | | | | | | | | Fix mid-grapheme hit test. Fix OpenType features property handling, add default features override option. Enable mid-grapheme cursor by default.
* | Fix button multiline text alignment.bruvzg2022-01-091-0/+2
|/
* Merge pull request #54441 from ↵Rémi Verschelde2022-01-051-3/+2
|\ | | | | | | Geometror/checkbutton-checkbox-font-hover-pressed-color
| * Fix CheckButton and CheckBox font hover pressed colorHendrik Brucker2021-10-311-3/+2
| | | | | | | | Co-authored-by: Kjetil Fosse <kjetil.fosse@outlook.com>
* | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | | | | | Happy new year to the wonderful Godot community!
* | Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-2/+2
| | | | | | | | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* | align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke2021-12-091-43/+40
| |
* | Rename minimum_size_changed() methodkobewi2021-12-061-7/+7
|/
* Add focus font color to Button and derivativesYuri Sizov2021-10-261-3/+12
|
* Fix missing argument names in bindingsRémi Verschelde2021-10-091-10/+10
| | | | | | While at it, tweak some boolean setters to use `p_enabled` for the bool. Also renames `draw_minimap()` to `set_draw_minimap()`.
* Add `auto_translate` toggle for automatic translationMichael Alexsander2021-07-291-2/+2
|
* Optimize StringName usagereduz2021-07-181-57/+57
| | | | | | | | | | | * 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.
* Add alignment options to icons on buttons.jitspoe2021-06-291-54/+83
| | | | | | They can now be centered and right-aligned. Fixes #11380.
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-1/+1
|
* Tweak dozens of editor property hints for consistencyHugo Locurcio2021-05-251-1/+1
| | | | | | - Update Viewport MSAA property hints to match the currently exposed values. - Add some performance hints to property hints.
* Add preview Sun and Environmentreduz2021-02-221-0/+5
| | | | | | | | | * Adds both a preview sun and preview environment to the 3D editor. * They are valid as long as a DirectionalLight3D and WorldEnvironment are not in the scene. * If any is added to the scene, the respective preview is disabled. * Changed WorldEnvironment to better handle multiple node versions. * Added a function in SceneTree to get the first node in a group. * Fixed button minimum size to also consider font height if no text is there, this broke with the TextSever PR.
* Removed _change_notifyreduz2021-02-101-4/+1
| | | | | | -For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
* Initialize class variables with default values in scene/ [2/2]Rafał Mikrut2021-02-091-9/+1
|
* Use integer coordinates for the font glyphs rendering.bruvzg2021-01-311-2/+2
|
* Change themes *_color_* to *_*_colorMarcel Admiraal2021-01-241-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | 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-25/+25
|
* [Complex Text Layouts] Refactor Font class, default themes and controls to ↵bruvzg2020-11-261-46/+256
| | | | | | | | 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
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-24/+44
| | | | | 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/+1
| | | | | | | | | | | | | | | | | | | | | | | 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-27/+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.
* Renaming of servers for coherency.Juan Linietsky2020-03-271-1/+1
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Popups are now windows also (broken!)Juan Linietsky2020-03-261-43/+43
|
* Replace FALLTHROUGH macro by C++17 [[fallthrough]]Rémi Verschelde2020-02-231-1/+1
| | | | | | | | | | This attribute is now part of the standard we target so we no longer need compiler-specific hacks. Also enables -Wimplicit-fallthrough for Clang now that we can properly support it. It's already on by default for GCC's -Wextra. Fixes new warnings raised by Clang's -Wimplicit-fallthrough.
* 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
* 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 Button and co. take internal margins into account when clipping textMichael Alexsander2019-12-121-0/+7
|
* Fixed crash when using icon override in buttonPouleyKetchoupp2019-11-091-1/+1
| | | | Missing change for PR #33495
* Fixed crash when using icon override in buttonPouleyKetchoupp2019-11-091-4/+4
| | | | Fixes #33457
* Add feature to Button to make its icon expand/shrink with the button's sizeMichael Alexsander Silva Dias2019-08-291-121/+166
|
* Fix wrong offset in Button when alignment is set to leftMichael Alexsander Silva Dias2019-08-281-1/+5
|
* Fix -Wimplicit-fallthrough warnings from GCC 8Rémi Verschelde2019-04-051-0/+2
| | | | | | | | | | | | Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional. Can be replaced by `[[fallthrough]]` if/when we switch to C++17. The warning is now enabled by default for GCC on `extra` warnings level (part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet, but we could enable it manually once we switch to C++11. There's no equivalent feature in MSVC for now. Fixes #26135.
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-2/+2
| | | | Fixes #25316.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* -Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky2018-11-081-3/+3
| | | | -Removed one and zero hints for properties, replaced by default value
* Added hover_pressed style to CheckBox and CheckButtonDualMatrix2018-09-241-0/+15
| | | | | Added hover_pressed style to CheckBox and CheckButton. If no style is defined for this property it will default to the pressed property.
* 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.
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-3/+0
|
* 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!
* Merge pull request #14543 from volzhs/checkbox-checkbutton-centerRémi Verschelde2017-12-111-1/+1
|\ | | | | Fix align=center info is not saved with CheckBox & CheckButton