Browse Source

Added documentation for World, Theme, StreamTexture, Sky, and ShortCut

TwistedTwigleg 8 năm trước cách đây
mục cha
commit
7b5076050b

+ 8 - 0
doc/classes/ShortCut.xml

@@ -1,8 +1,11 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <class name="ShortCut" inherits="Resource" category="Core" version="3.0-beta">
 <class name="ShortCut" inherits="Resource" category="Core" version="3.0-beta">
 	<brief_description>
 	<brief_description>
+		A shortcut for binding input.
 	</brief_description>
 	</brief_description>
 	<description>
 	<description>
+		A shortcut for binding input.
+		Shortcuts are commonly used for interacting with a [Control] element from a [InputEvent].
 	</description>
 	</description>
 	<tutorials>
 	<tutorials>
 	</tutorials>
 	</tutorials>
@@ -13,6 +16,7 @@
 			<return type="String">
 			<return type="String">
 			</return>
 			</return>
 			<description>
 			<description>
+				Returns the Shortcut's [InputEvent] as a [String].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="is_shortcut" qualifiers="const">
 		<method name="is_shortcut" qualifiers="const">
@@ -21,17 +25,21 @@
 			<argument index="0" name="event" type="InputEvent">
 			<argument index="0" name="event" type="InputEvent">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns [code]true[/code] if the Shortcut's [InputEvent] equals [code]event[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="is_valid" qualifiers="const">
 		<method name="is_valid" qualifiers="const">
 			<return type="bool">
 			<return type="bool">
 			</return>
 			</return>
 			<description>
 			<description>
+				If [code]true[/code] this Shortcut is valid.
 			</description>
 			</description>
 		</method>
 		</method>
 	</methods>
 	</methods>
 	<members>
 	<members>
 		<member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut">
 		<member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut">
+			The Shortcut's [InputEvent].
+			Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent].
 		</member>
 		</member>
 	</members>
 	</members>
 	<constants>
 	<constants>

+ 13 - 0
doc/classes/Sky.xml

@@ -1,8 +1,10 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <class name="Sky" inherits="Resource" category="Core" version="3.0-beta">
 <class name="Sky" inherits="Resource" category="Core" version="3.0-beta">
 	<brief_description>
 	<brief_description>
+		The base class for [PanoramaSky] and [ProceduralSky].
 	</brief_description>
 	</brief_description>
 	<description>
 	<description>
+		The base class for [PanoramaSky] and [ProceduralSky].
 	</description>
 	</description>
 	<tutorials>
 	<tutorials>
 	</tutorials>
 	</tutorials>
@@ -12,24 +14,35 @@
 	</methods>
 	</methods>
 	<members>
 	<members>
 		<member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" enum="Sky.RadianceSize">
 		<member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" enum="Sky.RadianceSize">
+			The Sky's radiance map size.
+			The higher the radiance map size, the more detailed the lighting from the Sky will be.
+			See RADIANCE_SIZE_* constants for values. Default size is RADIANCE_SIZE_512.
 		</member>
 		</member>
 	</members>
 	</members>
 	<constants>
 	<constants>
 		<constant name="RADIANCE_SIZE_32" value="0" enum="RadianceSize">
 		<constant name="RADIANCE_SIZE_32" value="0" enum="RadianceSize">
+			Radiance texture size is 32x32 pixels.
 		</constant>
 		</constant>
 		<constant name="RADIANCE_SIZE_64" value="1" enum="RadianceSize">
 		<constant name="RADIANCE_SIZE_64" value="1" enum="RadianceSize">
+			Radiance texture size is 64x64 pixels.
 		</constant>
 		</constant>
 		<constant name="RADIANCE_SIZE_128" value="2" enum="RadianceSize">
 		<constant name="RADIANCE_SIZE_128" value="2" enum="RadianceSize">
+			Radiance texture size is 128x128 pixels.
 		</constant>
 		</constant>
 		<constant name="RADIANCE_SIZE_256" value="3" enum="RadianceSize">
 		<constant name="RADIANCE_SIZE_256" value="3" enum="RadianceSize">
+			Radiance texture size is 256x256 pixels.
 		</constant>
 		</constant>
 		<constant name="RADIANCE_SIZE_512" value="4" enum="RadianceSize">
 		<constant name="RADIANCE_SIZE_512" value="4" enum="RadianceSize">
+			Radiance texture size is 512x512 pixels.
 		</constant>
 		</constant>
 		<constant name="RADIANCE_SIZE_1024" value="5" enum="RadianceSize">
 		<constant name="RADIANCE_SIZE_1024" value="5" enum="RadianceSize">
+			Radiance texture size is 1024x1024 pixels.
 		</constant>
 		</constant>
 		<constant name="RADIANCE_SIZE_2048" value="6" enum="RadianceSize">
 		<constant name="RADIANCE_SIZE_2048" value="6" enum="RadianceSize">
+			Radiance texture size is 2048x2048 pixels.
 		</constant>
 		</constant>
 		<constant name="RADIANCE_SIZE_MAX" value="7" enum="RadianceSize">
 		<constant name="RADIANCE_SIZE_MAX" value="7" enum="RadianceSize">
+			Radiance texture size is the largest size it can be.
 		</constant>
 		</constant>
 	</constants>
 	</constants>
 </class>
 </class>

+ 3 - 0
doc/classes/StreamTexture.xml

@@ -1,8 +1,10 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <class name="StreamTexture" inherits="Texture" category="Core" version="3.0-beta">
 <class name="StreamTexture" inherits="Texture" category="Core" version="3.0-beta">
 	<brief_description>
 	<brief_description>
+		A .stex texture.
 	</brief_description>
 	</brief_description>
 	<description>
 	<description>
+		A texture that is loaded from a .stex file.
 	</description>
 	</description>
 	<tutorials>
 	<tutorials>
 	</tutorials>
 	</tutorials>
@@ -12,6 +14,7 @@
 	</methods>
 	</methods>
 	<members>
 	<members>
 		<member name="load_path" type="String" setter="load" getter="get_load_path">
 		<member name="load_path" type="String" setter="load" getter="get_load_path">
+			The StreamTexture's filepath to a .stex file.
 		</member>
 		</member>
 	</members>
 	</members>
 	<constants>
 	<constants>

+ 39 - 0
doc/classes/Theme.xml

@@ -20,6 +20,7 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Clears theme [Color] at [code]name[/code] if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="clear_constant">
 		<method name="clear_constant">
@@ -30,6 +31,7 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Clears theme constant at [code]name[/code] if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="clear_font">
 		<method name="clear_font">
@@ -40,6 +42,7 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Clears [Font] at [code]name[/code] if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="clear_icon">
 		<method name="clear_icon">
@@ -50,6 +53,7 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Clears icon at [code]name[/code] if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="clear_stylebox">
 		<method name="clear_stylebox">
@@ -60,12 +64,14 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Clears [StyleBox] at [code]name[/code] if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="copy_default_theme">
 		<method name="copy_default_theme">
 			<return type="void">
 			<return type="void">
 			</return>
 			</return>
 			<description>
 			<description>
+				Sets theme values to a copy of the default theme values.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_color" qualifiers="const">
 		<method name="get_color" qualifiers="const">
@@ -76,6 +82,7 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns the [Color] at [code]name[/code] if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_color_list" qualifiers="const">
 		<method name="get_color_list" qualifiers="const">
@@ -84,6 +91,7 @@
 			<argument index="0" name="type" type="String">
 			<argument index="0" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns all of the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_constant" qualifiers="const">
 		<method name="get_constant" qualifiers="const">
@@ -94,6 +102,7 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns the constant at [code]name[/code] if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_constant_list" qualifiers="const">
 		<method name="get_constant_list" qualifiers="const">
@@ -102,6 +111,7 @@
 			<argument index="0" name="type" type="String">
 			<argument index="0" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns all of the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_font" qualifiers="const">
 		<method name="get_font" qualifiers="const">
@@ -112,6 +122,7 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns the [Font] at [code]name[/code] if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_font_list" qualifiers="const">
 		<method name="get_font_list" qualifiers="const">
@@ -120,6 +131,7 @@
 			<argument index="0" name="type" type="String">
 			<argument index="0" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns all of the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_icon" qualifiers="const">
 		<method name="get_icon" qualifiers="const">
@@ -130,6 +142,7 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns the icon [Texture] at [code]name[/code] if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_icon_list" qualifiers="const">
 		<method name="get_icon_list" qualifiers="const">
@@ -138,6 +151,7 @@
 			<argument index="0" name="type" type="String">
 			<argument index="0" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns all of the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_stylebox" qualifiers="const">
 		<method name="get_stylebox" qualifiers="const">
@@ -148,6 +162,7 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns the icon [StyleBox] at [code]name[/code] if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_stylebox_list" qualifiers="const">
 		<method name="get_stylebox_list" qualifiers="const">
@@ -156,12 +171,14 @@
 			<argument index="0" name="type" type="String">
 			<argument index="0" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns all of the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_stylebox_types" qualifiers="const">
 		<method name="get_stylebox_types" qualifiers="const">
 			<return type="PoolStringArray">
 			<return type="PoolStringArray">
 			</return>
 			</return>
 			<description>
 			<description>
+				Returns all of the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_type_list" qualifiers="const">
 		<method name="get_type_list" qualifiers="const">
@@ -170,6 +187,7 @@
 			<argument index="0" name="type" type="String">
 			<argument index="0" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns all of the types in [code]type[/code] as a [PoolStringArray] for use in any of the get_* functions, if Theme has [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="has_color" qualifiers="const">
 		<method name="has_color" qualifiers="const">
@@ -180,6 +198,8 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]type[/code].
+				Returns [code]false[/code] if Theme does not have [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="has_constant" qualifiers="const">
 		<method name="has_constant" qualifiers="const">
@@ -190,6 +210,8 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns [code]true[/code] if constant with [code]name[/code] is in [code]type[/code].
+				Returns [code]false[/code] if Theme does not have [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="has_font" qualifiers="const">
 		<method name="has_font" qualifiers="const">
@@ -200,6 +222,8 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code].
+				Returns [code]false[/code] if Theme does not have [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="has_icon" qualifiers="const">
 		<method name="has_icon" qualifiers="const">
@@ -210,6 +234,8 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns [code]true[/code] if icon [Texture] with [code]name[/code] is in [code]type[/code].
+				Returns [code]false[/code] if Theme does not have [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="has_stylebox" qualifiers="const">
 		<method name="has_stylebox" qualifiers="const">
@@ -220,6 +246,8 @@
 			<argument index="1" name="type" type="String">
 			<argument index="1" name="type" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]type[/code].
+				Returns [code]false[/code] if Theme does not have [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_color">
 		<method name="set_color">
@@ -232,6 +260,8 @@
 			<argument index="2" name="color" type="Color">
 			<argument index="2" name="color" type="Color">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets Theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code].
+				Does nothing if Theme does not have [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_constant">
 		<method name="set_constant">
@@ -244,6 +274,8 @@
 			<argument index="2" name="constant" type="int">
 			<argument index="2" name="constant" type="int">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets Theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code].
+				Does nothing if Theme does not have [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_font">
 		<method name="set_font">
@@ -256,6 +288,8 @@
 			<argument index="2" name="font" type="Font">
 			<argument index="2" name="font" type="Font">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets Theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code].
+				Does nothing if Theme does not have [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_icon">
 		<method name="set_icon">
@@ -268,6 +302,8 @@
 			<argument index="2" name="texture" type="Texture">
 			<argument index="2" name="texture" type="Texture">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets Theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code].
+				Does nothing if Theme does not have [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_stylebox">
 		<method name="set_stylebox">
@@ -280,11 +316,14 @@
 			<argument index="2" name="texture" type="StyleBox">
 			<argument index="2" name="texture" type="StyleBox">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets Theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code].
+				Does nothing if Theme does not have [code]type[/code].
 			</description>
 			</description>
 		</method>
 		</method>
 	</methods>
 	</methods>
 	<members>
 	<members>
 		<member name="default_font" type="Font" setter="set_default_font" getter="get_default_font">
 		<member name="default_font" type="Font" setter="set_default_font" getter="get_default_font">
+			The theme's default font.
 		</member>
 		</member>
 	</members>
 	</members>
 	<constants>
 	<constants>

+ 5 - 0
doc/classes/World.xml

@@ -15,25 +15,30 @@
 			<return type="PhysicsDirectSpaceState">
 			<return type="PhysicsDirectSpaceState">
 			</return>
 			</return>
 			<description>
 			<description>
+				Returns the World's physics space.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_scenario" qualifiers="const">
 		<method name="get_scenario" qualifiers="const">
 			<return type="RID">
 			<return type="RID">
 			</return>
 			</return>
 			<description>
 			<description>
+				Returns the World's visual scenario.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_space" qualifiers="const">
 		<method name="get_space" qualifiers="const">
 			<return type="RID">
 			<return type="RID">
 			</return>
 			</return>
 			<description>
 			<description>
+				Returns the World's sound space.
 			</description>
 			</description>
 		</method>
 		</method>
 	</methods>
 	</methods>
 	<members>
 	<members>
 		<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
 		<member name="environment" type="Environment" setter="set_environment" getter="get_environment">
+			The World's [Environment].
 		</member>
 		</member>
 		<member name="fallback_environment" type="Environment" setter="set_fallback_environment" getter="get_fallback_environment">
 		<member name="fallback_environment" type="Environment" setter="set_fallback_environment" getter="get_fallback_environment">
+			The World's fallback_environment will be used if the World's [Environment] fails or is missing.
 		</member>
 		</member>
 	</members>
 	</members>
 	<constants>
 	<constants>