General proofreading (#1262)

* General proofreading for grammar and spelling
* General formatting
* Addition of appropriate literals where appropriate, i.e. `&"foo"` for `StringName` cases and `^"foo/bar"` for `NodePath` cases
This commit is contained in:
A Thousand Ships
2025-10-11 10:39:59 +02:00
committed by GitHub
parent a01005f397
commit 0343cedd48
180 changed files with 721 additions and 692 deletions

View File

@@ -8,7 +8,7 @@ may not support reporting tilt.
Input accumulation and V-Sync are disabled by default in this demo to minimize
input lag and get crisp lines (even at low FPS). This makes for the most
responsive drawing experience possible. You can toggle them in the sidebar to
see the difference it makes. Note that on Android, iOS and Web platforms, V-Sync
see the difference it makes. Note that on Android, iOS, and Web platforms, V-Sync
is forced at a system level and cannot be disabled.
Lines are drawn using the Line2D node. Every time you lift off the open and start a new

View File

@@ -50,10 +50,10 @@ func _input(event: InputEvent) -> void:
if event is InputEventMouseMotion:
var event_mouse_motion := event as InputEventMouseMotion
tablet_info.text = "Pressure: %.3f\nTilt: %.3v\nInverted pen: %s" % [
event_mouse_motion.pressure,
event_mouse_motion.tilt,
"Yes" if event_mouse_motion.pen_inverted else "No",
]
event_mouse_motion.pressure,
event_mouse_motion.tilt,
"Yes" if event_mouse_motion.pen_inverted else "No",
]
if event_mouse_motion.pressure <= 0 and stroke.points.size() > 1:
# Initial part of a stroke; create a new line.
@@ -61,6 +61,7 @@ func _input(event: InputEvent) -> void:
# Enable the buttons if they were previously disabled.
%ClearAllLines.disabled = false
%UndoLastLine.disabled = false
if event_mouse_motion.pressure > 0:
# Continue existing line.
stroke.add_point(event_mouse_motion.position)
@@ -73,7 +74,7 @@ func _input(event: InputEvent) -> void:
width_curve.add_point(Vector2(
float(pressure_idx) / pressures.size(),
pressures[pressure_idx]
))
))
# Split into a new line if it gets too long to avoid performance issues.
# This is mostly reached when input accumulation is disabled, as enabling
@@ -175,7 +176,7 @@ func _on_msaa_item_selected(index: int) -> void:
func _on_max_fps_value_changed(value: float) -> void:
# Since the project has low-processor usage mode enabled, we change its sleep interval instead.
# Since this is a value in microseconds between frames, we have to convert it from a FPS value.
# Since this is a value in microseconds between frames, we have to convert it from an FPS value.
@warning_ignore("narrowing_conversion")
OS.low_processor_usage_mode_sleep_usec = 1_000_000.0 / value
$CanvasLayer/PanelContainer/Options/MaxFPS/Value.text = str(roundi(value))

View File

@@ -186,14 +186,14 @@ horizontal_alignment = 1
layout_mode = 2
tooltip_text = "Disable V-Sync to achieve lower input latency.
Note that Android, iOS and Web platforms enforce
Note that Android, iOS, and Web platforms enforce
V-Sync at a system level with no reliable way to disable it."
text = "V-Sync"
[node name="InputAccumulation" type="CheckButton" parent="CanvasLayer/PanelContainer/Options"]
layout_mode = 2
tooltip_text = "If enabled, inputs are collected and merged into a single input event on every rendered frame.
By default, this is enabled in Godot, but this project disables it by default.
Usually this is enabled in Godot, but this project disables it by default.
This should be left disabled for drawing apps that expect precise input,
as lines can become visibly jagged otherwise."