summaryrefslogtreecommitdiff
path: root/scene/gui/control.cpp
AgeCommit message (Collapse)Author
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-12-28Merge pull request #44607 from madmiraal/rename-control-rotationRémi Verschelde
Rename Control rotation to rotation_degrees
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-23Rename Control rotation to rotation_degreesMarcel Admiraal
2020-12-23Rename Control margin to offsetMarcel Admiraal
2020-12-21Merge pull request #44300 from KoBeWi/🧹🧹Rémi Verschelde
Move initialization of some classes to headers
2020-12-15Rename neighbour in Control to neighborDaniel Ting
This keeps things consistent with the rest of Godot, which uses the American English spelling of Color.
2020-12-11Move initialization of some classes to headersTomasz Chabora
2020-12-09Cleanup unused engine codeTomasz Chabora
2020-12-04doc: Sync classref with current sourceRémi Verschelde
And fixups: - Add missing bindings in RenderingServer - Remove duplicate ArrayMesh enum bindings (they're in Mesh already) - Remove redundant _unhandled_key_input binding in Control (it's in Node already)
2020-11-28Merge pull request #42109 from EricEzaM/PR/input-and-shortcuts-reworkRémi Verschelde
Shortcuts rework - fixed issues with input propagation and triggering of unwanted shortcuts.
2020-11-26[Complex Text Layouts] Refactor Font class, default themes and controls to ↵bruvzg
use Text Server interface. Implement interface mirroring. Add TextLine and TextParagraph classes. Handle UTF-16 input on macOS and Windows.
2020-11-23Implement new shortcuts system.Eric M
unhandled_key_input changed to unhandled_button_input. Controls can set a 'shortcut_context' which they can then use to determine if their shortcuts should be triggered or not, based on if the viewport's focused GUI control is a child of their 'shortcut context'.
2020-11-16Remove empty lines around braces with the formatting scriptAaron Franke
2020-11-16Merge pull request #42008 from Calinou/theme-rename-node-typeRémi Verschelde
Rename the `type` parameter to `node_type` in Theme and Control
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-11-03Tooltips: Improve code clarity and docsRémi Verschelde
The return type for `_make_custom_tooltip` is clarified as Control, and users should make sure to return a visible node for proper size calculations. Moreover in the current master branch, a PopupPanel will be added as parent to the provided tooltip to make it a sub-window. Clarifies documentation for `Control._make_custom_tooltip`, and shows how to use the (until now undocumented) "TooltipPanel" and "TooltipLabel" theme types to style tooltips. Fixes #39677.
2020-10-27Rename the `type` parameter to `node_type` in Theme and ControlHugo Locurcio
This makes it clearer that it expects a node type as a string (such as "Label") instead of a type like "TYPE_ARRAY". This is backwards-compatible since only the name of the parameter is changed, not its order.
2020-10-02Updated getters and setters names for toplevelDuroxxigar
2020-10-02Merge pull request #42451 from Duroxxigar/rename-toplevelRémi Verschelde
Renamed toplevel to be top_level
2020-10-01Merge pull request #38743 from arrowinaknee/node-config-warningsRémi Verschelde
Update all get_configuration_warning() to retrieve warnings from the parent
2020-10-01Renamed toplevel to be top_levelDuroxxigar
2020-09-08Fixed minor typo, gui_hid -> gui_hide.Jonah Stich
2020-07-02Fix content scale mode, closes #37941Juan Linietsky
2020-05-27Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)
Extra `_2d` suffixes are removed from 2D methods accoringly.
2020-05-16Update all get_configuration_warning to retrieve warnings from the parentArrowInAKnee
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
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.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-05-06Updated editor spin slider to have better behaviour and adjusted control's ↵Eric M
size_flags_stretch_ratio value range
2020-04-06Remove Node.get_position_in_parent()Tomasz Chabora
2020-04-02Replace more occurrences of NULL with nullptrRémi Verschelde
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-26Popups have also been converted to windowsJuan Linietsky
Controls using the old modal API have been replaced to use popups.
2020-03-26Open sub-windows as embedded if the OS does not support themJuan Linietsky
2020-03-26Popups are now windows also (broken!)Juan Linietsky
2020-03-26Working multiple window support, including editorJuan Linietsky
2020-03-26Refactored input, goes all via windows now.Juan Linietsky
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26Added a Window node, and made it the scene root.Juan Linietsky
Still a lot of work to do.
2020-02-28Signals: Port connect calls to use callable_mpRémi Verschelde
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.)
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-12ObjectID converted to a structure, fixes many bugs where used incorrectly as ↵Juan Linietsky
32 bits.
2020-02-11Texture refactorJuan Linietsky
-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
2020-02-05Merge pull request #32959 from georgwacker/control-node-anim-fixRémi Verschelde
Fix control node transform animation jitter with pivot offset
2020-01-19Fix Control::_window_find_focus_neighborRicardo Buring
Due to a typo, the size of a candidate neighbor was confused with the size of the control itself. Fixes #34936.
2020-01-13Control/Light2D: Preventing setting 0 as scale as for Node2DRémi Verschelde
Triggers errors in `Transform2D::affine_invert()`. Fixes #26510. Fixes https://github.com/godotengine/godot/issues/24997#issuecomment-457951639.
2020-01-09Don't compile editor-only function when tools=noGilles Roudière
2020-01-01Update copyright statements to 2020Rémi Verschelde
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.