User defined toolbar

It is possible for the user to define a toolbar which will appear beneath normal toolbar.

To define such a toolbar one has to create (modify) text file with name YSokobanButtons.txt. Inside this file every line describes one button. # is used as a comment, so lines starting with # are skipped.

Syntax used to define buttons is:

  button_text (';'|':') command x{',' command x}

i.e. specify button text to appear on button and commands to be executed, separated with either : or ;

button_text is any text or it can have language or country modifiers, for example:

 en{english text},us{text for US},simpl{...},trad{...},text

Language/country modifiers are meant for use if player wants to have translated text even when switching between different languages. If there are no language/country modifiers then switching between languages will not change button texts. YSokoban will search text with modifier for current language, if not found will search for country, if not found will use text without language/country specifier which has to be the last one. Language/Country modifier is the one used in language files as language/country abbreviation. Button text (with all specifiers) is separated with ':' or ';' from the commands

It is possible to have more than one command (separate commands with ',')

Add following lines to file YSokobanButtons.txt to have user tool bar as the one from screen shot

net: toggleNet
reachable: showReachable
movable: showMovable
not moved: showNotMoved
ruler: ruler

Commands

In every command x is an integer parameter (if missing defaults to 0), command is one of the following:

Command Parameter Description similar hot-key
setBookmark 0..9 Bookmark a level Ctrl-0..9
gotoBookmark 0..9 Goto bookmarked level 0..9
zoom -100 .. 100 Zoom (change skin size by the number of pixels specified)
zoom 0 will reset skin size to original size
+/-
=
loadLevel number 0 will restart level, other numbers will load next/prev level Ctrl-arrows
loadUnsolvedLevel +/-1 same as loadLevel, but will find next/prev unsolved level Ctrl-Shift-arrows
loadErrorLevel +/-1 same as loadLevel, but will find next/prev level with errors Alt-Shift-arrows
firstLevel jump to first level in collection Ctrl-Home
lastLevel jump to last level in collection Ctrl-End
useSkin 0, 1..6 0 use current skin, 1..6 use skin (with default net setting) F3..F8
useNetSkin 0, 1..6 0 use current skin, 1..6 use skin (with opposite net setting) Ctrl-F3..F8
toggleNet toggle skin net Ctrl-N
showReachable -1, 0, 1 Show reachable cells (by man or box) 0=toggle, 1=on, -1=off F9
showMovable -1, 0, 1 Show movable boxes 0=toggle, 1=on, -1=off Ctrl-F9
showNotMoved -1, 0, 1 Show not moved boxes 0=toggle, 1=on, -1=off Alt-F9
copyLevel 0
1
2
3
4
10
12
Copy level to clipboard:
0 - normal copy (as Ctrl-L)
1 - copy RLE packed(as Ctrl-Shift-L)
2 copy using '-' instead of space(as Ctrl-Alt-L)
3 copy level as MF8 group uses it (as Ctrl-Shift-Alt-L)
4 - normal copy + MF8 group (as Ctrl-M)
10 - normal copy without solution (Alt-L)
12 - copy type 2 without solution (Alt-Shift-L)
Ctrl-L
Ctrl-Shift-L
Ctrl-Alt-L
Ctrl-Shift-Alt-L
Ctrl-M
Alt-L
Alt-Shift-L
copyMoves 0 .. 3
< 0
Without parameters (same as having parameter 0) it will copy moves to clipboard
param < 0 - copy rest of the moves, same as Ctrl-Alt-C
1 - will use push-format
2 - push-format with marked boxes
3 - push format without go-thru
Ctrl-C
Ctrl-Alt-C
Ctrl-P
Alt-P
Ctrl-Alt-P
ruler 0
1
2
3
-1
-2
0 = ruler off
1 = toggle ruler alpha-num
2 = toggle ruler num-num
3 = change ruler from off->alpha-num->num-num
-1 = set ruler alpha-num
-2 = set ruler num-num
Ctrl-R
Alt -R
saveState save state Ctrl-S
loadState load state Ctrl-O = Ctrl-D
paste 0, 1, 2 0 - paste from clipboard
1 - paste, if moves then stops on every box change
2 - paste, if moves then do them instantly
Ctrl-V
Ctrl-Shift-V
Ctrl-I
screenShot 0, -1 0 make a screen shot of a current level
-1 make a screen shot of all levels
Shift-X
Ctrl-Shift-X
record 0
1
-1
2
3
4
5
6
7
8
9
10
11
12
toggle recording mode
start recording mode
stop recording mode
toggle bmp/png mode
select bmp mode
select png mode
toggle window/level mode
select window mode
select level mode
start recording from 0 frame (or stop)
continue recording (or stop)
start recording from 0 frame (do not stop)
continue recording (do not stop)
stop recording
Ctrl-Alt-Shift-F3


Ctrl-Shift-F3


Ctrl-Alt-F3


Ctrl-F3
Shift-F3



undo 0
1
undo one move
undo pushing box
Shift-backspace
backspace
redo 0
1
2
redo one move
redo pushing box
continue nonstop redo
Shift-space
space
Ctrl-space

Created with Ywiki