Category Archives: Windows Gadget
EDIT: 01 Aug 2013: Due to me switching LOL servers I cannot continue updating the na thread – I have moved updates to this OCE thread: http://forums.oce.leagueoflegends.com/board/showthread.php?t=10594
This post is a little different to my previous ones as this is about Windows Vista/7 Gadgets. I play this game called League Of Legends (LOL) and when they patch the game the servers go offline, I got bored of refreshing their front end to see when it was back up, so I built a gadget to do it for me. About a year later (nowish) it has been noticed by Riot (whom make LOL) and they are probably going to use it which is really cool, the forum thread is here: http://na.leagueoflegends.com/board/showthread.php?t=137402. Enough about how cool this is, I am now going to summarise what I learnt about windows gadgets in building this.
- .gadget files are just renamed .zip files, so you can unzip and have a look to your hearts content.
- Settings are written and read through the calls System.Gadget.Settings.read and System.Gadget.Settings.write (I used these in a js script).
- Some useful System.Gadget things I discovered are onDock, onUndock (these two are event handlers for when the gadget is changed from small to big or vice-versa) and onSettingsClosed (called when the gadgets settings have closed, here’s where you update the gadget) these three all require you to assign a function to them that will be called when the event occurs. The last one I used is settingsUI which is the name of the html file that is called for the settings.