-
Notifications
You must be signed in to change notification settings - Fork 14
Using TouchControlOverlay
The code to interface with TouchControlOverlay is fairly minimal.
-
Create your callback functions. See the API Reference for the function signatures.
-
Call tco_initialize to create a context handle to use the library. You will need to pass in your current screen context and the struct of callback function pointers created in Step 1 to handle different inputs.
-
Load the controls by calling tco_loadcontrols and providing the XML file with the control information. If you have uploaded it as an asset in your application, it will be found at the relative path app/native/controls.xml.
-
Optionally, call tco_showlabels to show the labels on top of the main window.
-
In your input handling code, call tco_touch when you receive a touch event that you may want the library to handle. It will call the callback functions at this time. You may also wish to call tco_swipedown when a swipe down event occurs, if you wish to show the configuration window.
-
Call tco_shutdown when your application is shutting down.