doc: Sync classref with current source

This commit is contained in:
Rémi Verschelde 2019-10-01 10:55:49 +02:00
parent d66d970fdb
commit 79298face0
5 changed files with 28 additions and 22 deletions

View file

@ -110,8 +110,10 @@
</return>
<argument index="0" name="to_position" type="Vector3">
</argument>
<argument index="1" name="include_disabled" type="bool" default="false">
</argument>
<description>
Returns the ID of the closest point to [code]to_position[/code]. Returns -1 if there are no points in the points pool.
Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns -1 if there are no points in the points pool.
</description>
</method>
<method name="get_closest_position_in_segment" qualifiers="const">

View file

@ -87,8 +87,10 @@
</return>
<argument index="0" name="to_position" type="Vector2">
</argument>
<argument index="1" name="include_disabled" type="bool" default="false">
</argument>
<description>
Returns the ID of the closest point to [code]to_position[/code]. Returns -1 if there are no points in the points pool.
Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns -1 if there are no points in the points pool.
</description>
</method>
<method name="get_closest_position_in_segment" qualifiers="const">

View file

@ -97,6 +97,8 @@
</theme_item>
<theme_item name="margin" type="int" default="4">
</theme_item>
<theme_item name="overbright_indicator" type="Texture">
</theme_item>
<theme_item name="preset_bg" type="Texture">
</theme_item>
<theme_item name="screen_picker" type="Texture">

View file

@ -15,29 +15,29 @@
var quit = false
func _initialize():
print("Initialized:")
print(" Starting time: %s" % str(time_elapsed))
print("Initialized:")
print(" Starting time: %s" % str(time_elapsed))
func _idle(delta):
time_elapsed += delta
# Return true to end the main loop
return quit
time_elapsed += delta
# Return true to end the main loop.
return quit
func _input_event(event):
# Record keys
if event is InputEventKey and event.pressed and !event.echo:
keys_typed.append(OS.get_scancode_string(event.scancode))
# Quit on Escape press
if event.scancode == KEY_ESCAPE:
quit = true
# Quit on any mouse click
if event is InputEventMouseButton:
quit = true
# Record keys.
if event is InputEventKey and event.pressed and !event.echo:
keys_typed.append(OS.get_scancode_string(event.scancode))
# Quit on Escape press.
if event.scancode == KEY_ESCAPE:
quit = true
# Quit on any mouse click.
if event is InputEventMouseButton:
quit = true
func _finalize():
print("Finalized:")
print(" End time: %s" % str(time_elapsed))
print(" Keys typed: %s" % var2str(keys_typed))
print("Finalized:")
print(" End time: %s" % str(time_elapsed))
print(" Keys typed: %s" % var2str(keys_typed))
[/codeblock]
</description>
<tutorials>

View file

@ -8,9 +8,9 @@
As opposed to [Timer], it does not require the instantiation of a node. Commonly used to create a one-shot delay timer as in the following example:
[codeblock]
func some_function():
print("start")
yield(get_tree().create_timer(1.0), "timeout")
print("end")
print("Timer started.")
yield(get_tree().create_timer(1.0), "timeout")
print("Timer ended.")
[/codeblock]
</description>
<tutorials>