Dashboard Minesweeper
I have a playable dashboard minesweeper game which can be won and lost, reveals chucks of the board at a time when sensible, has basic chrome, can start new games, and has the cool reverse side flip animation happening.
Screenshot removed
Some weird things about dashboard. Firstly, right clicks with a mouse never make it to the widget (via oncontextmenu events anyway – they do in safari), yet the standard equivalent to right clicking, ctrl + left click does?!. Secondly, it some times seems to get stuck with a widget size even between reloading the widget. you need to trick dashboard into think its a new widget (i found dragging the bundle to a different folder and opening it worked for me)
Its cool that its all web technologies, but I begin to feel a little dirty using HTML elements pure as graphical bits. And they some of Apples examples are kinda messy bits of code (javascript URLs, inline event bindings etc).
I'll probably release it into the wild once there is a more reliable reveal method so that Safari's javascript stack frame is not overflowed, game resizing works and the new button is tidied up. Should be playable online with Mozilla and Safari.
And yes, some of 8bit style zombies have crept into the background of that shot :)
Comments
Angus
You may have better luck with ONMOUSEDOWN and ONMOUSEUP, or perhaps event ONMOUSECLICK. The pressed button is a property of the event object in all thsoe cases.
I haven't played with et. al. much yet, but it does seem like a step backward. I'd prefer to it via CSS somehow. In any case it cannot be as bad as the Avalon code samples floating around -- it's like MS took the stupidest member of the IE dev team, taught them VB, and told them to design a layout language.
