User preferences #17
Replies: 4 comments
-
First I'll just write what's on my mind regarding configuration, in a later post I'll try to summarize it in a more organized way. There is a lot of things that right now are stored as Other than initial values, there are shortcuts. These should all be configurable. This part will be hard, considering the way things are done right now. The GUI code is very adhoc. The complicated part is that there are very different types of shortcut. Think about "pan" (moving camera). The current shortcut is the arrow keys. The other common alternative for this is to press "SPACE" or some other button while dragging the mouse. Or zoom, which currently is Other important consideration is what will be part of
Some things:
There's a lot that can be configured.
Yes, good idea. We should use this to find where to store the config file.
There should be a type for the shortcuts, but it would probably be part of a larger configuration object.
Also interesting question. Toml is the default in rust and is a simple format, but on the other hand JSON and YAML are more common formats. I like the idea that the configuration should be easy to edit by hand, in case you want to customize stuff before without opening the program. Toml is very nice and simple when it's simple, but for nested things I think it's not so good. Some other concerns I have: where will config live? In UiState? Will it be a global object (generally considered a bad pattern). One thing is certain: lots of parts of the program will need to access this. I was postponing this topic because of those complications. At the same time, I think it's good to provide configuration soon, because many people might be discouraged to use the program because the defaults are not what they like. It's nice to be able to use the defaults you are used to from other software. There's just so much planning we can do beforehand, at some point we would need to write some code to see what works well. My suggestion would be to gradually improve this. For example, currently we have some keyboard shortcuts hardcoded in the
|
Beta Was this translation helpful? Give feedback.
-
For the shortcuts, I think we need a whole overhaul of the input system. We need an The modelling of the |
Beta Was this translation helpful? Give feedback.
-
I'm considering to remodel the input like this: The
One The The |
Beta Was this translation helpful? Give feedback.
-
I have a draft implementation of the configurable input system in this branch: https://github.com/yds12/tarsila/tree/input-overhaul |
Beta Was this translation helpful? Give feedback.
-
Let's discuss design and implementation of user preferences here.
In #16 I attempted to add a preferences struct for configurable default zoom, but it was a bit hasty.
We can write down both ideas about implementation, as well as what should be considered a preference.
Here is my list of what should be user preferences
Unresolved questions:
Implementation ideas:
directories
crate to get user config dir to store config inBeta Was this translation helpful? Give feedback.
All reactions