summaryrefslogtreecommitdiff
path: root/scene/gui/control.cpp
AgeCommit message (Collapse)Author
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.
2019-12-23Fix issue with disconnecting events when font changesJonas Bernemann
2019-12-16Prevent infinite loop when focus_next is invisibleTomasz Chabora
2019-10-22Fixed crashes when renaming a state in AnimationNodeStateMachineEditorPouleyKetchoupp
Recursive calls to Control::_modal_stack_remove could cause a crash because of the list element not being invalidated while being erased from the list. It happens in the state machine case by hiding a line edit control when it loses focus. Fixes #23808
2019-10-21Fix control node transform animation jitter with pivot offsetGeorg Wacker
The workaround for moving the pivot is not needed anymore, in fact it causes all transforms applied to control nodes to jitter while animating (if a pivot offset is set). This can be observed via AnimationPlayer and Tween. The fix is to remove the obsolete workaround that causes this bug. Fixes #28804
2019-10-05Fix crash in Control functionsqarmin
2019-09-30Altered rotation_degrees rangeSoumya Lahiri
2019-09-24Merge pull request #31935 from aole/Change-minimum-size-when-theme-changedRémi Verschelde
Change minimum size when theme changed
2019-09-20Load overrides if getting style from current classTomasz Chabora
2019-09-03Change minimum size when theme changedBhupendra Aole
Need to call minimum_size_changed on controls whenever the theme is changed. Fixes godotengine#29816
2019-09-03Added is_inside_tree() check in both Timer and Tweenshaderbeast
Tween now throws error and doesnt even execute.
2019-08-26Fix return type of Control::get_drag_data in API jsontoasteater
Control::get_drag_data is a virtual method that returns Variant, but have the Object type in its MethodInfo. This changes the MethodInfo of Control::get_drag_data
2019-08-22Increase control node's anchor precisionCameron Reikes
2019-08-09Remove ERR_EXPLAIN from scene/* codeTomasz Chabora
2019-08-07Add some code changes/fixes proposed by Coverity and Clang Tidyqarmin
2019-07-27Revert "Update Control margins when size is overridden by change to minsize"Rémi Verschelde
2019-07-25Merge pull request #30351 from bojidar-bg/30288-override-global-themeRémi Verschelde
Keep track of default theme and project custom default theme seperatelly
2019-07-09Improve the node configuration warning displayHugo Locurcio
- Refer to properties explicitly when possible - When multiple warnings are returned, always separate them by one blank line to make them easier to distinguish - Improve grammar and formatting
2019-07-05Keep track of default theme and project custom default theme seperatellyBojidar Marinov
Fixes #30288
2019-06-30Add a configuration warning when using Ignore mouse filter with tooltipHugo Locurcio
This closes #30144.
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-18Merge pull request #29489 from groud/fixes_nanRémi Verschelde
Fixes NaN errors with anchors mode
2019-06-12Cleanup some unecessary editor/ includes in scene/Rémi Verschelde
Part of #29730, handles false positives.
2019-06-04Fixes NaN errors with anchors modeGilles Roudière
2019-05-21Merge pull request #29040 from swarnimarun/fix_override_bugRémi Verschelde
Clear overrides on passing null
2019-05-21Clear overrides on passing nullSwarnim Arun
2019-05-20Merge pull request #28952 from jbuck3/update-marginsRémi Verschelde
Update Control margins when size is overridden by change to minsize