vialab / SMT

Simple Multi-Touch (SMT) Toolkit
http://vialab.science.uoit.ca/smt
GNU General Public License v3.0
43 stars 18 forks source link

Load touch source bindings from a config file #182

Open kiwistrongis opened 10 years ago

kiwistrongis commented 10 years ago

Mark suggested that SMT should be able to load the touch source binding configuration from a config file. ( Specifically, he suggested it be an ini file. )

The idea is that the config file would sit in smt's library folder. The developer/user could customize the config file for each system, for the specific display and touch device setup it has. Then, when the developer copies their sketch from their development machine to another machine, they wouldn't have to change their setup function of their sketch (but could, if they want), smt would just load (presuably already set up) config file on the other machine.

The SMT.setTouchSourceBounds methods would still override the system's configuration at runtime. Manual editing of the file would be required for changing the system's defaults.

If the config file is missing at runtime, a template config file should be created, but with all the options commented out, so that if a developer does not know about the config file feature, it doesn't affect them.

The config file should have a verbose option, that defaults to true, that tells smt to state every option that is loaded from the config file. This would help developers debug system configuration issues.