summaryrefslogtreecommitdiffstats
path: root/scene/gui/button.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotSpartan3222024-10-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit e8542b06acca3c1bdeee4b528411771f0819f084) 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>
* [Button] Adds theme option to align button text and icon to either largest ↵bruvzg2024-06-101-0/+2
| | | | or current stylebox.
* Fix CheckBox and CheckButton not using max_icon_widthRiley Willows2024-05-201-2/+1
|
* Improve button min. size calculation.bruvzg2024-05-161-0/+9
|
* Merge pull request #88615 from ↵Rémi Verschelde2024-02-261-3/+0
|\ | | | | | | | | | | Rindbee/add-h_separation-between-icons-in-CheckButton-and-CheckBox Add a `h_separation` between icons in `CheckButton`/`CheckBox`
| * Add a `h_separation` between icons in `CheckButton`/`CheckBox`风青山2024-02-211-3/+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`).
* | [Button] Add autowrap feature.bruvzg2024-02-221-0/+4
|/
* Make the drawing logic clearer in `Button`Rindbee2024-01-181-0/+4
| | | | | | | | | | | 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.
* Register theme properties with ThemeDBYuri Sizov2023-09-111-1/+1
|
* Make `TextureButton` and `Button` update on texture changeNinni Pipping2023-05-291-0/+1
|
* Update size or size cache when toggling `expand_icon` in `Button`Rindbee2023-05-171-0/+1
| | | | | | 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`.
* Implement vertical icon alignment for buttonsFlorian Kothmeier2023-05-011-1/+4
|
* Make icons of scripted and custom classes fit the editor UIYuri Sizov2023-03-311-0/+3
| | | | | | | | | | | Also: - Add an option to limit the icon size in PopupMenu. This is similar to how this works in Tree and TreeItem. - Add the same option to TabBar. - Add a theme constant for Tree, PopupMenu, Button, and TabBar to apply this limit on the control level. Co-authored-by: Daylily-Zeleen <daylily-zeleen@foxmail.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".
* Add a lifecycle method for manual theme item caching to ControlYuri Sizov2022-09-011-0/+38
|
* Add fit_to_longest_item to OptionButtonkobewi2022-08-021-1/+3
|
* Code quality: Fix header guards consistencyRémi Verschelde2022-07-251-1/+1
| | | | | Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
* Refactor Font configuration and import UI, and Font resources.bruvzg2022-07-061-9/+0
|
* Move duplicate AutoWrap, Overrun and VisibleChar behavior enums to the ↵bruvzg2022-06-161-3/+3
| | | | TextServer.
* Add overrun behavior to the Button.bruvzg2022-06-081-0/+4
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke2021-12-091-15/+6
|
* Fix missing argument names in bindingsRémi Verschelde2021-10-091-3/+3
| | | | | | While at it, tweak some boolean setters to use `p_enabled` for the bool. Also renames `draw_minimap()` to `set_draw_minimap()`.
* Add alignment options to icons on buttons.jitspoe2021-06-291-0/+4
| | | | | | They can now be centered and right-aligned. Fixes #11380.
* Initialize class variables with default values in scene/ [2/2]Rafał Mikrut2021-02-091-5/+5
|
* 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-1/+1
|
* [Complex Text Layouts] Refactor Font class, default themes and controls to ↵bruvzg2020-11-261-0/+23
| | | | | | | | use Text Server interface. Implement interface mirroring. Add TextLine and TextParagraph classes. Handle UTF-16 input on macOS and Windows.
* Add override keywords.Marcel Admiraal2020-07-101-1/+1
|
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-1/+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.
* Texture refactorJuan Linietsky2020-02-111-3/+3
| | | | | | | | -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.
* Add feature to Button to make its icon expand/shrink with the button's sizeMichael Alexsander Silva Dias2019-08-291-2/+4
|
* Remove redundant author doc commentsIAmActuallyCthulhu2019-08-121-3/+0
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* 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!
* Show Options Dialog for NodePath and File in clicked button position.Daniel J. Ramirez2017-12-231-1/+2
| | | | Auto select newly created nodes.
* Fix CheckButton minimum sizevolzhs2017-12-111-0/+2
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-16/+7
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Groundbreaking!! Godot resources can now be flagged to be local to the scene ↵Juan Linietsky2017-01-101-0/+3
| | | | | | | | | being edited! This means that each time this scene is instanced, the resource will be unique! As such, thanks to this, the following features were implemented: -ButtonGroup is no longer a control, it's now a resource local to the scene -ViewportTexture can be created from the editor and set to any object, making ViewportSprite and other kind of nodes obsolete!
* -Translation text will change automatically for in-game buttons, labels, ↵Juan Linietsky2017-01-091-0/+1
| | | | | | | poups when translation is changed. -Added a NOTIFICATION_TRANSLATION_CHANGED for controls that need custom code -Sorry, editor will not update automatically because it uses a different translatio method.
* ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky2017-01-021-1/+1
| | | | | | | | Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
| | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* -customizable shortcuts in editorJuan Linietsky2016-06-041-1/+3
| | | | | -editor settings now save to .tres instead of .xml -buttons can now hold a shortcut
* remove trailing whitespaceHubert Jarosz2016-03-091-8/+8
|
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|