mirror of
https://github.com/xtreme8000/CavEX.git
synced 2025-01-22 09:11:55 -05:00
Fix empty inventory render bug
+ missing help text
This commit is contained in:
parent
b996696b86
commit
c44212221c
1 changed files with 4 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue