From 2cb0f649f4429ffda9dbc2f8ef81d9a29914ec20 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 25 Jul 2016 22:52:42 +0200 Subject: [PATCH] Main menu, lua_api.txt: Fix mod/texture pack screenshot size issues Recommend mod screenshot size in lua_api.txt Adjust displayed screenshot size of texture packs Document texture pack files in lua_api.txt --- builtin/mainmenu/tab_texturepacks.lua | 4 +-- doc/lua_api.txt | 37 +++++++++++++++++++++++++- textures/base/pack/no_screenshot.png | Bin 140 -> 586 bytes 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/builtin/mainmenu/tab_texturepacks.lua b/builtin/mainmenu/tab_texturepacks.lua index a102fd61d..4614a2974 100644 --- a/builtin/mainmenu/tab_texturepacks.lua +++ b/builtin/mainmenu/tab_texturepacks.lua @@ -96,8 +96,8 @@ local function get_formspec(tabview, name, tabdata) return retval .. render_texture_pack_list(list) .. ";" .. index .. "]" .. - "image[0.25,0.25;4.0,3.7;" .. core.formspec_escape(screenfile or no_screenshot) .. "]" .. - "textarea[0.6,3.5;3.7,1.5;;" .. core.formspec_escape(infotext or "") .. ";]" + "image[0.25,0.25;4.05,2.7;" .. core.formspec_escape(screenfile or no_screenshot) .. "]" .. + "textarea[0.6,2.85;3.7,1.5;;" .. core.formspec_escape(infotext or "") .. ";]" end -------------------------------------------------------------------------------- diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 8656e43e6..4a7a3c0a0 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -157,7 +157,8 @@ to a single modname. Their meaning is that if the specified mod is missing, that does not prevent this mod from being loaded. ### `screenshot.png` -A screenshot shown in modmanager within mainmenu. +A screenshot shown in the mod manager within the main menu. It should +have an aspect ratio of 3:2 and a minimum size of 300×200 pixels. ### `description.txt` A File containing description to be shown within mainmenu. @@ -234,6 +235,40 @@ stripping out the file extension: * e.g. `foomod_foothing.png` * e.g. `foomod_foothing` +Texture pack directory structure +-------------------------------- + + textures + |-- Texture Pack + | |-- screenshot.png + | |-- description.txt + | |-- your_texture_1.png + | |-- your_texture_2.png + `-- Another Texture Pack + +### Texture Pack +This is a directory containing the entire contents of a single texture pack. +It can be chosen more or less freely and will also become the name of the +texture pack. The name must not be “base”. + +### `description.txt` +A file containing a short description of the texture pack to be shown in the +texture packs tab. + +### `screenshot.png` +A preview image showing an in-game screenshot of this texture pack; it will be +shown in the texture packs tab. It should have an aspect ratio of 3:2 and a +minimum size of 300×200 pixels. + +### `your_texture_1.png`, `your_texture_2.png`, etc. +Any other PNG files will be interpreted as textures. They must have the same +names as the textures they are supposed to override. For example, to override +the apple texture of Minetest Game, add a PNG file named `default_apple.png`. + +The custom textures do not necceessarily require the same size as their +originals, but this might be required for a few particular textures. When +unsure, just test your texture pack in-game. + Texture modifiers ----------------- There are various texture modifiers that can be used diff --git a/textures/base/pack/no_screenshot.png b/textures/base/pack/no_screenshot.png index fbaacc9b0921dc6c13d8a0fbcbccfcfeb748bf89..8c7089897218a4aa453493ad6d25e360501dfc5a 100644 GIT binary patch literal 586 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!PjIjR$sgB5?g1&r;vjb?hIQv;UIIBxN#5=* z46WwzA#;H|&H|6fVg?3oVGw3ym^DWND9B#o>Fdh=fL&6=&|34x1X-X7=R92;Ln>~) zz3a$#NI}HG(O}Mu=7Q8aTV_W!&f3OVmX_=je)PF}FQ?%F|5u+R%GdAH5eOF$JLD9> z!QIljK|qXyJMm-0@BPQyXX)}bcXhU|6-YeTe&r`en9jwUx9ZJjzOXBLZRewt(+X7B z2vmQFDN#|Ug%!mBMIEq-3OYa&9e@TCr7*!`6HAX}nb8`son#q7v|U&f`si-e57%z# z1ckwzf0Ei!iasPcAB&NQ5LMKP`05vNc3Ow8@Z9HWV%wZrSRcL?Tvb|pGxOW_{VZx? tGXKJU+<&hHv=S1MiIGgeu&dZ+esB^$*Y|&yHv%J@!PC{xWt~$(69CRl!ZrW^ literal 140 zcmeAS@N?(olHy`uVBq!ia0vp^CxCbwBQua(C=?n6q}T#{LR^9L|NsA&-kg6I$YLr9 z@(X4tIx*v}29Rg$>Eakt5%>1GAuof10L#H(CbNlt>}+=Nf~#(piR9ce@xNN9rySZX k;KZTWBH(0K>p5LdaO1bcstGoWf!Y~7UHx3vIVCg!01#Iw!vFvP