Skip to content

Commit

Permalink
Misc fixes to recent merges
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga committed Apr 27, 2020
1 parent c239b45 commit e4237e2
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 44 deletions.
2 changes: 1 addition & 1 deletion _static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ footer,

/* Override table no-wrap */
/* The first column cells are not verbose, no need to wrap them */
.wy-table-responsive table td:not(:nth-child(1)),
.wy-table-responsive table td:not(:nth-child(1)),
.wy-table-responsive table th:not(:nth-child(1)) {
white-space: normal;
}
Expand Down
20 changes: 10 additions & 10 deletions _static/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const registerOnScrollEvent = (function(){
// Media query handler.
return function(mediaQuery) {
// We only apply this logic to the "desktop" resolution (defined by a media query at the bottom).
// This handler is executed when the result of the query evaluation changes, which means that
// This handler is executed when the result of the query evaluation changes, which means that
// the page has moved between "desktop" and "mobile" states.

// When entering the "desktop" state, we register scroll events and adjust elements on the page.
Expand Down Expand Up @@ -57,7 +57,7 @@ const registerOnScrollEvent = (function(){
$menu.css('max-height', `calc(100% - ${menuHeightOffset_fixed}px)`);
}
else {
// Between the top of the page and the threshold we calculate intermediate values
// Between the top of the page and the threshold we calculate intermediate values
// to guarantee a smooth transition.
$search.css('margin-top', `-${currentScroll}px`);
$menu.css('margin-top', `${menuTopMargin + (scrollTopPixels - currentScroll)}px`);
Expand Down Expand Up @@ -138,12 +138,12 @@ const registerOnScrollEvent = (function(){
};
})();

// Subscribe to DOM changes in the sidebar container, because there is a
// Subscribe to DOM changes in the sidebar container, because there is a
// banner that gets added at a later point, that we might not catch otherwise.
const registerSidebarObserver = (function(){
return function(callback) {
const sidebarContainer = document.querySelector('.wy-side-scroll');

let sidebarEthical = null;
const registerEthicalObserver = () => {
if (sidebarEthical) {
Expand All @@ -164,37 +164,37 @@ const registerSidebarObserver = (function(){
if (mutation.type !== 'childList') {
continue;
}

callback();
}
};

const ethicalObserver = new MutationObserver(ethicalObserverCallback);
ethicalObserver.observe(sidebarEthical, ethicalObserverConfig);
};
registerEthicalObserver();

// This observer watches over direct children of the main sidebar container.
const observerConfig = { childList: true };
const observerCallback = (mutationsList, observer) => {
for (let mutation of mutationsList) {
if (mutation.type !== 'childList') {
continue;
}

callback();
registerEthicalObserver();
}
};

const observer = new MutationObserver(observerCallback);
observer.observe(sidebarContainer, observerConfig);
};
})();

$(document).ready(() => {
const mediaQuery = window.matchMedia('only screen and (min-width: 769px)');

registerOnScrollEvent(mediaQuery);
mediaQuery.addListener(registerOnScrollEvent);

Expand Down
4 changes: 3 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
if not language in supported_languages.keys():
print("Unknown language: " + language)
print("Supported languages: " + ", ".join(supported_languages.keys()))
print("The configured language is either wrong, or it should be added to supported_languages in conf.py. Falling back to 'en'.")
print(
"The configured language is either wrong, or it should be added to supported_languages in conf.py. Falling back to 'en'."
)
language = en

is_i18n = tags.has("i18n") # noqa: F821
Expand Down
4 changes: 2 additions & 2 deletions development/compiling/getting_source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The source code is available on `GitHub <https://github.com/godotengine/godot>`_
and while you can manually download it via the website, in general you want to
do it via the ``git`` version control system.

If you are compiling in order to make contributions or pull requests, you should
follow the instructions for the :ref:`pull request workflow <doc_pr_workflow>`.
If you are compiling in order to make contributions or pull requests, you should
follow the instructions from the :ref:`Pull Request workflow <doc_pr_workflow>`.

If you don't know much about ``git`` yet, there are a great number of
`tutorials <https://git-scm.com/book>`__ available on various websites.
Expand Down
49 changes: 28 additions & 21 deletions development/cpp/configuring_an_ide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -266,58 +266,65 @@ Test it:
.. _doc_configuring_an_ide_vs:

Visual Studio
--------------
-------------

Visual Studio Community is free for non-commercial use and has lots of great features, such as memory view, performance view, source control and more.
You can get it `at microsoft <https://visualstudio.microsoft.com/downloads/>`_.
Visual Studio Community is free for non-commercial use and has many useful features,
such as memory view, performance view, source control and more.
You can get it `from Microsoft <https://visualstudio.microsoft.com/downloads/>`__.

Setup
^^^^^^
^^^^^

To start developing with Visual Studio, follow these steps:

- Open the Visual Studio Installer and install the C++ package:

.. image:: img/vs_1_install_cpp_package.png

- Open a Command Prompt or PowerShell window, use ``cd`` to reach the Godot source directory and run ``scons platform=windows vsproj=yes``.
- Open a Command Prompt or PowerShell window, use ``cd`` to reach the Godot source
directory and run ``scons platform=windows vsproj=yes``.

- Now open the Godot folder by clicking **Open a project or solution** and choose ``godot.sln``.
- Now open the Godot folder by clicking **Open a project or solution** and choose
``godot.sln``.
- You can also double-click the ``godot.sln`` file in Explorer.

You can now start developing with Visual Studio.

Debugging
^^^^^^^^^^
^^^^^^^^^

Visual Studio features a powerful debugger. This allows the user to examine Godot's
source code, stop at specific points in the code, make changes, and view them on the run.

Visual Studio features a powerful debugger. This allows the user to examine Godot's source code, stop at specific points in the code,
make changes, and view them on the run.
.. note:: Debugging the Godot Engine inside the editor will require an extra setup step.

.. Note:: Debugging the Godot Engine inside the editor will require an extra setup step.
Because opening Godot opens the Project Manager at first instead of the project you're working on,
the debugger will detach as soon as you open a project. This means the debugger will stop, even though Godot is still running in another process.
Because opening Godot opens the Project Manager at first instead of the project
you're working on, the debugger will detach as soon as you open a project.
This means that the debugger will stop, even though Godot is still running in
another process.

The reason is that the debugger attaches to the Project Manager process only. When you open a project, it will close and open another process for
the editor.

To overcome this, you need to edit the debugging command line arguments in VS. In your project, click **Project > Project Properties**:
To overcome this, you need to edit the debugging command line arguments in VS. In your
project, click **Project > Project Properties**:

.. image:: img/vs_2_project_properties.png

Then add this to command arguments:
Then add this to the command arguments:

.. image:: img/vs_3_debug_command_line.png

- The ``-e`` flag is for entering the editor directly (which skips the Project Manager).
- The ``--path`` argument should be an *absolute* path to a project directory (not a `project.godot` file).
- The ``--path`` argument should be an *absolute* path to a project directory (not a
`project.godot` file).

To learn more about command line arguments, refer to the :ref:`command line tutorial <doc_command_line_tutorial>`.
To learn more about command line arguments, refer to the
:ref:`command line tutorial <doc_command_line_tutorial>`.

To check that everything is working, put a breakpoint in ``main.cpp`` and press F5 to start debugging.
To check that everything is working, put a breakpoint in ``main.cpp`` and press F5 to
start debugging.

.. image:: img/vs_4_debugging_main.png


.. _doc_configuring_an_ide_vscode:

Visual Studio Code
Expand Down
10 changes: 5 additions & 5 deletions getting_started/scripting/c_sharp/c_sharp_basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ page in the Mono documentation.
Setting up C# for Godot
-----------------------

Windows
~~~~~~~
Windows (Visaul Studio)
~~~~~~~~~~~~~~~~~~~~~~~

Download and install the latest version of
`Visual Studio <https://visualstudio.microsoft.com/downloads/>`_
Expand All @@ -59,9 +59,9 @@ Make sure to set the following preferences:
- Mono Build Tool to JetBrains Mono.

- In Rider:
- TargetFrameworkVersion in csproj should match installed .NET Framework Developer Pack.
- Install **Godot support** plugin

- ``TargetFrameworkVersion`` in ``csproj`` should match the installed .NET Framework Developer Pack.
- Install **Godot support** plugin.

macOS and Linux
~~~~~~~~~~~~~~~
Expand Down
8 changes: 4 additions & 4 deletions getting_started/scripting/creating_script_templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Editor-defined templates

These are available globally throughout any project. The location of these
templates are determined per each OS:

- Windows: ``%APPDATA%\Godot\script_templates\``
- Linux: ``$HOME/.local/share/godot/script_templates/``
- macOS: ``$HOME/Library/Application Support/Godot/script_templates/``
Expand All @@ -40,7 +40,7 @@ the ``editor/script_templates_search_path`` setting in the

If no ``script_templates`` directory is found within a project, it is simply
ignored.

Language support and overriding behavior
----------------------------------------

Expand Down Expand Up @@ -118,7 +118,7 @@ List of template placeholders
The following describes the complete list of built-in template placeholders
which are currently implemented.

Base placeholders
Base placeholders
~~~~~~~~~~~~~~~~~

+-------------+----------------------------------------------------------------+
Expand All @@ -130,7 +130,7 @@ Base placeholders
+-------------+----------------------------------------------------------------+
| ``%TS%`` | Indentation placeholder. The exact type and number of |
| | whitespace characters used for indentation is determined by |
| | the ``text_editor/indent/type`` and ``text_editor/indent/size``|
| | the ``text_editor/indent/type`` and ``text_editor/indent/size``|
| | settings in the :ref:`EditorSettings <class_EditorSettings>` |
| | respectively. |
+-------------+----------------------------------------------------------------+
Expand Down

0 comments on commit e4237e2

Please sign in to comment.