diff options
| author | Simon Tatham <anakin@pobox.com> | 2013-04-07 10:24:35 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2013-04-07 10:24:35 +0000 |
| commit | c55e95485483f8a5b66ab4af3a372495d88389ee (patch) | |
| tree | f10b87ec70d99130039b0e241598f565322b6796 /devel.but | |
| parent | ea25b606cbadaf573b71b132c0d2d5081c8516ab (diff) | |
| download | puzzles-c55e95485483f8a5b66ab4af3a372495d88389ee.zip puzzles-c55e95485483f8a5b66ab4af3a372495d88389ee.tar.gz puzzles-c55e95485483f8a5b66ab4af3a372495d88389ee.tar.bz2 puzzles-c55e95485483f8a5b66ab4af3a372495d88389ee.tar.xz | |
Add a new midend function to reset the tile size to the puzzle's
default (but still counting the <puzzle>_TILESIZE user preference
environment variables, where available).
[originally from svn r9820]
Diffstat (limited to 'devel.but')
| -rw-r--r-- | devel.but | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -2812,6 +2812,22 @@ that \e{and} set the \c{user_size} flag, though! The midend relies on the frontend calling \cw{midend_new_game()} (\k{midend-new-game}) before calling \cw{midend_size()}. +\H{midend-reset-tilesize} \cw{midend_reset_tilesize()} + +\c void midend_reset_tilesize(midend *me); + +This function resets the midend's preferred tile size to that of the +standard puzzle. + +As discussed in \k{midend-size}, puzzle resizes are typically +'sticky', in that once the user has dragged the puzzle to a different +window size, the resulting tile size will be remembered and used when +the puzzle configuration changes. If you \e{don't} want that, e.g. if +you want to provide a command to explicitly reset the puzzle size back +to its default, then you can call this just before calling +\cw{midend_size()} (which, in turn, you would probably call with +\c{user_size} set to \cw{FALSE}). + \H{midend-new-game} \cw{midend_new_game()} \c void midend_new_game(midend *me); |