From f16c33fff6b476a95aa44789df309ca19e43315e Mon Sep 17 00:00:00 2001
From: FireForge <67974470+fire-forge@users.noreply.github.com>
Date: Thu, 2 Jun 2022 22:21:25 -0500
Subject: Make Input mouse_mode and use_accumulated_input properties
---
doc/classes/Input.xml | 32 ++++++++++----------------------
doc/classes/InputEventMouseMotion.xml | 2 +-
2 files changed, 11 insertions(+), 23 deletions(-)
(limited to 'doc')
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 2a4381b41b..f841b66888 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -40,7 +40,7 @@
- Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input ([method set_use_accumulated_input]) or agile input flushing ([member ProjectSettings.input_devices/buffering/agile_event_flushing]).
+ Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input ([member use_accumulated_input]) or agile input flushing ([member ProjectSettings.input_devices/buffering/agile_event_flushing]).
The engine will already do this itself at key execution points (at least once per frame). However, this can be useful in advanced cases where you want precise control over the timing of event handling.
@@ -160,12 +160,6 @@
Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together.
-
-
-
- Returns the mouse mode. See the constants for more information.
-
-
@@ -338,21 +332,6 @@
[b]Note:[/b] This value can be immediately overwritten by the hardware sensor value on Android and iOS.
-
-
-
-
- Sets the mouse mode. See the constants for more information.
-
-
-
-
-
-
- Enables or disables the accumulation of similar input events sent by the operating system. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS.
- Input accumulation is enabled by default. It can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input.
-
-
@@ -389,6 +368,15 @@
+
+
+ Controls the mouse mode. See [enum MouseMode] for more information.
+
+
+ If [code]true[/code], similar input events sent by the operating system are accumulated. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS.
+ Input accumulation can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input.
+
+
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index 7cc3de8fcb..ad74204d82 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -5,7 +5,7 @@
Contains mouse and pen motion information. Supports relative, absolute positions and velocity. See [method Node._input].
- [b]Note:[/b] By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, call [method Input.set_use_accumulated_input] with [code]false[/code] to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly.
+ [b]Note:[/b] By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, set [member Input.use_accumulated_input] to [code]false[/code] to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly.
$DOCS_URL/tutorials/inputs/mouse_and_input_coordinates.html
--
cgit v1.2.3