mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2024-08-20 21:34:09 +02:00
more consistent formspec size decision
This commit is contained in:
parent
c044f5e3b0
commit
860371ecf8
4
init.lua
4
init.lua
@ -49,6 +49,8 @@ local ui = unified_inventory
|
|||||||
ui.style_full = {
|
ui.style_full = {
|
||||||
formspec_x = 1,
|
formspec_x = 1,
|
||||||
formspec_y = 1,
|
formspec_y = 1,
|
||||||
|
formw = 17.75,
|
||||||
|
formh = 12.25,
|
||||||
pagecols = 8,
|
pagecols = 8,
|
||||||
pagerows = 10,
|
pagerows = 10,
|
||||||
page_x = 10.75,
|
page_x = 10.75,
|
||||||
@ -80,6 +82,8 @@ ui.style_full = {
|
|||||||
ui.style_lite = {
|
ui.style_lite = {
|
||||||
formspec_x = 0.6,
|
formspec_x = 0.6,
|
||||||
formspec_y = 0.6,
|
formspec_y = 0.6,
|
||||||
|
formw = 14,
|
||||||
|
formh = 9.75,
|
||||||
pagecols = 4,
|
pagecols = 4,
|
||||||
pagerows = 6,
|
pagerows = 6,
|
||||||
page_x = 10.5,
|
page_x = 10.5,
|
||||||
|
11
internal.lua
11
internal.lua
@ -42,16 +42,13 @@ function ui.get_formspec(player, page)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local formspec = {
|
local formspec = {
|
||||||
"formspec_version[4]size[17.75,12.25]",
|
"formspec_version[4]",
|
||||||
|
"size["..ui_peruser.formw..","..ui_peruser.formh.."]",
|
||||||
pagedef.formspec_prepend and "" or "no_prepend[]",
|
pagedef.formspec_prepend and "" or "no_prepend[]",
|
||||||
ui.standard_background -- Background
|
ui.standard_background
|
||||||
}
|
}
|
||||||
local n = 4
|
|
||||||
|
|
||||||
if draw_lite_mode then
|
local n = 5
|
||||||
formspec[1] = "formspec_version[4]size[14,9.75]"
|
|
||||||
formspec[3] = ui.standard_background
|
|
||||||
end
|
|
||||||
|
|
||||||
local perplayer_formspec = ui.get_per_player_formspec(player_name)
|
local perplayer_formspec = ui.get_per_player_formspec(player_name)
|
||||||
local fsdata = pagedef.get_formspec(player, perplayer_formspec)
|
local fsdata = pagedef.get_formspec(player, perplayer_formspec)
|
||||||
|
Loading…
Reference in New Issue
Block a user