- Posts: 1644
- Karma: 480
- Thank you received: 133
As it turns out, the fancy code that I wrote from ODIF and IM2 that allowed me to add settings to the program with a single line of code and allowed the framework to auto generate setting pages and files, well, it sucks...
I have a plan to get back on track, but it involves re-writing the entire settings section, aswell as adopting it into the application everywhere that settings are read from or written to by the app itself. The problem comes from a combination of how Json treats data and how the settings are defined. The current method worked great when settings were only true/false or a numeric value, the program was able to easily tell the difference between the two, but now there are complex settings like device mapping, lightbar animations, axis tuning, all of which would try to store all the data they needed inside one loosely typed and dynamic variable. This worked for saving the settings as Json.net is very good at doing that, but then when it came time to read those settings back into the app from text it started to involve too much special and ultimately flimsy methods.
The solution will be a completely new approach instead of special setting hierarchical classes, the data will be used by the application in regular strongly typed classes. Json can already handle this data in read and write perfectly fine with no modifications needed, the trick will be the other reason I made the settings structure the way I did before, and that is to develop UI middle layers that automatically intemperate the settings hierarchy and show UI pages for them for the user to interact with. I think this can be done with some class property iteration and some added attributes but it is still going to take a lot of work to implement.
Thanks for the continued support and I will keep you guys informed!