Skip to content

Move .INI settings to Project Settings and replace autoloads with dependency injection#5

Open
bion33 wants to merge 2 commits into
lightsoutgames:masterfrom
bion33:master
Open

Move .INI settings to Project Settings and replace autoloads with dependency injection#5
bion33 wants to merge 2 commits into
lightsoutgames:masterfrom
bion33:master

Conversation

@bion33
Copy link
Copy Markdown

@bion33 bion33 commented May 18, 2021

This merge request:

  • Moves settings from the .INI file to project settings. This makes it more convenient for sighted people, and I hope it is at least just as accessible. The settings are put in project.godot under "[Accessibility]".
  • Replaces autoloaded TTS instance with a single instance trough dependency injection, to keep the autoloads strictly for the game itself.
  • Make loggin configurable, so it can be disabled to keep the console output for other things.

The settings are:

[Accessibility]

In_Editor=true
Logging=true
Speech_Rate=50

I got the inspiration for how to make the settings available in project settings from WAT-Sharp.

These were just changes which were convenient for me personally, so let me know if I should change anything :)

- Move settings from separate .INI to project settings
- Replace autoloaded TTS instance with dependency injection
- Make loggin configurable

Inspiration for how to do project settings: WAT-Sharp
@bion33
Copy link
Copy Markdown
Author

bion33 commented May 18, 2021

Oh, almost forgot to mention, I tested this on Godot 3.3

@ndarilek
Copy link
Copy Markdown
Contributor

ndarilek commented May 19, 2021 via email

@bion33
Copy link
Copy Markdown
Author

bion33 commented May 19, 2021

I didn't think of that, this PR indeed does not achieve that at the moment. I've just tested moving the settings to the Editor Settings, and that works with minor changes.

Would that be a good solution to the problem or does it have drawbacks of its own?

- Make logging an exported property of ScreenReader
- Move should_stop_on_focus back to ScreenReader, where it was originally
- Initialise TTS in ScreenReader instead of Plugin, so that it works in games too (that wasn't particularly smart of me)
- Prevent connect() errors when ScreenReader._enter_tree() is called more than once (for example when moving the node in the tree).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants