Commit graph

215 commits

Author SHA1 Message Date
Rémi Verschelde d95bbb8922 Fix warnings about set but unused variables [-Wunused-but-set-variable]
Fixes the following GCC 5 warnings:
```
drivers/gles2/rasterizer_canvas_gles2.cpp:814:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:2270:11: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:2673:22: warning: variable 'e' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:715:7: warning: variable 'no_cull' set but not used [-Wunused-but-set-variable]
drivers/gles2/shader_gles2.cpp:693:14: warning: variable 'cc' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_canvas_gles3.cpp:1226:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_scene_gles3.cpp:3039:10: warning: variable 'contrib' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_scene_gles3.cpp:4504:32: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable]
editor/editor_inspector.cpp:272:9: warning: variable 'guide_color' set but not used [-Wunused-but-set-variable]
editor/editor_themes.cpp:1067:14: warning: variable 'alpha3' set but not used [-Wunused-but-set-variable]
editor/editor_themes.cpp:263:8: warning: variable 'script_bg_color' set but not used [-Wunused-but-set-variable]
editor/plugins/collision_shape_2d_editor_plugin.cpp:326:11: warning: variable 'cpoint' set but not used [-Wunused-but-set-variable]
editor/plugins/mesh_editor_plugin.cpp:72:9: warning: variable 'size' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:471:12: warning: variable 'mpos' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:89:8: warning: variable 'basetype_color' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:90:8: warning: variable 'type_color' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:92:8: warning: variable 'string_color' set but not used [-Wunused-but-set-variable]
modules/visual_script/visual_script_editor.cpp:2521:7: warning: variable 'seq_connect' set but not used [-Wunused-but-set-variable]
platform/android/export/export.cpp:580:12: warning: variable 'styles_count' set but not used [-Wunused-but-set-variable]
platform/android/export/export.cpp:584:12: warning: variable 'styles_offset' set but not used [-Wunused-but-set-variable]
platform/osx/export/export.cpp:464:9: warning: variable 'zerr' set but not used [-Wunused-but-set-variable]
scene/2d/tile_map.cpp:260:10: warning: variable 'tcenter' set but not used [-Wunused-but-set-variable]
scene/3d/light.cpp:166:7: warning: variable 'editor_ok' set but not used [-Wunused-but-set-variable]
scene/3d/navigation.cpp:566:11: warning: variable 'closest_navmesh' set but not used [-Wunused-but-set-variable]
scene/gui/rich_text_label.cpp:869:8: warning: variable 'size' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:705:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:706:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:726:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:727:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
scene/resources/material.cpp:430:7: warning: variable 'using_world' set but not used [-Wunused-but-set-variable]
servers/visual/shader_language.cpp:2026:7: warning: variable 'all_const' set but not used [-Wunused-but-set-variable]
servers/visual/visual_server_scene.cpp:1383:28: warning: variable 'z_max_cam' set but not used [-Wunused-but-set-variable]
```

Also fixes two [-Wunused-value] warnings:
```
scene/gui/text_edit.cpp:4405:20: warning: statement has no effect [-Wunused-value]
servers/visual/visual_server_scene.cpp:905:48: warning: value computed is not used [-Wunused-value]
```

Some of those are bugs and need further work, they are identified with
`// FIXME` comments.
2018-09-27 16:25:24 +02:00
Michael Alexsander Silva Dias 585ad5c8ea Expose "get_modal_stack_top()" to GDScript 2018-09-14 16:35:52 -03:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Juan Linietsky 683c3f2fcf Avoid misuse of set_drag_preview() function where it shouldn't be. Closes #20100 2018-08-24 10:30:11 -03:00
Rémi Verschelde 52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
Juan Linietsky ee07fb5ebe Changes to ClippedCamera, RayCast,Raycast2D and 2D physics API to add ability to choose between bodies and areas when colliding. 2018-08-21 15:31:23 -03:00
Ibrahn Sahir 1626ae6421 fixed uninitialised variable that was causing menu crash. 2018-07-28 18:09:47 +01:00
Guilherme Felipe d1f5deabd8 Opens the menu with the same parent on mouse focus 2018-07-24 19:59:40 -03:00
Juan Linietsky 336db8bcd1 -Fix tooltips in inspector, now they show as rich text. 2018-07-20 18:16:19 -03:00
Max Hilbrunner a8a318161b
Merge pull request #19015 from toger5/fixed_scrolling_with_trackpad_in_new_inspector
fixed scrolling in new ispector when using trackpad pan gesture
2018-07-05 00:22:06 +02:00
Juan Linietsky 085483e885 -Fix fullscreen on Windows with a HiDPI monitor but a non-HiDPI project
-Replaced some viewport size calls to screen size, since viewport size should be deprecated at this point..
2018-07-03 18:53:27 -03:00
Juan Linietsky eeab3502d5 Changes to how node paths are selected from property, allowing setting a hint. 2018-06-27 20:50:25 -03:00
Guilherme Felipe aa53c032ed Fix regression with cursor shape 2018-06-07 15:12:59 -03:00
Juan Linietsky b659fd6d74 Entirely new (and much improved) animation editor. 2018-06-07 12:52:00 -03:00
Webster Sheets 1198662b2b Revert #14753, as it is buggy and no longer necessary. 2018-05-24 16:10:25 -04:00
toger5 0e015f6023 fixed scrolling in new ispector when using trackpad pan gesture 2018-05-18 18:47:39 +02:00
Rémi Verschelde 93c4274941
Merge pull request #18928 from BastiaanOlij/fix_viewport_flags
Store flags so it isn't lost when viewport isn't setup yet
2018-05-16 15:11:20 +02:00
Bastiaan Olij 0fc4f22522 Store flags so it isn't lost when viewport isn't setup yet 2018-05-16 22:19:45 +10:00
Juan Linietsky 005b69cf6e -New inspector.
-Changed UI resizing code, gained huge amount of speed.
-Reorganized timer sync to clean up behavior (sorry forgot commit this before)

-
2018-05-15 17:14:31 -03:00
Juan Linietsky d5c3fc1522
Merge pull request #15119 from poke1024/visible-subwindows
More efficient subwindow handling
2018-05-08 09:49:34 -03:00
Juan Linietsky c54ac6a15d
Merge pull request #15074 from PJB3005/17-12-26-remove_gui_focus_on_visibility_loss
Hiding a Control now fires NOTIFICATION_FOCUS_EXIT.
2018-05-08 09:40:44 -03:00
Geequlim 56c2463f8c Fix double free for drag preview control in viewport 2018-05-08 13:52:38 +08:00
Bastiaan Olij 6f7fefa489 Added option to viewport to keep linear color 2018-05-06 19:28:09 +10:00
Guilherme Felipe 4f05190fb0 Implement Input.set_default_cursor_shape to change the default shape
Closes #18043
2018-04-10 11:38:34 -03:00
Pedro J. Estébanez 259ed1d400 Improve popup menus usability
It seems that popups were intended to "grab" the mouse click that triggered them, but their intent was being lost. This commit does the necessary changes to let it happen and updates items that were trying to get advantage of it, because the semantics of `Control::grab_click_focus()` have changed a bit. Namely, it must be called **before** showing the modal.

This allows to popup a menu and activate an item in it in a single click-point-release cycle, instead of having to click once to open the menu and once more to pick an item.

This ability is extended even to context menus activated with the RMB (or any other mouse button, for that matter). The editor benefits from this in the context menu of the tree dock, which has been patched to opt-in for this feature.

This improves UX a bit by saving unnecessary clicks.

From now on, `PopupMenu` always grabs the click and also invalidates the first button release unless the mouse has moved (that's what `set_invalidate_click_until_motion()` was doing and now it's removed), so there is no longer the need of doing both things at every point a pop-up menu is shown.
2018-04-07 01:06:02 +02:00
Fabio Alessandrelli c531262190
Merge pull request #16947 from Faless/ui_actions
GUI elements ui_action usage, improvements
2018-03-16 20:55:11 +01:00
Bernhard Liebl 166c2bdea7 Fix gesture events being blocked 2018-03-04 22:19:10 +01:00
Rémi Verschelde ce7da2c7d6 Viewport: Fix missing tooltips w/ disabled physics object picking
Previously this option seemed to be the sole responsible for enabling
physics processing in Viewport, while several other features like
tooltips and debugging collision hints rely on it.

All this logic is moved to internal processing (it's incorrect to let
it be affected by users disabling physics/idle processing), and disabling
physics object picking no longer affects the internal physics processing.

Fixes #17001.
2018-03-01 16:01:10 +01:00
Hein-Pieter van Braam d702d7b335 Fix various valgrind reported uninitialized variable uses 2018-02-28 21:55:13 +01:00
Fabio Alessandrelli 90b9449844 Properly set input as handled when closing modal 2018-02-23 13:01:28 +01:00
Rémi Verschelde 598724c043 Remove obsolete Viewport _update_rect() code 2018-01-18 22:37:45 +01:00
Bojidar Marinov 9b8e8b2220
Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
2018-01-12 00:58:14 +02:00
Juan Linietsky 90d47ae23d Force button release when window focuses out, fixes #15318 and likely many other issues. 2018-01-05 15:40:08 -03:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Noshyaar 7d0212f4eb
Merge pull request #14953 from poke1024/fix-toolbar-gesture
Hide tooltip on gesture input
2018-01-01 18:53:11 +07:00
Bernhard Liebl 098bcf55d0 More efficient subwindow handling 2017-12-28 11:27:43 +01:00
PJB3005 7f0a1c1780 Hiding a control now fires NOTIFICATION_FOCUS_EXIT.
It always removed the focus from the control, but this happened without firing the relevant notification.
2017-12-26 20:58:53 +01:00
Juan Linietsky 4a2eef4ad8 Removed the InputEvent ID field, which was unused and can cause bugs. 2017-12-26 09:49:31 -03:00
Noshyaar a483edbddd
Merge pull request #14899 from volzhs/render-quality-option
Respect HDR option
2017-12-25 08:36:46 +07:00
Noshyaar 1348b087e6
Merge pull request #14753 from NathanWarden/mouse_button_fix
Fixed a bug where mouse button focus breaks when using multiple buttons at once.
2017-12-25 08:33:42 +07:00
Bernhard Liebl 27afa8813d Hide tooltip on gesture input 2017-12-22 19:39:23 +01:00
Juan Linietsky 1fa9aac3e4 -Make capture dependent on a cell size, not subdivision.
-Fixed a bug recently introduced when releasing mouse events and calling popups
2017-12-21 11:05:55 -03:00
volzhs 0856259d19 Respect HDR option 2017-12-21 22:49:55 +09:00
Juan Linietsky feef500b39 properly send mouse released event when grabbing modal focus, fixes #14854 2017-12-20 18:03:48 -03:00
Juan Linietsky 1eb1837d0c Should no longer crash after rebaking, may be a solution to #14795
Not sure if this is the same problem, as reported, please test.
2017-12-19 09:58:02 -03:00
Nathan Warden fcba654bb8 Fixed a bug where mouse button focus breaks when using multiple buttons at once. 2017-12-16 19:30:49 -05:00
Juan Linietsky 1b944cb663
Revert "Fix mouse button release not sent to gui_input if it's different from the button that gave focus" 2017-12-16 19:50:32 -03:00
Rémi Verschelde 9079be9e83
Merge pull request #14484 from Zylann/fix_mouse_focus_button_release
Fix mouse button release not sent to gui_input if it's different from the button that gave focus
2017-12-16 13:29:44 +01:00
Bernhard Liebl 0d826717e7 Fixes oversized tooltip labels (issue 14570) 2017-12-15 19:33:00 +01:00