chiark / gitweb /
Javascript puzzles: switch to a CSS-based drop-down system.
authorSimon Tatham <anakin@pobox.com>
Wed, 26 Apr 2017 13:39:45 +0000 (14:39 +0100)
committerSimon Tatham <anakin@pobox.com>
Wed, 26 Apr 2017 20:48:11 +0000 (21:48 +0100)
commitbc2c1f69fddac3a51d086fb379f0ec8954f4b894
tree9e7d20313a58b4101271b91f8f0d7e6c493e32e8
parentce6e3df99bc7825d1c1638d378320375eb05fd0b
Javascript puzzles: switch to a CSS-based drop-down system.

The previous control buttons and dropdowns based on form elements were
always a bit ugly: partly in a purely visual sense, and partly because
of the nasty bodge I had to do with splitting the usual 'Custom' game
type menu item into two (to get round the fact that if an element of a
<select> is already selected, browsers won't send an event when it's
re-selected). Also, I'm about to want to introduce hierarchical
submenus in the Type menu, and <select> doesn't support that at all.

So here's a replacement system which does everything by CSS
properties, including the popping-up of menus when the mouse moves
over their parent menu item. (Thanks to the Internet in general for
showing me how that trick is done.)
emcc.c
emcclib.js
emccpre.js
html/jspage.pl