Commit graph

376 commits

Author SHA1 Message Date
HaSa1002
5b51ae1c5d Add multiple programming language support to class reference 2020-07-23 15:19:09 +02:00
Paulb23
bc4cee4458 Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighter
- Extacted all syntax highlighting code from text edit
- Removed enable syntax highlighting from text edit
- Added line_edited_from signal to text_edit
- Renamed get/set_syntax_highlighting to get/set_syntax_highlighter
- Added EditorSyntaxHighligher
2020-07-11 17:09:58 +01:00
Aaron Franke
8879625879
Dynamic infinite 3D grid
Well, infinite for all intents and purposes.
2020-05-22 19:43:59 -04:00
Rémi Verschelde
0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
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
1abinitio1
712a5aff1d Add option for editor freelook camera sensitivity 2020-04-29 09:36:29 +02:00
Hugo Locurcio
8a48fb3517
Add editor freelook navigation scheme settings
Depending on what one is trying to achieve, a different freelook mode
may be more desirable.

This closes #34034.
2020-04-18 16:24:12 +02:00
Rémi Verschelde
9abb415d92
Merge pull request #37391 from dreamsComeTrue/embedded-windows-mode
Expose 'Embedded Windows Mode' as Editor and Project Settings
2020-04-04 07:58:53 +02:00
Dominik 'dreamsComeTrue' Jasiński
7af84d7213 Expose 'Embedded Windows Mode' as Editor and Project Settings 2020-04-03 21:15:22 +02:00
lupoDharkael
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky
9e08742de8 Added a Window node, and made it the scene root.
Still a lot of work to do.
2020-03-26 15:49:38 +01:00
Juan Linietsky
f8a79a97c7 Effective DisplayServer separation, rename X11 -> LinuxBSD 2020-03-26 15:49:34 +01:00
Rémi Verschelde
4857648a16 i18n: Add support for translating the class reference
- Parse `.po` files from `doc/translations/*.po` like already done
  with `editor/translations/*.po`.
- Add logic to register a doc translation mapping in `TranslationServer`
  and `EditorSettings`.
- Add `DTR()` to lookup the doc translation mapping (similar to `TTR()`).
  Strings are automatically dedented and stripped of whitespace to ensure
  that they would match the translation catalog.
- Use `DTR()` to translate relevant strings in `EditorHelp`,
  `EditorInspector`, `CreateDialog`, `ConnectionsDialog`.
- Small simplification to `TranslationLoaderPO`, the path argument was
  not really meaningful.
2020-03-20 08:48:11 +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
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
2d904d2f80
Merge pull request #36232 from Calinou/add-soft-line-length-guideline
Add a soft line length guideline to the script editor
2020-02-27 21:10:42 +01: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
Hugo Locurcio
3e4b508c3b
Add a soft line length guideline to the script editor
The default value is 80. The hard line length guideline's
default column has been moved to 100 to account for the new
soft line length guideline.

It can be disabled by setting its value to the same column as the
hard line length guideline.

This closes https://github.com/godotengine/godot-proposals/issues/347.
2020-02-15 03:02:40 +01:00
Hugo Locurcio
e10460e36f
Rename the "Last Modified" project list sorting option to "Last Edited"
The `project.godot` file will always be modified when editing a project,
but not when running it. This effectively makes the option sort by
last edition date, rather than modification as is typically understood
by users.

This closes #36127.
2020-02-12 18:13:32 +01:00
Marcel Admiraal
f0db13502a Remove duplicate WARN_PRINT macro. 2020-02-05 11:13:24 +01:00
Marcel Admiraal
5af3b4ca27 Remove duplicate ERR_PRINT macro. 2020-02-05 11:13:24 +01:00
Hugo Locurcio
a00ead2a1f
Enable the script editor line length guideline by default
Now that the GDScript style guide has an official recommendation,
it makes sense to enable the line length guideline by default.
2020-01-02 21:47:44 +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
Haoyu Qiu
078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Michael Alexsander
7ecaff578b Make the script templates' blank lines conform with the official style guide 2019-11-17 08:54:43 -03:00
Rémi Verschelde
46441d585b
Merge pull request #32835 from RobKohr/default-convert_indent_on_save-to-true
set convert_indent_on_save to default to true
2019-10-25 23:20:39 +02:00
Hugo Locurcio
af89a87075
Add a "slow" modifier to freelook
This makes precise adjustments easier, without having to
touch the mouse wheel. This modifier is also available in
Blender, so this makes the freelook behavior more consistent
with it :)

In the interest of simplifying the Editor Settings, this also
removes the freelook modifier speed factor setting
(the value is now hardcoded to its default).
2019-10-14 22:50:02 +02:00
RobKohr
1c08d98ec8
set convert_indent_on_save to true
https://github.com/godotengine/godot/issues/30324
2019-10-14 15:35:17 -04: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
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Cykyrios
ed00313a0b Reorganize & rename text editor settings categories
Add Navigation category for scroll and minimap settings.
Rename Line Numbers category to Appearance.
Rename Open Scripts category to Script List.
Rename "Draw Minimap" setting to "Show Minimap" (this is more consistent with other settings).

Reorder settings by category in code_editor.cpp to match settings list
2019-09-01 13:33:37 +02:00
Rémi Verschelde
2a855a068a
Merge pull request #31589 from Chaosus/minimap_enabled
Make code minimap to be visible by default
2019-08-23 09:38:49 +02:00
Yuri Roubinski
db7bbbdbc7 Make code minimap to be visible by default 2019-08-23 08:42:15 +03:00
Andrii Doroshenko (Xrayez)
f013596760 Allow to define and load script templates per project
Previously it was only possible to create custom script templates per
editor instance which could lead to certain name collisions, but now one
can create such templates per project tailored for specific use cases.

The default path to search for custom script templates is defined in
project settings via `editor/script_templates_search_path` setting as
`res://script_templates` path, yet this can be configured per project.

Templates have at most two origins now:

1. Project-specific, defined in `ProjectSettings`, for instance:
    - res://script_templates/
2. Editor script templates, for instance:
    - %APPDATA%/Godot/script_templates/

As script templates can have the same name over different paths,
the override mechanism was also added, enabling project-specific
templates over the editor ones.
2019-08-22 20:51:30 +03:00
Rémi Verschelde
7978e9071b
Merge pull request #31302 from Paulb23/issue_4881_code_minimap
Add minimap to text_edit
2019-08-22 13:15:43 +02:00
Paulb23
0cea72273f Add minimap to text_edit 2019-08-21 23:48:46 +01:00
Gilles Roudière
692a78db19 Displays smart snapping guides when snapped 2019-08-21 22:15:51 +02:00
Rémi Verschelde
99980d856b
Merge pull request #29871 from Faless/crypto/initial_pr
More Crypto, SSL server, crt/key as Resource, HashingContext
2019-08-21 18:03:03 +02:00
Fabio Alessandrelli
fc411115f5 Fix Network Editor Settings setup. 2019-08-21 17:12:33 +02:00
Fabio Alessandrelli
ce5a3f56a6 Rewrite StreamPeerSSL with SSLContext helper class
connect_to_stream now accepts optional parameter to specify which
certificates to trust.
Implement accept_stream (SSL server) with key/cert parameters to specify
the RSA key and X509 certificate resources.
2019-08-21 16:59:38 +02:00
PouleyKetchoupp
b49226e085 Support for file not found in ConfigFile::Load and handle a few specific cases
EditorSettings::set_project_metadata: creates project_metadata.cfg if it doesn't exist
EditorPlugin::get_config: removed (not used)

Fixes #31444
2019-08-21 08:32:55 +02:00
Braden Bodily
71d71d55b5 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'
Condensed some if and ERR statements. Added dots to end of error messages

Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?),
core/os/memory.cpp,
drivers/png/png_driver_common.cpp,
drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
2019-08-17 12:33:15 +02:00
Hugo Locurcio
bfce99bc98
Set the low processor mode sleep editor settings to require a restart
These settings are only read when the editor starts.
2019-08-15 19:14:14 +02:00
Hugo Locurcio
c940d29973
Add an "Auto" editor font hinting setting to match OS font rendering
The "Auto" setting picks the font hinting setting that best matches
the operating system's font rendering settings.
This font hinting setting is now the default.
2019-08-14 15:57:07 +02:00
qarmin
e0b5b21863 Add some code changes/fixes proposed by Coverity and Clang Tidy 2019-08-07 12:54:30 +02:00
Rémi Verschelde
698d87bdeb
Merge pull request #30879 from Calinou/simplify-font-editor-settings
Simplify editor settings related to font hinting and antialiasing
2019-07-29 09:55:08 +02:00
homer666
4553f2e6b8 Update "Sorting Order" dropdown in Editor Settings 2019-07-28 17:40:06 +10:00
Hugo Locurcio
6c374f91dd
Simplify editor settings related to font hinting and antialiasing
A single setting is now used to control the font hinting/antialiasing
settings of both main and code fonts. This means there are 2 settings
in total (instead of 4).

Font settings were also reordered for clarity.
2019-07-28 01:10:51 +02:00
Hugo Locurcio
6f6a9d9c09
Simplify editor settings related to window dimming
Only a single checkbox is now exposed to control whether the editor
window should be dimmed when opening a popup. The main use case
for disabling it is picking colors from the editor window while
a popup is open.
2019-07-26 15:29:04 +02:00
Michael Alexsander Silva Dias
9be52a5e0f Move "Open Screenshot" from the "Editor" menu to the editor settings 2019-07-23 02:05:29 -03:00
Hugo Locurcio
755689b0e9
Enable the script editor's "Auto Brace Complete" by default
This also adds a setting hint for the "Code Complete Delay" setting
and cleans up some duplicated default setting values.

This closes #30662.
2019-07-18 21:42:10 +02:00
Hugo Locurcio
28d3a6051c
Use base Color() constructors instead of Color::html()
This results in slightly smaller binaries (-17 KB for an editor binary)
as no strings need to be allocated.
2019-07-08 21:17:10 +02:00
Ignacio Etcheverry
270af6fa08 Re-write mono module editor code in C#
Make the build system automatically build the C# Api assemblies to be shipped with the editor.
Make the editor, editor player and debug export templates use Api assemblies built with debug symbols.
Always run MSBuild to build the editor tools and Api assemblies when building Godot.
Several bugs fixed related to assembly hot reloading and restoring state.
Fix StringExtensions internal calls not being registered correctly, resulting in MissingMethodException.
2019-07-05 09:38:23 +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
Bojidar Marinov
0c4c36d823
Add default values to the editor help, docs, and generated RST
Also, make spacing of "=" in the editor help a bit more consistent.
Closes #16086
2019-06-27 18:29:35 +03:00
Rémi Verschelde
eaaff9da31
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
2019-06-27 01:05:18 +02:00
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Tomasz Chabora
c81525ec05 Allow to remove 2D editor limits 2019-06-25 00:19:44 +02:00
Nils ANDRÉ-CHANG
d2833d4f4d Replace + "/" + with String::file_add() 2019-06-23 13:33:50 +01:00
Luka Dornhecker
ad504b926f Add option to toggle console window on Windows
This is an editor setting and its value can also be toggled
using an entry in the Editor toolbar. The console will still
appear briefly when starting the project manager or editor,
as it's still compiled as console application.

Does not impact exported games, which will still run without
console in release and with console in debug mode.

A project setting or export option could be added to disable
it in debug mode if there's demand for it, but that would
greatly reduce the usefulness of debug builds if Windows users
can no longer report error and crash messages.

Fixes #17889.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2019-06-20 16:55:52 +02:00
Rémi Verschelde
c56ef88c5a Fix help source font setting and related cleanup
This was a regression from #28107 due to a typo in the `initial_set`
call.

I used the opportunity to harmonize the font settings by ensuring we
only get values in `editor_fonts.cpp` and set them all with proper and
consistent hint ranges in `editor_settings.cpp`.

Fixes #29774.
2019-06-14 14:25:20 +02:00
Rémi Verschelde
8c11f883d9
Merge pull request #29129 from kis3lori/remove-save-theme-for-default
Created a fallback from the "Save Theme" button to "Save Theme As" when a default theme is in use.
2019-06-13 12:10:05 +02:00
Kis Levente Lorand
0823d78374 Created a fallback from the "Save Theme" button to "Save Theme As" when a default theme is in use. 2019-06-13 11:26:08 +03:00
Rémi Verschelde
f47f905248
Merge pull request #29517 from KoBeWi/pan_shop
Allow to change 2D pan hotkey
2019-06-12 12:51:22 +02:00
Rémi Verschelde
6d16f2f053 Fix error macro calls not ending with semicolon
It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
2019-06-11 14:49:34 +02:00
Tomasz Chabora
f472f0491c Allow to change 2D pan hotkey 2019-06-05 22:44:52 +02:00
Rémi Verschelde
29645c8147
Merge pull request #27334 from qarmin/add_50_percent_editor_scale
Add support for 50% editor scale
2019-05-31 15:28:14 +02:00
Hugo Locurcio
ac14efcdfb
Decrease the editor FPS cap when the window is unfocused
This decreases CPU/GPU usage when the window is unfocused, which can
be beneficial to laptop users.

This also makes the low-processor mode sleep project setting no longer
affect the editor. Instead, two new editor settings now define the
duration of sleeping when the editor is focused and unfocused.

This closes #24209 and partially addresses #29257.
2019-05-30 15:42:57 +02:00
Rémi Verschelde
58f66fa848
Merge pull request #28107 from Amssat221/issue28105
Set range (10-50) to help source font size
2019-05-28 11:53:52 +02:00
Rémi Verschelde
92f67ceef3 i18n: Skip unsupported locales for editor translations
Godot currently can't properly render scripts that require Right-To-Left
and font shaping support, so we skip those.
This is a temporary measure until these features are supported.

Fixes #28577.
2019-05-21 14:38:46 +02: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
79cc95c6a7
Merge pull request #27559 from groud/anchor_mode
Improve the anchors and margin workflow
2019-05-20 17:44:56 +02:00
Max Hilbrunner
ee5ba3e097
Merge pull request #28366 from iwek7/feature/issue28355/showSpacesInEditor
Add feature to show spaces in code editor
2019-05-17 20:38:40 +02:00
Max Hilbrunner
2522a43256
Merge pull request #27097 from siddharth952/master
Adjusts the default color for search border
2019-05-16 23:17:53 +02:00
Max Hilbrunner
bdf79f4c6e
Merge pull request #27569 from Faless/net/ipv4_link_local
Exclude link-local IPv4s from editor host list.
2019-05-14 16:08:16 +02:00
Gilles Roudiere
e875f05c3b Improve the anchors and margin workflow 2019-05-13 18:55:31 +02:00
Tomasz Chabora
0bfcf8bc2f Add bookmarks for easier code navigation 2019-05-05 18:57:53 +02:00
Siddharth
dc7533517f Update editor_settings.cpp
Update editor_settings.cpp

Update editor_themes.cpp

Update editor_settings.cpp
2019-05-02 18:23:37 +05:30
Guillermo
60e16e4a0d Set range and change EDITOR_DEF to EDITOR_GET
Fix indentation

Fix Indentation!

Remove 14
2019-04-30 20:14:39 +02:00
Rémi Verschelde
c1cc438ce6
Merge pull request #27913 from Amssat221/issue27912
Set a range for line spacing
2019-04-30 18:31:20 +02:00
Rémi Verschelde
9dc9434b1b
Merge pull request #24437 from mateusfccp/single_quotes_option
Add settings for single-quotes on completion
2019-04-30 14:58:33 +02:00
miwanczuk
fda3a568ef Issue-28355 - show spaces in editor 2019-04-30 14:57:48 +02:00
Rémi Verschelde
1ca65b5e26
Merge pull request #25751 from Calinou/faster-script-error-checking
Allow floating-point values in the idle parse delay editor setting
2019-04-30 13:47:52 +02:00
gsegovia2018
bab8c760e8 Set range for line spacing 2019-04-30 10:38:10 +02:00
Hugo Locurcio
2041e21eb5
Allow floating-point values in the idle parse delay editor setting
This also makes value changes effective without having to restart
the editor.
2019-04-26 00:01:20 +02: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
Paulb23
a6562cd004 Display connection information in the script editor 2019-04-20 13:13:54 +01:00
Juan Linietsky
a20235aeb0 Add ability to edit editor feature profiles
Allows enabling/disabling parts of the editor and storing/loading profiles for that.
2019-04-08 19:18:51 -03:00
qarmin
910bee9fa1 Add 50% scale in Godot 2019-04-07 21:16:36 +02:00
Hugo Locurcio
00799fc8c2
Add support for type hints in non-default script editor templates
This also refactors template processing to avoid repetition.

This closes #27074.
2019-04-05 23:19:30 +02:00
Fabio Alessandrelli
2bb39ac56e Exclude link-local IPv4s from editor host list.
IPv4 has link-local addresses like IPv6 (block 169.254.0.0/16).
Those addresses should not be considered a valid option when selecting
the `remote_host` setting for the debugger.
2019-03-31 16:57:23 +02:00
Hugo Locurcio
9ba6738719
Use the accent color to highlight selected text
This makes selections easier to see, while making them fit better
within the editor theme.

This closes #22552.
2019-03-27 22:12:41 +01:00
Rémi Verschelde
b17c8c0396 Fix misplaced hint for interface/theme/accent_color
Supersedes #26992.
2019-03-16 11:00:32 -07:00
Michael Alexsander Silva Dias
73aaf06be7 Cleanup relationship line coding after 5f079e2 2019-03-06 14:33:26 -03:00
Juan Linietsky
5f079e2ef9 -Make tileset and meshlibrary edit in a separate inspector, fixes #26671
-Made relationship lines appear based on theme settings, not previous hack
-Fix drawing of relationship lines (was broken)
-Fix double initialization of theme settings
2019-03-06 12:12:42 -03:00
Rémi Verschelde
3916a53522
Merge pull request #22716 from Chaosus/update_theme
Make theme changing no longer requires restart to be fully applied
2019-03-06 12:36:54 +01:00
Rémi Verschelde
c0050d9295 Fix creating editor data, config and cache paths
We used to abort if the system-specific data folder (e.g. `~/.local`
or `%APPDATA%`) is missing, but the next code chunk actually creates
it with `make_dir_recursive` if missing.

Fixes #26598.
2019-03-04 23:29:22 +01:00
Gilles Roudiere
de95493de2 Move the FileSystem dock layout properties to the per-project layout file 2019-02-25 23:39:49 +01:00
Hugo Locurcio
07e87f6ec0
Add a setting hint for the Output panel font size
This closes #21237.
2019-02-08 19:34:43 +01:00