Skip to content

Commit 1694d6b

Browse files
committed
Fix inventory ui not being drawn in some cases
Closes #81
1 parent 06148b7 commit 1694d6b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/ui/inven_ui.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3058,8 +3058,8 @@ void redraw_inven(bool a1)
30583058

30593059
dst_rect.x = 141;
30603060
dst_rect.y = 36;
3061-
dst_rect.width = art_frame_data.width;
3062-
dst_rect.height = art_frame_data.width;
3061+
dst_rect.width = art_frame_data.width / 2;
3062+
dst_rect.height = art_frame_data.width / 2;
30633063

30643064
art_blit_info.flags = 0;
30653065
art_blit_info.src_rect = &src_rect;
@@ -3095,7 +3095,7 @@ void redraw_inven(bool a1)
30953095
art_blit_info.dst_rect = &dst_rect;
30963096
tig_window_blit_art(inven_ui_window_handle, &art_blit_info);
30973097

3098-
if (inven_ui_panel) {
3098+
if (inven_ui_panel == INVEN_UI_PANEL_PAPERDOLL) {
30993099
tig_art_interface_id_create(341, 0, 0, 0, &(art_blit_info.art_id));
31003100
if (tig_art_frame_data(art_blit_info.art_id, &art_frame_data) != TIG_OK) {
31013101
return;
@@ -3378,6 +3378,8 @@ void redraw_inven(bool a1)
33783378
}
33793379

33803380
if (tig_art_frame_data(art_blit_info.art_id, &art_frame_data) == TIG_OK) {
3381+
src_rect.x = 0;
3382+
src_rect.y = 0;
33813383
src_rect.height = art_frame_data.height;
33823384
src_rect.width = art_frame_data.width;
33833385

@@ -3455,6 +3457,8 @@ void redraw_inven(bool a1)
34553457
}
34563458

34573459
if (tig_art_frame_data(art_blit_info.art_id, &art_frame_data) == TIG_OK) {
3460+
src_rect.x = 0;
3461+
src_rect.y = 0;
34583462
src_rect.height = art_frame_data.height;
34593463
src_rect.width = art_frame_data.width;
34603464

@@ -3484,6 +3488,8 @@ void redraw_inven(bool a1)
34843488
dst_rect.width = text_rects[index].width;
34853489
dst_rect.height = text_rects[index].height;
34863490

3491+
src_rect.x = 0;
3492+
src_rect.y = 0;
34873493
src_rect.width = inven_ui_inventory_paperdoll_inv_slot_rects[index].width;
34883494
src_rect.height = inven_ui_inventory_paperdoll_inv_slot_rects[index].height;
34893495

0 commit comments

Comments
 (0)