chiark / gitweb /
Rework the preset menu system to permit submenus.
authorSimon Tatham <anakin@pobox.com>
Mon, 24 Apr 2017 15:00:24 +0000 (16:00 +0100)
committerSimon Tatham <anakin@pobox.com>
Wed, 26 Apr 2017 20:51:23 +0000 (21:51 +0100)
commita7dc17c4258837b0ee3927f1db5e1c02acee5cc3
tree731c1ac2fe23e9f42d857ad48eaefd1b0c14e44e
parentbc2c1f69fddac3a51d086fb379f0ec8954f4b894
Rework the preset menu system to permit submenus.

To do this, I've completely replaced the API between mid-end and front
end, so any downstream front end maintainers will have to do some
rewriting of their own (sorry). I've done the necessary work in all
five of the front ends I keep in-tree here - Windows, GTK, OS X,
Javascript/Emscripten, and Java/NestedVM - and I've done it in various
different styles (as each front end found most convenient), so that
should provide a variety of sample code to show downstreams how, if
they should need it.

I've left in the old puzzle back-end API function to return a flat
list of presets, so for the moment, all the puzzle backends are
unchanged apart from an extra null pointer appearing in their
top-level game structure. In a future commit I'll actually use the new
feature in a puzzle; perhaps in the further future it might make sense
to migrate all the puzzles to the new API and stop providing back ends
with two alternative ways of doing things, but this seemed like enough
upheaval for one day.
56 files changed:
PuzzleApplet.java
blackbox.c
bridges.c
cube.c
devel.but
dominosa.c
emcc.c
emcclib.js
emccpre.js
fifteen.c
filling.c
flip.c
flood.c
galaxies.c
gtk.c
guess.c
inertia.c
keen.c
lightup.c
loopy.c
magnets.c
map.c
midend.c
mines.c
nestedvm.c
net.c
netslide.c
nullfe.c
nullgame.c
osx.m
palisade.c
pattern.c
pearl.c
pegs.c
puzzles.h
range.c
rect.c
samegame.c
signpost.c
singles.c
sixteen.c
slant.c
solo.c
tents.c
towers.c
tracks.c
twiddle.c
undead.c
unequal.c
unfinished/group.c
unfinished/separate.c
unfinished/slide.c
unfinished/sokoban.c
unruly.c
untangle.c
windows.c