diff --git a/doc/formspec.txt b/doc/formspec.txt new file mode 100644 index 0000000..0ef1920 --- /dev/null +++ b/doc/formspec.txt @@ -0,0 +1,80 @@ +Formspec +-------- +Formspec defines a menu. Currently not much else than inventories are +supported. It is a string, with a somewhat strange format. + +Spaces and newlines can be inserted between the blocks, as is used in the +examples. + +Examples: +- Chest: + size[8,9] + list[current_name;main;0,0;8,4;] + list[current_player;main;0,5;8,4;] +- Furnace: + size[8,9] + list[current_name;fuel;2,3;1,1;] + list[current_name;src;2,1;1,1;] + list[current_name;dst;5,1;2,2;] + list[current_player;main;0,5;8,4;] + +Elements: + +size[,] +^ Define the size of the menu in inventory slots +^ deprecated: invsize[,;] + +list[;;,;,;] +^ Show an inventory list + +image[,;,;] +^ Show an image +^ Position and size units are inventory slots + +field[,;,;;