mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
New feature in midend.c which allows us to ask for the number of the
currently selected preset, if any. I've used this in the GTK front end to have the Type menu mark the currently selected menu item. (After considerable beating of GTK with sticks, I might add. Grr.) Currently the same UI feature is not yet supported on Windows or MacOS, but I hope to do those too at some point if it's feasible. [originally from svn r7980]
This commit is contained in:
10
devel.but
10
devel.but
@ -2728,6 +2728,16 @@ are owned by the mid-end structure: the front end should not ever
|
||||
free them directly, because they will be freed automatically during
|
||||
\cw{midend_free()}.
|
||||
|
||||
\H{midend-which-preset} \cw{midend_which_preset()}
|
||||
|
||||
\c int midend_which_preset(midend *me);
|
||||
|
||||
Returns the numeric index of the preset game parameter structure
|
||||
which matches the current game parameters, or a negative number if
|
||||
no preset matches. Front ends could use this to maintain a tick
|
||||
beside one of the items in the menu (or tick the \q{Custom} option
|
||||
if the return value is less than zero).
|
||||
|
||||
\H{midend-wants-statusbar} \cw{midend_wants_statusbar()}
|
||||
|
||||
\c int midend_wants_statusbar(midend *me);
|
||||
|
Reference in New Issue
Block a user