summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/Button.xml11
-rw-r--r--doc/classes/HBoxContainer.xml1
-rw-r--r--doc/classes/Label.xml9
-rw-r--r--doc/classes/PopupMenu.xml33
-rw-r--r--doc/classes/ScrollContainer.xml1
-rw-r--r--doc/classes/ToolButton.xml11
-rw-r--r--doc/classes/VBoxContainer.xml1
-rw-r--r--misc/dist/shell/godot.bash-completion124
8 files changed, 176 insertions, 15 deletions
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index 34ad2bd822..ac2b77f40e 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -43,26 +43,37 @@
</constants>
<theme_items>
<theme_item name="disabled" type="StyleBox">
+ [StyleBox] used when the [Button] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
+ [StyleBox] used when the [Button] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
</theme_item>
<theme_item name="font" type="Font">
+ [Font] of the [Button]'s text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ Default text [Color] of the [Button].
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )">
+ Text [Color] used when the [Button] is disabled.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ Text [Color] used when the [Button] is being hovered.
</theme_item>
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the [Button] is being pressed.
</theme_item>
<theme_item name="hover" type="StyleBox">
+ [StyleBox] used when the [Button] is being hovered.
</theme_item>
<theme_item name="hseparation" type="int" default="2">
+ The horizontal space between [Button]'s icon and text.
</theme_item>
<theme_item name="normal" type="StyleBox">
+ Default [StyleBox] for the [Button].
</theme_item>
<theme_item name="pressed" type="StyleBox">
+ [StyleBox] used when the [Button] is being pressed.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml
index 714fecc5da..d3456c99a9 100644
--- a/doc/classes/HBoxContainer.xml
+++ b/doc/classes/HBoxContainer.xml
@@ -14,6 +14,7 @@
</constants>
<theme_items>
<theme_item name="separation" type="int" default="4">
+ The horizontal space between the [HBoxContainer]'s elements.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 30f08220a2..125f7b5a2e 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -101,22 +101,31 @@
</constants>
<theme_items>
<theme_item name="font" type="Font">
+ [Font] used for the [Label]'s text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )">
+ Default text [Color] of the [Label].
</theme_item>
<theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )">
+ [Color] of the text's shadow effect.
</theme_item>
<theme_item name="font_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ The tint of [Font]'s outline. See [member DynamicFont.outline_color].
</theme_item>
<theme_item name="line_spacing" type="int" default="3">
+ Vertical space between lines in multiline [Label].
</theme_item>
<theme_item name="normal" type="StyleBox">
+ Background [StyleBox] for the [Label].
</theme_item>
<theme_item name="shadow_as_outline" type="int" default="0">
+ Boolean value. If set to 1 ([code]true[/code]), the shadow will be displayed around the whole text as an outline.
</theme_item>
<theme_item name="shadow_offset_x" type="int" default="1">
+ The horizontal offset of the text's shadow.
</theme_item>
<theme_item name="shadow_offset_y" type="int" default="1">
+ The vertical offset of the text's shadow.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 9289f500e9..25b38d07ed 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -645,55 +645,58 @@
</constants>
<theme_items>
<theme_item name="checked" type="Texture">
- Sets a custom [Texture] icon for [code]checked[/code] state of checkbox items.
+ [Texture] icon for the checked checkbox items.
</theme_item>
<theme_item name="font" type="Font">
- Sets a custom [Font].
+ [Font] used for the menu items.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
- Sets a custom [Color] for the [Font].
+ The default text [Color] for menu items' names.
</theme_item>
<theme_item name="font_color_accel" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )">
+ The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators.
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )">
- Sets a custom [Color] for disabled text.
+ [Color] used for disabled menu items' text.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
- Sets a custom [Color] for the hovered text.
+ [Color] used for the hovered text.
</theme_item>
<theme_item name="hover" type="StyleBox">
- Sets a custom [StyleBox] when the [PopupMenu] is hovered.
+ [StyleBox] displayed when the [PopupMenu] item is hovered.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
- Sets the horizontal space separation between each item.
+ The horizontal space between the item's name and the shortcut text/submenu arrow.
</theme_item>
<theme_item name="labeled_separator_left" type="StyleBox">
+ [StyleBox] for the left side of labeled separator. See [method add_separator].
</theme_item>
<theme_item name="labeled_separator_right" type="StyleBox">
+ [StyleBox] for the right side of labeled separator. See [method add_separator].
</theme_item>
<theme_item name="panel" type="StyleBox">
- Sets a custom [StyleBox] for the panel of the [PopupMenu].
+ Default [StyleBox] of the [PopupMenu] items.
</theme_item>
<theme_item name="panel_disabled" type="StyleBox">
- Sets a custom [StyleBox] for the panel of the [PopupMenu], when the panel is disabled.
+ [StyleBox] used when the [PopupMenu] item is disabled.
</theme_item>
<theme_item name="radio_checked" type="Texture">
- Sets a custom [Texture] icon for [code]checked[/code] of radio button items.
+ [Texture] icon for the checked radio button items.
</theme_item>
<theme_item name="radio_unchecked" type="Texture">
- Sets a custom [Texture] icon for [code]unchecked[/code] of radio button items.
+ [Texture] icon for the unchecked radio button items.
</theme_item>
<theme_item name="separator" type="StyleBox">
- Sets a custom [StyleBox] for separator's.
+ [StyleBox] used for the separators. See [method add_separator].
</theme_item>
<theme_item name="submenu" type="Texture">
- Sets a custom [Texture] for submenu's.
+ [Texture] icon for the submenu arrow.
</theme_item>
<theme_item name="unchecked" type="Texture">
- Sets a custom [Texture] icon for [code]unchecked[/code] of checkbox items.
+ [Texture] icon for the unchecked checkbox items.
</theme_item>
<theme_item name="vseparation" type="int" default="4">
- Sets the vertical space separation between each item.
+ The vertical space between each menu item.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 590dc4cc31..1ba097fb51 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -60,6 +60,7 @@
</constants>
<theme_items>
<theme_item name="bg" type="StyleBox">
+ The background [StyleBox] of the [ScrollContainer].
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/ToolButton.xml b/doc/classes/ToolButton.xml
index d81cbb18f7..6a5ab52608 100644
--- a/doc/classes/ToolButton.xml
+++ b/doc/classes/ToolButton.xml
@@ -21,26 +21,37 @@
</constants>
<theme_items>
<theme_item name="disabled" type="StyleBox">
+ [StyleBox] used when the [ToolButton] is disabled.
</theme_item>
<theme_item name="focus" type="StyleBox">
+ [StyleBox] used when the [ToolButton] is focused. It is displayed over the current [StyleBox], so using [StyleboxEmpty] will just disable the focus visual effect.
</theme_item>
<theme_item name="font" type="Font">
+ [Font] of the [ToolButton]'s text.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
+ Default text [Color] of the [ToolButton].
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.95, 1, 0.3 )">
+ Text [Color] used when the [ToolButton] is disabled.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
+ Text [Color] used when the [ToolButton] is being hovered.
</theme_item>
<theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
+ Text [Color] used when the [ToolButton] is being pressed.
</theme_item>
<theme_item name="hover" type="StyleBox">
+ [StyleBox] used when the [ToolButton] is being hovered.
</theme_item>
<theme_item name="hseparation" type="int" default="3">
+ The horizontal space between [ToolButton]'s icon and text.
</theme_item>
<theme_item name="normal" type="StyleBox">
+ Default [StyleBox] for the [ToolButton].
</theme_item>
<theme_item name="pressed" type="StyleBox">
+ [StyleBox] used when the [ToolButton] is being pressed.
</theme_item>
</theme_items>
</class>
diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml
index b944ead7cd..2b7dc90149 100644
--- a/doc/classes/VBoxContainer.xml
+++ b/doc/classes/VBoxContainer.xml
@@ -14,6 +14,7 @@
</constants>
<theme_items>
<theme_item name="separation" type="int" default="4">
+ The vertical space between the [VBoxContainer]'s elements.
</theme_item>
</theme_items>
</class>
diff --git a/misc/dist/shell/godot.bash-completion b/misc/dist/shell/godot.bash-completion
new file mode 100644
index 0000000000..714b6758e3
--- /dev/null
+++ b/misc/dist/shell/godot.bash-completion
@@ -0,0 +1,124 @@
+#!/usr/bin/env bash
+
+# Bash completion for the Godot editor
+# To use it, install this file in `/etc/bash_completion.d` then restart your shell.
+# You can also `source` this file directly in your shell startup file.
+#
+# Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+_complete_godot_options() {
+ # Since Bash doesn't support option descriptions in autocompletion,
+ # only display long options to be more descriptive.
+ # shellcheck disable=SC2207
+ COMPREPLY=($(compgen -W " \
+--help
+--version
+--verbose
+--quiet
+--editor
+--project-manager
+--quit
+--language
+--path
+--upwards
+--main-pack
+--render-thread
+--remote-fs
+--remote-fs-password
+--audio-driver
+--video-driver
+--fullscreen
+--maximized
+--windowed
+--always-on-top
+--resolution
+--position
+--low-dpi
+--no-window
+--enable-vsync-via-compositor
+--disable-vsync-via-compositor
+--debug
+--breakpoints
+--profiling
+--remote-debug
+--debug-collisions
+--debug-navigation
+--frame-delay
+--time-scale
+--disable-render-loop
+--disable-crash-handler
+--fixed-fps
+--print-fps
+--script
+--check-only
+--export
+--export-debug
+--export-pack
+--doctool
+--no-docbase
+--build-solutions
+--gdnative-generate-json-api
+--test
+" -- "$1"))
+}
+
+_complete_godot_bash() {
+ local cur="${COMP_WORDS[$COMP_CWORD]}" prev
+
+ # Complete options or the positional argument.
+ if [[ $cur == -* ]]; then
+ _complete_godot_options "$cur"
+ else
+ local IFS=$'\n\t'
+ # shellcheck disable=SC2207
+ COMPREPLY=($(compgen -f -X "!*.@(scn|tscn|escn|godot)" -- "$cur"))
+ fi
+
+ # If the array is accessed out of bounds (which will happen for the first argument),
+ # `$prev` will be an empty string and won't match any of the conditions below.
+ prev="${COMP_WORDS[$((COMP_CWORD-1))]}"
+
+ # Complete option values.
+ if [[ $prev == "--render-thread" ]]; then
+ local IFS=$' \n\t'
+ # shellcheck disable=SC2207
+ COMPREPLY=($(compgen -W "unsafe safe separate" -- "$cur"))
+ elif [[ $prev == "--video-driver" ]]; then
+ local IFS=$' \n\t'
+ # shellcheck disable=SC2207
+ COMPREPLY=($(compgen -W "GLES3 GLES2" -- "$cur"))
+ elif [[ $prev == "--path" || $prev == "--doctool" ]]; then
+ local IFS=$'\n\t'
+ # shellcheck disable=SC2207
+ COMPREPLY=($(compgen -d -- "$cur"))
+ elif [[ $prev == "--main-pack" ]]; then
+ local IFS=$'\n\t'
+ # shellcheck disable=SC2207
+ COMPREPLY=($(compgen -f -X "!*.@(pck|zip)" -- "$cur"))
+ elif [[ $prev == "-s" || $prev == "--script" ]]; then
+ local IFS=$'\n\t'
+ # shellcheck disable=SC2207
+ COMPREPLY=($(compgen -f -X "!*.gd" -- "$cur"))
+ fi
+}
+
+complete -o filenames -F _complete_godot_bash godot