diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/CanvasItem.xml | 22 | ||||
-rw-r--r-- | doc/classes/EditorSpinSlider.xml | 22 | ||||
-rw-r--r-- | doc/classes/OS.xml | 2 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 2 | ||||
-rw-r--r-- | doc/classes/RichTextLabel.xml | 30 | ||||
-rw-r--r-- | doc/classes/TextEdit.xml | 2 | ||||
-rw-r--r-- | doc/classes/VideoPlayer.xml | 2 | ||||
-rw-r--r-- | doc/classes/VisualShaderNodeCubeMap.xml | 6 | ||||
-rwxr-xr-x | doc/tools/makerst.py | 53 |
9 files changed, 123 insertions, 18 deletions
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 87b8f5c83d..a920001de4 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -22,6 +22,28 @@ Called (if exists) to draw the canvas item. </description> </method> + <method name="draw_arc"> + <return type="void"> + </return> + <argument index="0" name="center" type="Vector2"> + </argument> + <argument index="1" name="radius" type="float"> + </argument> + <argument index="2" name="start_angle" type="float"> + </argument> + <argument index="3" name="end_angle" type="float"> + </argument> + <argument index="4" name="point_count" type="int"> + </argument> + <argument index="5" name="color" type="Color"> + </argument> + <argument index="6" name="width" type="float" default="1.0"> + </argument> + <argument index="7" name="antialiased" type="bool" default="false"> + </argument> + <description> + </description> + </method> <method name="draw_char"> <return type="float"> </return> diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml new file mode 100644 index 0000000000..bf01ebfe82 --- /dev/null +++ b/doc/classes/EditorSpinSlider.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorSpinSlider" inherits="Range" category="Core" version="3.2"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false"> + </member> + <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" /> + <member name="label" type="String" setter="set_label" getter="get_label" default=""""> + </member> + <member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 13a2fc2602..b6eeed4a21 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -217,7 +217,7 @@ Returns the path to the current engine executable. </description> </method> - <method name="get_granted_permissions"> + <method name="get_granted_permissions" qualifiers="const"> <return type="PoolStringArray"> </return> <description> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 9657982016..fa735b8918 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -6,6 +6,7 @@ <description> Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options. When naming a Project Settings property, use the full path to the setting including the category. For example, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog. + [b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. </description> <tutorials> </tutorials> @@ -201,6 +202,7 @@ </member> <member name="application/config/project_settings_override" type="String" setter="" getter="" default=""""> Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code]. + [b]Note:[/b] Regardless of this setting's value, [code]res://override.cfg[/code] will still be read to override the project settings (see this class' description at the top). </member> <member name="application/config/use_custom_user_dir" type="bool" setter="" getter="" default="false"> If [code]true[/code], the project will save user data to its own user directory (see [member application/config/custom_user_dir_name]). This setting is only effective on desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. If [code]false[/code], the project will save user data to [code](OS user data directory)/Godot/app_userdata/(project name)[/code]. diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 01c8ee4779..2962391b99 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -133,6 +133,18 @@ Adds an [code][align][/code] tag based on the given [code]align[/code] value. See [enum Align] for possible values. </description> </method> + <method name="push_bold"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="push_bold_italics"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="push_cell"> <return type="void"> </return> @@ -167,6 +179,12 @@ Adds an [code][indent][/code] tag to the tag stack. Multiplies "level" by current tab_size to determine new margin length. </description> </method> + <method name="push_italics"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="push_list"> <return type="void"> </return> @@ -185,6 +203,18 @@ Adds a [code][meta][/code] tag to the tag stack. Similar to the BBCode [code][url=something]{text}[/url][/code], but supports non-[String] metadata types. </description> </method> + <method name="push_mono"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="push_normal"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="push_strikethrough"> <return type="void"> </return> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 27eab85301..0dd2d75cd5 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -530,7 +530,7 @@ </constant> </constants> <theme_items> - <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )"> Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled. </theme_item> <theme_item name="bookmark_color" type="Color" default="Color( 0.08, 0.49, 0.98, 1 )"> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 2215f26c23..804489f7f1 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -16,7 +16,7 @@ Returns the video stream's name. </description> </method> - <method name="get_video_texture"> + <method name="get_video_texture" qualifiers="const"> <return type="Texture"> </return> <description> diff --git a/doc/classes/VisualShaderNodeCubeMap.xml b/doc/classes/VisualShaderNodeCubeMap.xml index 36465a6b4d..29ebe95086 100644 --- a/doc/classes/VisualShaderNodeCubeMap.xml +++ b/doc/classes/VisualShaderNodeCubeMap.xml @@ -12,10 +12,16 @@ <member name="cube_map" type="CubeMap" setter="set_cube_map" getter="get_cube_map"> </member> <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" override="true" default="[ ]" /> + <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeCubeMap.Source" default="0"> + </member> <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeCubeMap.TextureType" default="0"> </member> </members> <constants> + <constant name="SOURCE_TEXTURE" value="0" enum="Source"> + </constant> + <constant name="SOURCE_PORT" value="1" enum="Source"> + </constant> <constant name="TYPE_DATA" value="0" enum="TextureType"> </constant> <constant name="TYPE_COLOR" value="1" enum="TextureType"> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 1b27e4a35a..ef38299680 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -435,21 +435,30 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S # Signals if len(class_def.signals) > 0: f.write(make_heading('Signals', '-')) + index = 0 + for signal in class_def.signals.values(): - #f.write(".. _class_{}_{}:\n\n".format(class_name, signal.name)) + if index != 0: + f.write('----\n\n') + f.write(".. _class_{}_signal_{}:\n\n".format(class_name, signal.name)) _, signature = make_method_signature(class_def, signal, False, state) f.write("- {}\n\n".format(signature)) - if signal.description is None or signal.description.strip() == '': - continue - f.write(rstize_text(signal.description.strip(), state)) - f.write("\n\n") + if signal.description is not None and signal.description.strip() != '': + f.write(rstize_text(signal.description.strip(), state) + '\n\n') + + index += 1 # Enums if len(class_def.enums) > 0: f.write(make_heading('Enumerations', '-')) + index = 0 + for e in class_def.enums.values(): + if index != 0: + f.write('----\n\n') + f.write(".. _enum_{}_{}:\n\n".format(class_name, e.name)) # Sphinx seems to divide the bullet list into individual <ul> tags if we weave the labels into it. # As such I'll put them all above the list. Won't be perfect but better than making the list visually broken. @@ -463,8 +472,11 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write("- **{}** = **{}**".format(value.name, value.value)) if value.text is not None and value.text.strip() != '': f.write(' --- ' + rstize_text(value.text.strip(), state)) + f.write('\n\n') + index += 1 + # Constants if len(class_def.constants) > 0: f.write(make_heading('Constants', '-')) @@ -477,6 +489,7 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write("- **{}** = **{}**".format(constant.name, constant.value)) if constant.text is not None and constant.text.strip() != '': f.write(' --- ' + rstize_text(constant.text.strip(), state)) + f.write('\n\n') # Class description @@ -494,11 +507,15 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S # Property descriptions if any(not p.overridden for p in class_def.properties.values()) > 0: f.write(make_heading('Property Descriptions', '-')) + index = 0 + for property_def in class_def.properties.values(): if property_def.overridden: continue - #f.write(".. _class_{}_{}:\n\n".format(class_name, property_def.name)) + if index != 0: + f.write('----\n\n') + f.write(".. _class_{}_property_{}:\n\n".format(class_name, property_def.name)) f.write('- {} **{}**\n\n'.format(property_def.type_name.to_rst(state), property_def.name)) @@ -514,24 +531,30 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S format_table(f, info) if property_def.text is not None and property_def.text.strip() != '': - f.write(rstize_text(property_def.text.strip(), state)) - f.write('\n\n') + f.write(rstize_text(property_def.text.strip(), state) + '\n\n') + + index += 1 # Method descriptions if len(class_def.methods) > 0: f.write(make_heading('Method Descriptions', '-')) + index = 0 + for method_list in class_def.methods.values(): for i, m in enumerate(method_list): + if index != 0: + f.write('----\n\n') + if i == 0: - #f.write(".. _class_{}_{}:\n\n".format(class_name, m.name)) f.write(".. _class_{}_method_{}:\n\n".format(class_name, m.name)) + ret_type, signature = make_method_signature(class_def, m, False, state) f.write("- {} {}\n\n".format(ret_type, signature)) - if m.description is None or m.description.strip() == '': - continue - f.write(rstize_text(m.description.strip(), state)) - f.write("\n\n") + if m.description is not None and m.description.strip() != '': + f.write(rstize_text(m.description.strip(), state) + '\n\n') + + index += 1 def make_class_list(class_list, columns): # type: (List[str], int) -> None @@ -897,7 +920,7 @@ def rstize_text(text, state): # type: (str, State) -> str def format_table(f, data, remove_empty_columns=False): # type: (TextIO, Iterable[Tuple[str, ...]]) -> None if len(data) == 0: return - + column_sizes = [0] * len(data[0]) for row in data: for i, text in enumerate(row): @@ -912,7 +935,7 @@ def format_table(f, data, remove_empty_columns=False): # type: (TextIO, Iterabl sep += "+" + "-" * (size + 2) sep += "+\n" f.write(sep) - + for row in data: row_text = "|" for i, text in enumerate(row): |