First page Back Continue Last page Overview Image
The Widget
- Similar to an App, a Widget lives in its' own folder and is self contained. It may use other Widgets as well as its' own private ones. It contains the following files.
- {WidgetName}.html
- {WidgetName}.js
- {WidgetName}.css
- Listing.json (Optional. Enables on Main Menu.)
- icon.png (Optional)
- All other files based on your widget's needs.
- Each Widget can be run as a standalone App via the WidgetLoader App by creating the listing.json file and providing an icon.png file for the menu.
- Like Apps, other supporting files, such as, images, should be placed in the Widgets's folder. Do not reference a resource, like an image, from another widget to keep them independent of the other Widgets at the expense of duplication so patches and updates can be applied to your Widget without affecting other Widgets.
- To kick start a new Widget, using a tool like 7-Zip, open the SIMRacingAppsServer...exe file and extract the contents of the “widgets/Template” folder to “%USERPROFILE%\SIMRacingApps\widgets\MyNewWidget” folder (USERPROFILE is the folder you see when viewing the folder with your log-in name in Windows Explorer). Go into this new folder and for each file and change the word Template to the name of your new Widget (for example “MyNewWidget”). Open each file and globally replace “Template” with “MyNewWidget”. Important: Make sure your widget name starts with Uppercase.