Commit Graph

177 Commits

Author SHA1 Message Date
5852285dd4 Ensure screen reader always runs, even when game is paused. 2020-06-08 10:45:38 -05:00
548199d647 Significant improvements to tree-handling.
* Don't manipulate selection in any way. Leave that to Godot, and I'll fix issues in the engine if needed.
* Unify speech rendering of tree rows. This results in more useful announcements of buttons and such when tree items receive focus.
* Only handle `ui_up` and `ui_down` to ensure that focus won't leave a tree when the top-most or bottom-most row is arrowed past.
* Add a bit of handling to strip out duplicate collapse/focus events generated by the remote `SceneTree` in an active game.
2020-06-06 12:05:59 -05:00
123e475fed Update section in README about focus loss. 2020-06-05 15:16:30 -05:00
3a160df5fd Remove code that no longer seems necessary for restoring focus in the editor when lost. 2020-06-05 15:14:04 -05:00
d7b4744c6a Switch focus mode toggle to shift+escape to avoid conflict with Windows. 2020-05-29 11:07:56 -05:00
229353b37f Try to support disabling the screen reader by deleting all Accessibles. 2020-05-28 13:21:31 -05:00
2da7fcff9d Correctly handle case where EditorInspectorSection child isn't expandable. 2020-05-28 13:13:39 -05:00
dd9877557e Enable focus mode use by default in the editor. 2020-05-28 13:13:06 -05:00
95bbbff780 Unify event generation to support both simple and keyfake strategies, using the latter on Android where necessary. 2020-05-28 13:00:42 -05:00
4281e3777d Standardize focus mode on _press_and_release until input event generation is cleaned up. 2020-05-28 11:25:21 -05:00
d7040c25bf Add focus/UI modes and clean up event generation.
UI controls occasionally trap focus and make navigation impossible. Now, Ctrl+escape toggles a mode that attempts to intercept and generate UI focus events and bypass the control's own handling. This can probably be refined, but for now it allows escaping of `TextEdit` via tab. It also won't work everywhere--inn particular, arrowing around still traps focus in trees. But it is at least possible to tab out of most traps.

Further, event generation was cleaned up some. We specifically need to generate `KeyEvents` under Android because, IIRC, it wasn't enough to simply create and send some types of events. We now have two distinct generation strategies. These can probably be combined and streamlined, but for now this works.
2020-05-28 10:58:36 -05:00
9e2e99349c Reformat. 2020-05-19 12:03:59 -05:00
6279f1a3c9 Replace a couple print calls with print_debug. 2020-05-17 18:18:18 -05:00
d2e6b34c42 Add Windows-only steps for using screen reader-based Tolk in the editor. 2020-05-14 11:30:47 -05:00
08ad3db74c s/gitlab/github/g 2020-05-05 08:01:12 -05:00
2463eced93 Fix fail-fast condition that prevented single character text fields from speaking. 2020-04-15 12:32:22 -05:00
b55bdb1547 Put 'dialog:' before message. 2020-03-30 15:15:46 -05:00
fb56a4e37d Begin adding support to enable/disable screen reader. 2020-03-30 15:15:00 -05:00
fa9e10b1ea Change Accessible initialization strategy.
`Accessible` is now a child of its `Control`. This helps to ensure that everything gets cleaned up as it should. Further, node additions no longer scrape the entire scene.

This may introduce regressions and has only been lightly tested, but without it, `ScreenReader` leaked in various circumstances, including some that caused segfaults on exit.
2020-03-18 08:56:45 -05:00
f47450d05d Add support for focusing RichTextLabels. 2020-01-30 13:23:52 -06:00
ae4c4c2aa0 More README updates. 2020-01-29 13:31:22 -06:00
aed41874cd Update to specify 3.2 as the minimum supported version. 2020-01-29 13:24:21 -06:00
d180158749 Remove automatic capture of arrow keys by nodes.
On one hand, it's a bit confusing that UIs can be arrowed around independently of tab/shift-tab. Arrow navigation doesn't feel as intuitive, as it isn't obvious where you'll land.

On the other, it's quicker to navigate between areas of the editor UI by arrowing up/down between controls, and may solve the issue of having to tab a million times to traverse all controls. This also allows for in-game UIs to be traversed using arrows and, quite probably, gamepads as well.
2020-01-25 11:44:20 -06:00
1bef677066 Present button disabled state. 2020-01-21 15:28:23 -06:00
4e1d152657 Note that only 64-bit builds of Godot are supported for now. 2020-01-18 11:00:49 -06:00
ecd3ff6143 Update README. 2020-01-15 09:40:45 -06:00
8ffcaf970e Generate correct ui_focus_next and ui_focus_prev events. 2020-01-14 16:41:35 -06:00
22bb195db0 Don't double-present popup menu item text in cases where the item and shortcut resource name are identical. 2020-01-13 18:06:26 -06:00
fc5b591fe3 Better dialog presentation, and make message labels non-focusable. 2020-01-13 17:59:48 -06:00
fe19717640 Make AcceptDialog focusable so its message can be reread. 2020-01-13 17:52:59 -06:00
cc910a8570 Improve dialog-handling and protect keybinding-setter special case. 2020-01-13 17:16:34 -06:00
be6a6b528e Add support for reading AcceptDialog messages automatically. 2020-01-02 11:43:56 -06:00
2aea81749c Make guessed labels non-focusable to minimize on tabbing. 2019-12-30 09:16:00 -06:00
d5c79f7c56 Don't guess the label for a label. 2019-12-30 09:13:32 -06:00
5b2c16f342 Filter out InputEventMouseButton with device ID of -1, which seems to indicate an origin of touchscreen. Only pass through if explore-by-touch is active. 2019-12-30 08:27:20 -06:00
fbbbb1e06e Revert "Apparently, focused is triggered on mouse_enter as well, so this code isn't needed."
Necessary for next commit, which selectively ignores mouse events and needs this code for explore-by-touch.

This reverts commit dc6186c583.
2019-12-30 08:25:57 -06:00
dc6186c583 Apparently, focused is triggered on mouse_enter as well, so this code isn't needed. 2019-12-29 21:53:35 -06:00
50ea09d7f7 And bring back old cleanup code, which now seems to work better post-yield-abandonment. 2019-12-29 20:14:11 -06:00
96e7153410 Back to storing Accessible as array in ScreenReader, since otherwise the SceneTree is thrashed. 2019-12-29 19:53:15 -06:00
833a34b602 Don't speak empty labels since this seems to cause a silent crash. 2019-12-29 19:52:33 -06:00
4ff6b51114 Double-tap runs ui_accept. 2019-12-29 18:52:44 -06:00
f17c070887 Swiping right/left moves focus between controls. 2019-12-29 18:44:15 -06:00
462cd08bbc Add hook to initiate explore-by-touch. 2019-12-29 18:23:51 -06:00
71318fe938 Count number of taps, and add stub code to dispatch action. 2019-12-29 18:18:09 -06:00
6542994a25 Initial support for touchscreen swipe left/right/up/down. 2019-12-29 17:59:48 -06:00
8f53556129 Better label-guessing logic, and make associated labels non-focusable. 2019-12-28 14:41:36 -06:00
14e1832803 Remove stray whitespace. 2019-12-27 12:54:27 -06:00
75433eb5d6 Migrate focus restoration to _process. 2019-12-27 12:50:33 -06:00
d6a6609673 Eliminate yield in favor of _process. 2019-12-27 12:46:09 -06:00
aea75e961e Eliminate warnings about disconnection of nonexistent timeout signal. 2019-12-27 12:04:09 -06:00