From 5df7c4dc59525266dfcaac65a81f4305ff64e626 Mon Sep 17 00:00:00 2001 From: Looki2000 Date: Sat, 4 Feb 2023 17:52:56 +0100 Subject: [PATCH] I spent over an hour moving player hotbar in i3 inventory to the bottom. --- mods/i3/src/gui.lua | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/mods/i3/src/gui.lua b/mods/i3/src/gui.lua index 365e6c6..83056f0 100644 --- a/mods/i3/src/gui.lua +++ b/mods/i3/src/gui.lua @@ -135,19 +135,35 @@ local function get_inv_slots(data, fs) local spacing = legacy_inventory and 0.25 or 0.1 local size = 1 + -- for hotbar on the bottom + local inv_hitbar_y = inv_y + (legacy_inventory and 3.75 or 3.45 - spacing) + fs"style_type[box;colors=#77777710,#77777710,#777,#777]" for i = 0, hotbar_len - 1 do - box(i * size + inv_x + (i * spacing), inv_y, size, size, "") + --box(i * size + inv_x + (i * spacing), inv_y, size, size, "") + + -- for hotbar on the bottom + box(i * size + inv_x + (i * spacing), inv_hitbar_y, size, size, "") end fs("style_type[list;size=%f;spacing=%f]", size, spacing) - fs("list[current_player;main;%f,%f;%u,1;]", inv_x, inv_y, hotbar_len) + + -- inventory grid + --fs("list[current_player;main;%f,%f;%u,%u;%u]", inv_x, inv_y + (legacy_inventory and 1.25 or 1.15), hotbar_len, data.inv_size / hotbar_len, hotbar_len) + + -- inventory grid on the top + fs("list[current_player;main;%f,%f;%u,%u;%u]", inv_x, inv_y, hotbar_len, data.inv_size / hotbar_len, hotbar_len) + + fs("style_type[list;size=%f;spacing=%f,%f]", size, spacing, legacy_inventory and 0.15 or spacing) - fs("list[current_player;main;%f,%f;%u,%u;%u]", inv_x, inv_y + (legacy_inventory and 1.25 or 1.15), - hotbar_len, data.inv_size / hotbar_len, hotbar_len) + -- hotbar + --fs("list[current_player;main;%f,%f;%u,1;]", inv_x, inv_y, hotbar_len) + + -- hotbar on the bottom of the inventory grid + fs("list[current_player;main;%f,%f;%u,1;]", inv_x, inv_hitbar_y, hotbar_len) fs"style_type[list;size=1;spacing=0.15]" fs"listring[current_player;craft]listring[current_player;main]"