Commit Graph

578 Commits

Author SHA1 Message Date
030697e06c Move container warning to the toaster 2021-11-23 16:17:19 +01:00
eabf8f5edf Added reset_size method to Control and Window classes 2021-11-22 16:55:21 +03:00
3c0fdcc8ac Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
6c4737341d Merge pull request #54649 from bruvzg/shadows 2021-11-09 00:07:41 +01:00
953a9be2d9 Improve Add Node Here popup 2021-11-08 14:02:33 +01:00
5f9cd9ccbc Fix Label and RichTextLabale text shadows and shadow outlines. 2021-11-06 10:22:09 +02:00
a2803f3d86 Merge pull request #54072 from KoBeWi/hrcr_is_ded 2021-11-03 17:31:48 +01:00
0ae65472e7 clang-format: Enable BreakBeforeTernaryOperators
clang-format keeps breaking the way it handles break *after* ternary operators,
so I give up and go with the only style they seem to actually test.
2021-10-28 15:57:41 +02:00
3b11e33a09 clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
de4f29f458 Remove node_hrcr hack 2021-10-28 01:43:34 +02:00
ebbc25e89c Ignore empty Font resources as theme override.
Add range hint to font_size properties.
Remove excessive `base_size` Font property.
2021-10-25 14:05:37 +03:00
7494d54e04 Merge pull request #53471 from KoBeWi/🥞
Improve editor panning and remove RMB panning
2021-10-12 22:37:28 +02:00
f2e9867e9f Implemented SkeletonEditorGizmo
Co-authored-by: Lyuma <xn.lyuma@gmail.com>
2021-10-07 01:07:46 +09:00
3f6112d48b Improve editor panning and remove RMB panning 2021-10-06 14:11:33 +02:00
c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
570cdc128f Rename Node's filename property to scene_file_path for clarity 2021-09-30 16:50:25 +02:00
fc9767abb1 Use functions defined in the their classes. 2021-09-29 09:36:34 +05:45
32ab77ef8f Merge pull request #52430 from AnilBK/vector2-replacements 2021-09-24 13:04:42 +02:00
88b347dc27 Merge pull request #51920 from jmb462/missing-sname-macro-optimization-in-some-functions 2021-09-23 13:14:20 +02:00
90908cd67d Add Get Center Method for Rect2/Rect2i and AABB. 2021-09-21 21:14:17 +05:45
23f4e7990f Merge pull request #52458 from jmb462/fix-node-pivot-shortcut-always-active 2021-09-17 23:14:58 +02:00
c03e7c2dde Enable Pixel Snap by default in the 2D editor
Since this avoids accidentally placing 2D nodes at subpixel positions,
this results in more crisp visuals by default, even when pixel snapping
is disabled in the project settings.
2021-09-10 22:13:06 +02:00
e7fd9adb4c Fix node pivot shortcut is always active 2021-09-07 14:02:27 +02:00
a1f616dcfc Use builtin Vector2 functions for calculation of angles.
.
2021-09-07 08:30:26 +05:45
8e3e9d121d Merge pull request #51962 from LoipesMas/zoom_fix
Clamp EditorZoomWidget zoom
2021-08-27 21:31:46 +02:00
f3883ea59e Fix zoom label not being updated 2021-08-25 18:53:40 +02:00
cbe6c25c6b Rename polygon editor settings for better display in the Editor Settings 2021-08-23 17:59:19 +02:00
5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.

Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
54de7114c5 Add missing SNAME macro optimization for StringName in some functions 2021-08-20 14:50:24 +02:00
855cfe1559 Add support for partial custom editor themes 2021-08-14 02:03:07 +03:00
62c6347a27 Merge pull request #51035 from foxydevloper/drag-drop-more-support
Improve drag and dropping files into viewport by supporting more types
2021-08-13 14:57:10 +02:00
eb4902a455 Fix some unnecessary includes 2021-08-13 00:27:38 -05:00
e62ad6ad80 Improve drag and drop by supporting more file types & node types
Adds support for dragging in all files of type Texture2D for 2D.
Adds support for dragging in all files of type Mesh for 3D.
Replaces adding texture as Light2D with PointLight2D.
Add more node types that textures can be added as
- TextureButton
- CPUParticles2D
2021-08-10 13:05:17 -04:00
84f720966c Use doubles for time in many other places 2021-08-09 14:05:42 -05:00
de2c2be19b Shortcut: Rename shortcut property to event
Having a property which has the same name as its class leads to confusing
situations (e.g. `BaseButton` has a `shortcut` property of type `Shortcut`
which has a `shortcut` property of type `InputEvent`).

Also renames `is_event` to `matches_event`, and `is_valid` to `has_valid_event`
to better reflect what the methods check.
2021-08-05 13:48:43 +02:00
57a5186b08 Merge pull request #51006 from foxydevloper/drag-drop-naming
Name nodes added when drag & dropping an image by `name_casing`
2021-08-03 09:38:03 +02:00
dbad475fc7 Use real_t in editor plugins
Also use const more often and delete dead code in CanvasItemEditor
2021-08-01 21:48:34 -05:00
bb5729fd35 Prevent warning spam to console when dragging a CanvasItem in container 2021-08-01 13:01:46 +03:00
e95e33f251 Merge pull request #35891 from Calinou/editor-viewport-highlight-context-menus
Highlight context menu items at the top of the 2D/3D viewports
2021-07-30 15:18:48 +02:00
e92297cc3d Make the focus outline translucent for editor viewports
This makes the focus outline less distracting on the
2D and 3D editor viewports.
2021-07-30 14:20:54 +02:00
f641327dcf Make drag and drop into viewport add to root node by default
When dragging and dropping a texture, mesh, or scene from the FileSystem into the
2D or 3D viewport, it will be added as a child of the current scene's root node.
2021-07-29 15:47:42 -04:00
07a8f0fe38 Name nodes added from drag & drop by name_casing 2021-07-29 00:29:24 -04:00
026aea681d Improve the 2D editor ruler display
- Use the ° symbol instead of "deg" to reduce clutter.
- Round the displayed lengths to only one decimal instead of two
  to further reduce clutter.
- Don't make the `px` suffix localizable, as it isn't localizable
  anywhere else in the editor.
2021-07-28 16:04:48 +02:00
81d2d2b41a Highlight context menu items at the top of the 2D/3D viewports
This makes it easier to notice that some menu items only appear when
specific nodes are selected.

This change applies to both 2D and 3D editors, including both plugin-based
menus and the hardcoded 2D layout/animation contextual menus.
2021-07-27 16:45:02 +02:00
ac3322b0af Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
2bf903e98d Merge pull request #50791 from foxydevloper/select-mode-tooltip-improvation
Improve select tool's tooltip for 2D and 3D
2021-07-24 23:45:44 +02:00
4e6efd1b07 Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
6b90e2df6c Improve select tool's tooltip
- Makes tips clearer and more consistent.
- Removes outdated "shift+v" that doesn't work
- Adds Ctrl+RMB for adding nodes at position
- Removes tip for non-existent Alt+Drag in 3D select tool
2021-07-23 17:30:45 -04:00
2f060df059 Merge pull request #50498 from LightningAA/zoom-out-alt-4.0
Add shift + [1-5] keyboard shortcuts to zoom out
2021-07-20 09:01:30 +02:00
6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00