summaryrefslogtreecommitdiff
path: root/scene/gui/control.h
AgeCommit message (Collapse)Author
2023-01-11Merge pull request #71183 from YuriSizov/control-refresh-layouts-by-parentsRémi Verschelde
Ensure that the cached layout mode is in sync
2023-01-10Ensure that the cached layout mode is in syncYuri Sizov
2023-01-10Change set_drag_forwarding() to use callables.Juan Linietsky
* This solution is much cleaner than the one in 3.x thanks to the use of callables. * Works without issues in any language (no need to worry about camel or snake case). * Editor code uses a compatibility function (too much work to redo). Fixes #59899
2023-01-09Fix inconsistent state of Controls when editing and running scenesYuri Sizov
2023-01-08Use BitField<> hint for ArrayFormatJuan Linietsky
This was missing in the conversion of bitflags to BitField<>.
2023-01-07Merge pull request #36301 from KoBeWi/daddy_nodeRémi Verschelde
Add reparent methods to Node
2023-01-05One Copyright Update to rule them allRémi Verschelde
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".
2022-12-19Restore 'rotation_degrees' properties.Juan Linietsky
By popular demand, restoring the helper properties to rotate objects in degrees. Affected are local and global rotations for: * Node2D * Node3D * Control
2022-12-07Copy local theme overrides from Control to WindowYuri Sizov
2022-11-17Add `Control::localize_numeral_system` property to toggle automatic numeral ↵bruvzg
system conversion.
2022-10-23Merge pull request #67566 from Sauermann/fix-code-simplificationsClay John
Code simplifications
2022-10-19Merge pull request #66279 from aaronfranke/control-min-sizeMax Hilbrunner
Revert `custom_minimum_size` type back to `Vector2` instead of `Vector2i`
2022-10-18Code simplificationsMarkus Sauermann
1. Viewport::get_visible_rect().position is always zero. So Control::get_window_rect is identical to Control::get_global_rect. Remove Control::get_window_rect since it is not used in the source code. 2. sqrt(a * a) = abs(a) for doubles 3. Simplify affine_inverse combination 4. Simplify calculation in shaders
2022-10-13Merge pull request #67348 from Mickeon/salvage-a-dear-commentRémi Verschelde
Comment not to remove `data` structs in some Nodes
2022-10-13Comment not to remove `data` structs in some NodesMicky
2022-10-13Move Shortcut Context to Control and ensure that `shortcut_input` adheres to ↵Eric M
contexts. Also ensure that controls with no context are only triggered AFTER nodes which do have a context.
2022-09-22Revert custom_minimum_size type back to Vector2 instead of Vector2iAaron Franke
2022-09-19Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron
2022-09-08Make `Vector2i` values paired with `EDSCALE` be just `Vector2`Michael Alexsander
2022-09-02Un-defer the initial theme changed notificationYuri Sizov
Co-authored-by: Rindbee <idleman@yeah.net>
2022-09-02Add ThemeOwner type for managing theme propagation and lookupYuri Sizov
2022-09-01Add a lifecycle method for manual theme item caching to ControlYuri Sizov
2022-08-29Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde
NOTIFICATION_THEME_CHANGED" This reverts commit 4b817a565cab8af648c88cfc7ab6481e86ee3625. Fixes #64988. Fixes #64997. This caused several regressions (#64988, #64997, https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605) which point at a flaw in the current logic: - `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with `NOTIFCATION_THEME_CHANGED` as introduced in #62845. - Some classes use their `THEME_CHANGED` to cache theme items in member variables (e.g. `style_normal`, etc.), and use those member variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE` notification is now deferred, they end up accessing invalid state and this can lead to not applying theme properly (e.g. for EditorHelp) or crashing (e.g. for EditorLog or CodeEdit). So we need to go back to the drawing board and see if `THEME_CHANGED` can be called earlier so that the previous logic still works? Or can we refactor all engine code to make sure that: - `ENTER_TREE` and similar do not depend on theme properties cached in member variables. - Or `THEME_CHANGE` does trigger a general UI update to make sure that any bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE` does arrive for the first time. But that means having a temporary invalid (and possibly still crashing) state, and doing some computations twice which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-28Merge pull request #64885 from Mickeon/rename-tooltip-hintRémi Verschelde
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-27Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record
2022-08-27Rename `hint_tooltip` to `tooltip_text` & setgetMicky
`hint_tooltip` -> `tooltip_text` `set_tooltip` -> `set_tooltip_text` `_get_tooltip` -> `get_tooltip_text` Updates documentation, too.
2022-08-25Refactor and remove excessive calls of `NOTIFICATION_THEME_CHANGED`Aaron Record
2022-08-24Disconnect Control from theme resources to avoid issues on destructionYuri Sizov
2022-08-22Replace Array return types with TypedArraykobewi
2022-08-22Merge pull request #64339 from YuriSizov/core-multilevel-validate-propertyRémi Verschelde
2022-08-22Make `_validate_property` a multilevel methodYuri Sizov
2022-08-19Replace meta properties with regular properties in `Control`Yuri Sizov
2022-08-16Add methods for node reparentingTomasz Chabora
2022-08-12Add dumb theme item cache to ControlYuri Sizov
2022-07-27Merge pull request #63318 from YuriSizov/control-code-reorgRémi Verschelde
2022-07-26Reorganize code of control.cpp for better maintainabilityYuri Sizov
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-07-18Rename Control PRESET_WIDE to PRESET_FULL_RECTFireForge
2022-05-18Define some Theme data structures with using for readabilityYuri Sizov
2022-05-17Keep input event as unhandled if they go through a control set to ↵Gilles Roudière
MOUSE_FILTER_PASS
2022-04-22Implement Label3D node.bruvzg
Add "generate_mipmap" font import option. Add some missing features to the Sprite3D. Move BiDi override code from Control to TextServer. Add functions to access TextServer font cache textures. Add MSDF related flags and shader to the standard material. Change standard material cache to use HashMap instead of Vector.
2022-03-28Merge pull request #59548 from akien-mga/obj-remove-unused-categoriesRémi Verschelde
2022-03-27Rename warp mouse functions to warp_mouseMarkus Sauermann
2022-03-26Object: Remove unused category boilerplateRémi Verschelde
We might want to re-add something like this if/when we find a good use case for it and do the effort to categorize all objects in the API properly. Until then, it's better to remove that boilerplate since it's not needed. Closes #18711.
2022-02-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker
2022-02-10Reorganize inspector layout workflow for Control nodesYuri Sizov
2022-02-03Remove get_focus_owner() from Control, replaced by ↵Gilles Roudière
get_viewport()->gui_get_focus_owner()
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-08Optimise TextEdit base operationsPaulb23
2021-12-06Rename minimum_size_changed() methodkobewi