Commit graph

570 commits

Author SHA1 Message Date
SaracenOne d3cb8d12ff Added support for drag and drop in spatial editor. 2017-09-03 05:00:23 +01:00
Hein-Pieter van Braam 9c63ab99f0 Fix use of unitialized variables
The second in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-02 01:59:26 +02:00
Hein-Pieter van Braam f9467ec1ea Fix signed and unsigned comparisons
The first in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-01 08:13:12 +02:00
toger5 7793bfc544 added icon updating to most ui elements 2017-08-30 21:47:09 +02:00
Rémi Verschelde 7ad14e7a3e Dead code tells no tales 2017-08-27 22:13:45 +02:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Rémi Verschelde 612099e377 Merge pull request #10591 from Rubonnek/possible-null-ptr-dereference
Added/Fixed null pointer checks
2017-08-27 02:10:56 +02:00
Rémi Verschelde 5976e8d7de Merge pull request #10625 from Rubonnek/fixed-leaks
Fixed several memory leaks
2017-08-27 02:10:32 +02:00
Wilson E. Alvarez 7a07895920 Added/Fixed null pointer checks 2017-08-26 16:58:47 -04:00
Wilson E. Alvarez 1577f41653 Fixed several memory leaks 2017-08-25 08:47:05 -04:00
Hein-Pieter van Braam cacced7e50 Convert Object::cast_to() to the static version
Currently we rely on some undefined behavior when Object->cast_to() gets
called with a Null pointer. This used to work fine with GCC < 6 but
newer versions of GCC remove all codepaths in which the this pointer is
Null. However, the non-static cast_to() was supposed to be null safe.

This patch makes cast_to() Null safe and removes the now redundant Null
checks where they existed.

It is explained in this article: https://www.viva64.com/en/b/0226/
2017-08-24 23:08:24 +02:00
Juan Linietsky 541fdffc0a Merge pull request #10319 from neikeq/pr-engine-editor-hint
Adds Engine::is_editor_hint() method
2017-08-20 12:55:46 -03:00
Ignacio Etcheverry 90b8a5b71e Removes editor_hint from SceneTree 2017-08-19 01:29:45 +02:00
Rémi Verschelde 5485233549 Merge pull request #10300 from H4kor/anchor
Show Anchor even when Control-Node is hidden
2017-08-16 17:34:33 +02:00
Rémi Verschelde b1ecaaa22b Merge pull request #10307 from Rubonnek/update-argument-names
Updated function argument names
2017-08-16 17:17:56 +02:00
Juan Linietsky 1ecb48b8c2 Changed anchor constants to enum, removed ANCHOR_CENTER, fixes #9889 2017-08-15 19:49:28 -03:00
Gilles Roudiere 0041e08f74 Avoids inverted anchors
Add a push_opposite_anchor argument pushing the opposite anchor if
needed
2017-08-13 21:20:14 +02:00
Gilles Roudiere c26af6f2b7 Adds a function to set Anchors with a layout preset 2017-08-13 21:20:14 +02:00
Gilles Roudiere e8c83b31bd Added the possibility to move all anchors at once when they are clustered 2017-08-13 21:20:13 +02:00
Gilles Roudiere f5ff7e9fa0 Make anchors snap to each other 2017-08-13 21:20:13 +02:00
Gilles Roudiere b73613e1eb Displays percentages when dragging anchors 2017-08-13 21:20:13 +02:00
Gilles Roudiere 2032cb2522 Simplifies the canvas editor code 2017-08-13 21:20:13 +02:00
Gilles Roudiere 3264cea7ae Add lines to make understandable when anchors are snapped 2017-08-13 21:20:13 +02:00
Gilles Roudiere b329cb9c71 Snap anchors when dragged, depending on the zoom level 2017-08-13 21:20:13 +02:00
Gilles Roudiere fcff42dcb7 Make anchors draggable 2017-08-13 21:20:13 +02:00
Gilles Roudiere bd0384a9e9 Add anchor visualization 2017-08-13 21:20:13 +02:00
Gilles Roudiere 0d35d4d53b Replace GUI anchor type by a float between 0 and 1 2017-08-13 21:20:13 +02:00
Niko Abeler 07809c162f Showing anchor icon in editor if control-node is hidden (fixes #9542) 2017-08-13 17:35:59 +02:00
Wilson E. Alvarez 428f03cf06 Updated function argument names 2017-08-12 15:12:49 -04:00
Daniel J. Ramirez 03f62495ca Improved add texture as node dialog 2017-08-10 11:40:28 -05:00
Juan Linietsky 950b205609 Clean up canvas item when changing state, closes #5977 2017-08-08 21:12:32 -03:00
Juan Linietsky 1939e83a65 Attempt to resolve #4673 2017-08-08 07:13:17 -03:00
Indah Sylvia 5ae78fdf6a Makes all Godot API's methods Lower Case 2017-08-07 18:24:35 +07:00
Gilles Roudiere ffe2072741 Change the grid offset when the snap is set as relative 2017-07-25 21:10:43 +02:00
Gilles Roudiere cb3fbf7d32 Make uniform resize possible with side (top, left, right, bottom)
handles.
2017-07-20 22:03:34 +02:00
Gilles Roudiere 2d9873e033 Replaced the hard-to-understand _select by _select_click_on_empty_area and _select_click_on_item.
Added some comments
Removed commented code or useless ones
2017-07-20 19:50:37 +02:00
Gilles Roudiere 0d4b0ecb57 Generalized _find_canvas_items_at_pos to remove _select_canvas_items_at_pos
Removed some useless parameters
Removed old comments
2017-07-20 19:50:37 +02:00
Juan Linietsky 25678b1876 -Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
2017-07-19 17:06:03 -03:00
Daniel J. Ramirez 337c1238b9 Fixed button flat behavior when not in normal state.
Also changed some buttons to flat mode
2017-07-18 11:03:06 -05:00
Juan Linietsky bbada82f80 -Reorganized all properties of project settings (Sorry, Again).
(Lot's of bloat accumulated, so it was time for clean up.)
-Made EditorSettings and ProjectSettings search more useful (search in sections too)
2017-07-17 22:18:58 -03:00
Rémi Verschelde 34c20248b3 Merge pull request #9577 from MarianoGnu/master
Add anchor shortcut to fit parent
2017-07-17 23:14:52 +02:00
toger5 7556aacb03 focus box size fix for new theme 2017-07-16 20:07:06 +02:00
Mariano Suligoy 99bda42d4d Add anchor shortcut to fit parent
Also remove old Edit -> Expand to Parent menu option
2017-07-14 10:25:50 -03:00
Rémi Verschelde 095f0c956e Fix wrong cast to Node2D instead of Control
As reported by @sanikoyes.
2017-07-08 09:42:48 +02:00
Juan Linietsky bd9d98c172 Ability to set rotation and scaling pivot for controls. 2017-07-06 17:42:44 -03:00
Nuno Donato c207c06173 Update some property names for animation keys.
Added rect_rotation too.
Fixes #9337
2017-06-24 10:39:57 +01:00
Thomas Herzog 86407aebc5 Merge pull request #8407 from Jylhis/popup_item_select_hide
Update PopupMenu hiding
2017-06-20 00:20:21 +02:00
Sean Bohan 45b71ac2d0 Add settings to pan canvas editor with scrolling
This feature is mainly designed for developers who uses touchpad instead of mouse, and want to scroll instead of zoom. Every macOS developers will like it since it feels intuitive.

2 new settings are added to “editors/2d”:

scroll_to_pan: turn on to use mouse/touchpad scroll to pan canvas item editor view instead of zoom
pan_speed: use this value to change scroll speed
2017-06-08 18:05:41 +08:00
alexholly a3c90b0293 renamed all Rect2.pos to Rect2.position 2017-06-04 02:09:17 +02:00
Andreas Haas 9bc5348961
InputEvent: Renamed "pos" property to "position"
Make the naming consistent with other classes.
2017-06-03 11:26:39 +02:00
George Marques 86ef71fc95
Fix crash when interacting with the 2d editor 2017-05-23 11:03:17 -03:00
Juan Linietsky 5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
Rémi Verschelde 231511b2a6 Merge pull request #8631 from volzhs/editor-theme-custom
New customizable editor theme
2017-05-20 07:16:11 +02:00
volzhs bb81293047 New customizable editor theme 2017-05-09 17:46:54 +09:00
toger5 304a1f5b5a Implemented scrolling factor for smooth trackpad scrolling
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.
2017-05-07 14:23:56 +02:00
volzhs 17e8e343fb Revert "Add new editor and default theme (WIP)"
This reverts commit f045efe007.
2017-05-03 06:19:15 +09:00
Daniel J. Ramirez f045efe007 Add new editor and default theme (WIP) 2017-04-27 08:04:57 +02:00
Jylhis aa63fd1551 Fix #7262
Disable PopupMenu hiding in snap settings of the TextureRegion editor
and Edit menu of the scene
2017-04-14 15:01:56 +03:00
Rémi Verschelde 8764659234 Merge pull request #8342 from volzhs/error-signal-dnd
Fix signal error when starting editor
2017-04-10 08:29:41 +02:00
Sergey Pusnei 8589ca3903 Rename [gs]et_pos to [gs]et_position for Controls
Control set_pos -> set_position
Control set_global_pos -> set_global_position
[gs]et_mouse_pos -> [gs]et_mouse_position
[gs]et_global_mouse_pos -> [gs]et_global_mouse_position
fixes #8005
2017-04-10 08:27:34 +02:00
volzhs 519c03e932 Fix signal error when starting editor
need to merge #8198 to work properly
2017-04-10 13:00:08 +09:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde d4740a9853 Merge pull request #8169 from RandomShaper/fix-uniform-move
Include uniform (Shift down) mode in only-one-Node2D dragging
2017-03-27 08:56:54 +02:00
Pedro J. Estébanez e7fba3d273 Include uniform (Shift down) mode
in only-one-Node2D dragging
2017-03-27 01:32:24 +02:00
Rémi Verschelde fb46323022 Merge pull request #8115 from RandomShaper/improve-snapping
Improved 2D snapping behavior
2017-03-24 22:51:12 +01:00
Pedro J. Estébanez 61d7ae3466 Improved 2D snapping behavior
Make snapping affect nodes created by drag & drop
Make snapping for a single Node2D refer to its pivot
Refactor duplicate drag setup code
Replace one occurrence of the old set_pos by set_position
2017-03-24 21:29:46 +01:00
Pedro J. Estébanez f5004b78d0 Implement warped mouse panning for 2D & 3D editors
Enabled by default as in Blender, but can be disabled separately for 2D & 3D;
the core functionality is in Input so this could be reused or even exposed to scripts in the future
2017-03-22 21:36:52 +01:00
volzhs 4d0a75750f Fix drag and drop on 2d viewport 2017-03-13 19:35:27 +09:00
Rémi Verschelde 5dbf1809c6 A Whole New World (clang-format edition)
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
2017-03-05 16:44:50 +01:00
Rémi Verschelde 49c065d29c Refactoring: rename tools/editor/ to editor/
The other subfolders of tools/ had already been moved to either
editor/, misc/ or thirdparty/, so the hiding the editor code that
deep was no longer meaningful.
2017-03-05 14:21:25 +01:00
Renamed from tools/editor/plugins/canvas_item_editor_plugin.cpp (Browse further)