From 79298face0d7dc53b3c014ac910212a5993c1d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 1 Oct 2019 10:55:49 +0200 Subject: [PATCH] doc: Sync classref with current source --- doc/classes/AStar.xml | 4 +++- doc/classes/AStar2D.xml | 4 +++- doc/classes/ColorPicker.xml | 2 ++ doc/classes/MainLoop.xml | 34 +++++++++++++++++----------------- doc/classes/SceneTreeTimer.xml | 6 +++--- 5 files changed, 28 insertions(+), 22 deletions(-) diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index 9ca09371dd7..e835af01e86 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -110,8 +110,10 @@ + + - 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. diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index 0eff2bd560e..3002e3c351c 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -87,8 +87,10 @@ + + - 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. diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index b62eb443d9d..cd36f4fdf0a 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -97,6 +97,8 @@ + + diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index 23ce20a4341..9e65da8eea1 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -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] diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml index a33f875be2e..56788337523 100644 --- a/doc/classes/SceneTreeTimer.xml +++ b/doc/classes/SceneTreeTimer.xml @@ -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]