From c44212221c27805c56711f1aafef2713872f16a7 Mon Sep 17 00:00:00 2001 From: xtreme8000 Date: Sat, 2 Dec 2023 23:06:35 +0100 Subject: [PATCH] Fix empty inventory render bug + missing help text --- source/game/gui/screen_inventory.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/game/gui/screen_inventory.c b/source/game/gui/screen_inventory.c index 4dcad68..30a9cd0 100644 --- a/source/game/gui/screen_inventory.c +++ b/source/game/gui/screen_inventory.c @@ -85,7 +85,7 @@ static void screen_inventory_reset(struct screen* s, int width, int height) { }; } - for(int k = 0; k < 4; k++) { + for(int k = 0; k < INVENTORY_SIZE_CRAFTING; k++) { slots[slots_index++] = (struct inv_slot) { .x = (88 + (k % 2) * 18) * 2, .y = (26 + (k / 2) * 18) * 2, @@ -259,6 +259,7 @@ static void screen_inventory_render2D(struct screen* s, int width, int height) { inventory_get_slot(inv, INVENTORY_SLOT_ARMOR + 3, &boots) ? &boots : NULL); gfx_write_buffers(true, false, false); + gfx_matrix_modelview(GLM_MAT4_IDENTITY); // draw items for(size_t k = 0; k < slots_index; k++) { @@ -279,6 +280,8 @@ static void screen_inventory_render2D(struct screen* s, int width, int height) { if(inventory_get_picked_item(inv, NULL)) { icon_offset += gutil_control_icon(icon_offset, IB_GUI_CLICK, "Swap item"); + icon_offset + += gutil_control_icon(icon_offset, IB_GUI_CLICK_ALT, "Place one"); } else if(inventory_get_slot(inv, selection->slot, NULL)) { icon_offset += gutil_control_icon(icon_offset, IB_GUI_CLICK, "Pickup item");