Commit graph

258 commits

Author SHA1 Message Date
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
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-14 16:54:55 +02:00
Rémi Verschelde e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
Rémi Verschelde 4d50f747d5
Merge pull request #37293 from Janglee123/ctrl-click-improvements
Improved go-to definition (Ctrl + Click)
2020-05-05 16:49:15 +02:00
janglee be7a353c70 Improved go-to definition (Ctrl + Click)
Co-Authored-By: Bojidar Marinov <bojidar.marinov.bg@gmail.com>
2020-05-05 10:46:12 +05:30
Rémi Verschelde 2cd952bd84 Fix handling of PROPERTY_USAGE_SUBGROUP in DocData and editor
Subgroups were added in #37678 but not properly handled everywhere
where PROPERTY_USAGE_GROUP is.
2020-04-20 17:13:06 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky 441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky 4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
Rémi Verschelde cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
Rémi Verschelde 951ecc4f79
Merge pull request #36518 from Janglee123/no-underlined-keywords
Removed underlining of not clickable symbols
2020-03-12 22:24:43 +01:00
janglee 50a570c9c1 Removed underlining for not clickable symbols 2020-03-11 08:57:21 +00:00
Rémi Verschelde e2b66cacf7
Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodes
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
2020-03-01 23:00:42 +01:00
Rémi Verschelde 01afc442c7 Signals: Port connect calls to use callable_mp
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-28 14:24:09 +01:00
nathanwfranke 2dd498df70 Fix autocomplete and GDScript Highlighting for types
Types include new integer types and others
2020-02-26 16:13:28 -06:00
Juan Linietsky 33b5c57199 Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
- 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-25 12:55:53 +01:00
bruvzg 1af06d3d46
Rename scancode to keycode.
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap.
Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2020-02-25 12:30:33 +02:00
Fabio Alessandrelli cbc450c0e5 Huge Debugger/EditorDebugger refactor. 2020-02-21 11:12:03 +01:00
Juan Linietsky 69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Juan Linietsky 3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Hugo Locurcio 5c659dd399
Increase the width of the "Connections to method" dialog
This closes #36245.
2020-02-15 16:36:10 +01:00
Dominik 'dreamsComeTrue' Jasiński 4c80beab44 Added 'Replace in files' functionality to text editors
Fixes issue #31146
2020-02-13 23:45:05 +01:00
Juan Linietsky 3f335ce3d4 Texture refactor
-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-11 11:53:26 +01:00
andrycodestuffs d0b3cb89f7 Fixed unknown symbol drawn instead of tabs in breakpoints/bookmarks lists
Tab characters were not rendered properly in the breakpoints and
bookmarks lists of the script editor if the bookmarked line was a
comment, resulting in unknown ASCII symbols “�”.

Fixes #34046.

Also changed formatting a bit to enclose the code in backticks (like in
Markdown) instead of quotes.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-01-16 13:50:30 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
Rémi Verschelde e37ad996a1
Merge pull request #34625 from timothyqiu/i18n
Makes more editor strings translatable
2019-12-30 17:28:11 +01:00
Haoyu Qiu 8cf941a8cb Makes more editor strings translatable
* Title of Sprite Editor convert preview dialogs
* Title of UV Channel Debug dialog
* Various editor warnings
* GridMap popup menu item "Paste Selects"
* Tileset editor shape button texts
* MeshLibrary update confirmation text
2019-12-30 10:36:31 +08:00
Haoyu Qiu 078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Rémi Verschelde f7d8dd79e9
Merge pull request #34441 from KoBeWi/wrapping_things_up
Fix code editor not always centering to bookmarks
2019-12-22 12:34:03 +01:00
Yuri Roubinsky c89df816c1 Fix ScriptTextEditor encapsulation 2019-12-19 09:30:40 +03:00
Tomasz Chabora b8bbf5a55f Fix code editor not always centering to bookmarks 2019-12-18 21:58:47 +01:00
Yuri Roubinsky bb7b614da1 Prevent showing toggle scripts panel switch in shader editor 2019-12-17 11:19:43 +03:00
Tomasz Chabora f4d0e598a7 Center Script Editor when jumping to bookmarks/breakpoints 2019-12-01 18:43:52 +01:00
Paulb23 362d38ea67 Update connection info on script validation rather then saved copy 2019-11-02 14:41:59 +00:00
Paulb23 2e2a049d3c Improve performance of connection info in the script editor 2019-10-27 11:07:19 +00:00
David Sichma 94fb3f666c Fixed evaluation for types 2019-10-22 09:42:46 +02:00
Alexander Holland 35452e1ab4 Update ScriptEditor and ShaderEditor Tooltip
fix #32417
2019-10-02 11:21:59 +02:00
Bojidar Marinov db89fef8fa
Highlight singletons and class_names in GDScript
Also, implement a small QoL change for auto-typed variables.
Closes #5739
2019-09-28 13:13:18 +03:00
Paul Trojahn ba24bc1e04 Support menu key in TextEdit and LineEdit controls
Related to #15542
2019-09-22 12:06:24 +02:00
Bhupendra Aole 1de3ec911f Default ColorPicker color mode setting
There is a new setting for Default ColorPicker color mode in Editor Settings->Interface->Inspector. Initially this setting will be RGB. Editor ColorPicker will always start with mode defined in this settiing.
Fixes #30755 and #30754
2019-08-31 00:34:33 -04:00
merumelu e2459479de Editor: remove TOOLS_ENABLED guards
For code  inside editor/ `#ifdef TOOLS_ENABLED`
is always true so those checks are redundant.
2019-08-30 19:02:46 +02:00
Rémi Verschelde f8574da2c2
Merge pull request #31338 from Calinou/reorganize-menus
Reorganize various menus for consistency and conciseness
2019-08-13 16:52:42 +02:00
Hugo Locurcio 9e1c23a353
Reorganize various menus for consistency and conciseness
- Clean up the recent scripts dialog to match the recent scenes dialog
- Add "..." at the end of shortcuts that cause a modal dialog to appear

This closes #31148.
2019-08-13 11:52:10 +02:00
Michael Alexsander Silva Dias 3d86ef74e7 Add "Find in Files..." to the text editor 2019-08-12 11:49:45 -03:00
Rémi Verschelde b18747af4b
Merge pull request #31179 from KoBeWi/code_editor_magic
Add Evaluate Selection option to Script Editor
2019-08-12 11:19:26 +02:00
miwanczuk 7254284efd Adds support for undo/redo for in-editor color picker 2019-08-10 00:46:31 +02:00
Michael Alexsander Silva Dias 31584dd511 Move "Go to Function/Line" to "Go To" menu 2019-08-08 22:36:51 -03:00
iwek7 e7b07e1e58 Fixes color picker in code editor - now it only changes one color 2019-08-08 19:12:13 +02:00
Tomasz Chabora 282deb9a7a Add Evaluate Selection option to Script Editor 2019-08-08 00:28:33 +02:00
Paulb23 e51aa14208 Fix memory leaks with SyntaxHighlighters 2019-07-25 17:30:48 +01:00
Geequlim ed7ed52151 Parse more informations for code completion 2019-07-04 14:00:14 +08:00
Michael Alexsander Silva Dias 91d357f177 Add "Go To" menu to the script editor and move the bookmark and breakpoint menus there 2019-07-01 16:00:05 -03:00
Rémi Verschelde f5d9454a4b
Merge pull request #29071 from YeldhamDev/improve_bookmarks
Improve bookmarks
2019-07-01 16:34:17 +02:00
Rémi Verschelde d17eac735c
Merge pull request #29815 from NilsIrl/plus_file_1
Replace ` + "/" + ` with `String::file_add()`
2019-07-01 12:06:35 +02:00
Gwyneth Lowe 7142064110 Correct typo that broke custom selected font color
Change several font_selected_color to font_color_selected; the actual name of the override
2019-06-24 04:55:29 -05:00
Dawid Wdowiak 0f14489ecb Center script line when double clicked on error in debugger 2019-06-23 15:58:07 +02:00
Nils ANDRÉ-CHANG d2833d4f4d Replace + "/" + with String::file_add() 2019-06-23 13:33:50 +01:00
Rémi Verschelde 0ac3687d6f
Merge pull request #28766 from pgoral/editor_validation_issue
Changing method signature in other class in not recognized in working…
2019-06-17 23:13:08 +02:00
Michael Alexsander Silva Dias 28683237c5 Check for inherited methods before attempting to create one when connecting a signal 2019-06-13 15:15:17 -03:00
Rémi Verschelde a2a5273a07
Merge pull request #29703 from YeldhamDev/method_signal_warning_base
Check base scripts for signal receiving methods before warning about them missing
2019-06-12 13:11:17 +02:00
Rémi Verschelde a458365780
Merge pull request #29659 from YeldhamDev/script_connections_node_deleted
Fix connection info still appearing on scripts if the node source is deleted
2019-06-12 09:46:33 +02:00
Michael Alexsander Silva Dias 831dd19546 Check base scripts for signal receiving methods before warning about them missing 2019-06-11 22:11:26 -03:00
Rémi Verschelde 7842f4ca5c
Merge pull request #29262 from DarknessCatt/issue-27476
Automatically add new line to scripts
2019-06-11 15:07:09 +02:00
Michael Alexsander Silva Dias b3010d9734 Fix connection info still appearing on scripts if the node source is deleted 2019-06-10 19:37:56 -03:00
Rémi Verschelde b9dc2e7e4d
Merge pull request #28099 from lupoDharkael/fix-completion
Fix code completion not working with class_name
2019-06-03 14:01:07 +02:00
Matheus Lima Cunha 7fbb6d986f Automatically add new line to scripts 2019-05-29 18:13:29 -03:00
Goral aabd9980d1 Changing method signature in other class in not recognized in working class in typed GDScript #28685 2019-05-29 22:27:16 +02:00
Rémi Verschelde 11f20c43d7
Merge pull request #28907 from dankan1890/contextual_help
ScriptEditor: Changed the shortcut for contextual help in ALT + F1
2019-05-24 19:55:42 +02:00
Michael Alexsander Silva Dias e12b482022 Improve bookmarks 2019-05-24 13:17:09 -03:00
Rémi Verschelde 63e7d2db08
Merge pull request #28218 from KoBeWi/b00km4rk5
Add bookmarks for easier code navigation
2019-05-20 22:39:19 +02:00
Rémi Verschelde fdea3d48b0
Merge pull request #26809 from KoBeWi/undo_set_text_like_a_boss
Allow to undo TextEdit.set_text
2019-05-20 22:00:39 +02:00
Tomasz Chabora 3bc0445e05 Allow to undo TextEdit.set_text 2019-05-16 23:05:17 +02:00
Hayden c9b9ba26db Directories can now be dragged into the script editor 2019-05-16 10:44:05 -05:00
dankan1890 81e48e2cf3 ScriptEditor: Changed the shortcut for contextual help in ALT + F1, to resolve the conflict with the help menu opening shortcut. 2019-05-15 14:27:24 +02:00
Tomasz Chabora 0bfcf8bc2f Add bookmarks for easier code navigation 2019-05-05 18:57:53 +02:00
Rémi Verschelde 23147ae2c3
Merge pull request #28101 from MunWolf/debugger_cursor
Added a marker in text_edit that tells which row is executing.
2019-04-29 18:38:38 +02:00
Michael Alexsander Silva Dias 4bca3236d1 Make small changes to the new connection info on script feature 2019-04-24 03:13:25 -03:00
Rikhardur Bjarni Einarsson 9bfa63496a Added a marker in text_edit that tells which row is executing. 2019-04-23 21:51:01 +01:00
Rémi Verschelde 22457b907e
Merge pull request #28234 from Paulb23/connection_info_on_script
Display connection information in the script editor
2019-04-22 11:52:13 +02:00
Rémi Verschelde 71bbe6eb01
Merge pull request #27979 from Paulb23/remember_script_state
Restore script editor state between sessions
2019-04-21 13:01:43 +02:00
Paulb23 a6562cd004 Display connection information in the script editor 2019-04-20 13:13:54 +01:00
lupoDharkael 2ad302cec4 Don't allow class_name in built-in scripts 2019-04-17 17:06:21 +02:00
lupoDharkael 145a45fd3f Fix code completion not working with class_name 2019-04-16 22:27:13 +02:00
lupoDharkael f137166251 Validate scripts when they are loaded in the text editor 2019-04-16 02:14:58 +02:00
Paulb23 6ea253aa77 Restore script editor state between sessions 2019-04-13 13:07:12 +01:00
Rémi Verschelde 07b76c0376
Merge pull request #27170 from timoschwarzer/allow-whitespaces-in-warning-ignore-comments
Allow whitespaces in warning-ignore comments
2019-04-10 18:16:10 +02:00
Rémi Verschelde fc370b3feb Fix -Wimplicit-fallthrough warnings from GCC 8
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional.
Can be replaced by `[[fallthrough]]` if/when we switch to C++17.

The warning is now enabled by default for GCC on `extra` warnings level
(part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet,
but we could enable it manually once we switch to C++11. There's no
equivalent feature in MSVC for now.

Fixes #26135.
2019-04-05 15:14:53 +02:00
Timo Schwarzer 7a0dfc04aa
Allow whitespaces in warning-ignore comments 2019-03-17 18:42:59 +01:00
Rémi Verschelde e5a310cd38
Merge pull request #25782 from hsandt/feature/fix-toggle-comment-indent
Feature/fix toggle comment indent
2019-03-16 11:17:47 -07:00
Pedro Ciambra e8fe174616 Implement source lookup for class_name defined classes
Previous to this, classes defined with class_name had no
behavior when ctrl-clicked in the editor.

Fixes #26882
2019-03-11 12:52:17 -03:00
allkhor 0137ec3468 Hide the warnings panel when no warnings presents. 2019-02-13 17:01:21 +06:00
hsandt 5165a90ef6 [Script Editor] Refactored ScriptTextEditor::_edit_option by extracting EDIT_TOGGLE_COMMENT case
CodeEditor::toggle_inline_comment is now used by both ScriptTextEditor and ShaderEditor
2019-02-04 20:21:08 +01:00
Gilles Roudière 5f981d7fef Displays errors and warnings in a better way in the script editor 2019-02-01 17:20:59 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Chaosus 260b5818f1 Change LinkLabel back to Label in error status bar 2018-12-21 11:39:54 +03:00
Rémi Verschelde 2f31d31c23
Revert "Use more subtle indentation guides in the script editor" 2018-12-13 19:57:34 +01:00
Mariano Suligoy 1884952ae3 Fix "index -1 out of range" error spam when the Editor is using translations. Fixes #24277 2018-12-11 08:26:36 -03:00
Rémi Verschelde bf59b73250
Merge pull request #20609 from YeldhamDev/menu_hover_explicit
Make opening menus with the same parent on mouse focus explicit
2018-12-09 23:15:33 +01:00
Rémi Verschelde 3a312dbd32
Merge pull request #20725 from Calinou/textedit-subtle-indent-guides
Use more subtle indentation guides in the script editor
2018-12-09 23:10:32 +01:00
Rémi Verschelde da31d63f76
Merge pull request #23680 from YeldhamDev/unified_help_search_revived
Unified Class and Reference Search 2: Resurrection
2018-11-22 16:16:52 +01:00
Chaosus 1129d83272 Allows user to click on error line to jump into error. 2018-11-22 11:55:36 +03:00