summaryrefslogtreecommitdiffstats
path: root/scene/gui/texture_button.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Unify and streamline connecting to Resource changeskobewi2023-07-171-3/+2
|
* Make `TextureButton` and `Button` update on texture changeNinni Pipping2023-05-291-29/+28
|
* 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".
* Rename TextureButton set_*_texture methods to set_texture_*Aaron Franke2022-11-191-25/+25
|
* Remove redundant Variant-types initializationsMarkus Sauermann2022-11-141-1/+1
|
* Replace Rect2(i) has_no_area with has_areaAaron Franke2022-09-041-1/+1
|
* Refactor BitMap and add testsHendrik Brucker2022-09-011-1/+1
| | | | Co-authored-by: Resul Çelik <resul_celik@hotmail.com>
* Rename `CanvasItem.update()` to `queue_redraw()`Micky2022-08-291-9/+9
| | | | | | | | | | Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
* Add some codes, returnes directly if the value is not changed.风青山2022-08-231-0/+35
| | | | Avoid executing the following value-changed logics if the value does not really change.
* Rework TextureButton stretchkobewi2022-02-051-51/+49
|
* TextureButton Fix logic for drawing only the focus texturekleonc2022-01-291-2/+3
|
* Fix TextureButton focus texture logickobewi2022-01-041-2/+10
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Rename minimum_size_changed() methodkobewi2021-12-061-5/+5
|
* TextureButton Update min size on any texture changekleonc2021-06-111-0/+3
|
* Initialize class variables with default values in scene/ [2/2]Rafał Mikrut2021-02-091-10/+1
|
* doc: Don't bind argument names with p_ prefixRémi Verschelde2021-02-041-2/+4
| | | | This prefix is used in the C++ codebase, not in the scripting API.
* 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 🎆
* Added flip_h and flip_v properties in TextureButtonPouleyKetchoupp2020-07-011-5/+37
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-15/+27
| | | | | 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/+7
| | | | | | | | | | | | | | | | | | | | | | | 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-22/+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-16/+16
| | | | | | | | -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-7/+9
|
* Merge pull request #27294 from lupoDharkael/rect2iRémi Verschelde2019-04-301-1/+1
|\ | | | | Add missing methods to Rect2i
| * Add missing methods to Rect2ilupoDharkael2019-03-211-1/+1
| | | | | | | | | | | | Replace inline with _FORCE_INLINE_ in short methods. Remove unused and redundant method no_area() as we already have has_no_area(). Add grow_individual() grow_margin() and expand() to Rect2i.
* | Fix scaling issue for texture button focus texture.K. S. Ernest (iFire) Lee2019-03-151-2/+1
|/
* Merge pull request #26105 from nekomatata/texture-button-mask-fixRémi Verschelde2019-02-211-1/+5
|\ | | | | TextureButton with click mask only can be clicked
| * Fixed TextureButton click mask when no other texture is setPouleyKetchoupp2019-02-211-1/+5
| |
* | 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-8/+8
| | | | -Removed one and zero hints for properties, replaced by default value
* fix hovering on toggled texture buttonsSamuel P2018-10-061-1/+1
| | | | fix hovering on toggled link buttons
* Fix warning about functions defined but not used [-Wunused-function]Rémi Verschelde2018-09-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following GCC 5 warnings: ``` core/io/zip_io.h:128:26: warning: 'zlib_filefunc_def zipio_create_io_from_file(FileAccess**)' defined but not used [-Wunused-function] core/script_debugger_remote.cpp:110:17: warning: 'ObjectID safe_get_instance_id(const Variant&)' defined but not used [-Wunused-function] drivers/unix/socket_helpers.h:103:12: warning: 'int _socket_create(IP::Type&, int, int)' defined but not used [-Wunused-function] drivers/unix/socket_helpers.h:45:15: warning: 'size_t _set_sockaddr(sockaddr_storage*, const IP_Address&, int, IP::Type)' defined but not used [-Wunused-function] drivers/unix/socket_helpers.h:76:15: warning: 'size_t _set_listen_sockaddr(sockaddr_storage*, int, IP::Type, IP_Address)' defined but not used [-Wunused-function] editor/editor_fonts.cpp:40:24: warning: 'Ref<BitmapFont> make_font(int, int, int, int, const int*, const Ref<Texture>&)' defined but not used [-Wunused-function] editor/editor_themes.cpp:85:26: warning: 'Ref<StyleBoxFlat> change_border_color(Ref<StyleBoxFlat>, Color)' defined but not used [-Wunused-function] editor/import/editor_import_collada.cpp:493:13: warning: 'void _generate_normals(const PoolVector<int>&, const PoolVector<Vector3>&, PoolVector<Vector3>&)' defined but not used [-Wunused-function] editor/import/editor_import_collada.cpp:524:13: warning: 'void _generate_tangents_and_binormals(const PoolVector<int>&, const PoolVector<Vector3>&, const PoolVector<Vector3>&, const PoolVector<Vector3>&, PoolVector<float>&)' defined but not used [-Wunused-function] editor/pvrtc_compress.cpp:118:13: warning: 'void _compress_etc(Image*)' defined but not used [-Wunused-function] modules/etc/image_etc.cpp:89:13: warning: 'void _decompress_etc1(Image*)' defined but not used [-Wunused-function] modules/etc/image_etc.cpp:93:13: warning: 'void _decompress_etc2(Image*)' defined but not used [-Wunused-function] modules/gdscript/editor/gdscript_highlighter.cpp:46:13: warning: 'bool _is_whitespace(CharType)' defined but not used [-Wunused-function] scene/2d/cpu_particles_2d.cpp:510:14: warning: 'float rand_from_seed_m1_p1(uint32_t&)' defined but not used [-Wunused-function] scene/3d/cpu_particles.cpp:474:14: warning: 'float rand_from_seed_m1_p1(uint32_t&)' defined but not used [-Wunused-function] scene/resources/default_theme/default_theme.cpp:123:20: warning: 'Ref<Shader> make_shader(const char*, const char*, const char*)' defined but not used [-Wunused-function] scene/resources/default_theme/default_theme.cpp:130:24: warning: 'Ref<BitmapFont> make_font(int, int, int, int, const int*, const Ref<Texture>&)' defined but not used [-Wunused-function] ``` Had to split `core/io/zip_io.h` into header and .cpp file without 'static' keyword. Not fixed yet (static definition in header used in some files but not all): ``` modules/websocket/lws_helper.h:111:13: warning: 'void _lws_make_protocols(void*, int (*)(lws*, lws_callback_reasons, void*, void*, size_t), PoolVector<String>, _LWSRef**)' defined but not used [-Wunused-function] ``` Also fixed a couple other warnings missed in previous commits.
* Fix warnings about unhandled enum value in switch [-Wswitch]Rémi Verschelde2018-09-271-0/+3
| | | | | | | | | | | Fixes GCC 5 warnings of the form: core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch] core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch] Those can be trivial cases where adding a default fallback is the solution, or more complex issues/hidden bugs where missed values are actually meant to be handled.
* The TextureButton's bitmask takes into account the stretch mode selectedMrCdK2018-01-191-9/+56
| | | | When the stretch is tile the mask gets applied to each tile.
* 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!
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry2017-08-201-7/+7
|
* Synchronize parameter names in definition and declarationTwistedTwigleg2017-08-161-2/+2
| | | | Fixes #10244.
* Removes type information from method bindsIgnacio Etcheverry2017-08-101-12/+12
|
* Fix the resize mode of TextureButton cannot be saved into resource files.Geequlim2017-07-261-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-74/+67
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge pull request #7795 from hpvb/rename-md-macroRémi Verschelde2017-02-131-17/+17
|\ | | | | Rename the _MD macro to D_METHOD
| * Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-17/+17
| | | | | | | | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* | Fix compile error with TextureButtongeequlim2017-02-131-22/+12
|/ | | | Export TextureButton::ResizeMode as its own enum values
* Remove use of _SCS from ADD_METHODHein-Pieter van Braam2017-02-131-8/+8
| | | | This saves typing and is a step towards fixing #56