From 217f85f282542551a02307b78fd6d4d5acf2055e Mon Sep 17 00:00:00 2001 From: cambragol Date: Mon, 24 Feb 2025 18:15:01 +0900 Subject: [PATCH 1/2] Update pipboy.cc fixes #465 - prevents extra, clickable hidden buttons to list below the list of quests in the status column. --- src/pipboy.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pipboy.cc b/src/pipboy.cc index 93278941..27b55333 100644 --- a/src/pipboy.cc +++ b/src/pipboy.cc @@ -908,8 +908,15 @@ static void pipboyWindowHandleStatus(int a1) gPipboyWindowHolodisksCount = pipboyWindowRenderHolodiskList(-1); + int greaterCount; // need greater count to build enough buttons, but not too many + if (gPipboyQuestLocationsCount > gPipboyWindowHolodisksCount){ + greaterCount = gPipboyQuestLocationsCount; + } else { + greaterCount = gPipboyWindowHolodisksCount; + } + windowRefreshRect(gPipboyWindow, &gPipboyWindowContentRect); - pipboyWindowCreateButtons(2, gPipboyQuestLocationsCount + gPipboyWindowHolodisksCount + 1, false); + pipboyWindowCreateButtons(2, greaterCount, false); windowRefresh(gPipboyWindow); return; } From 9efa18cffd0ce06df229d58fb25274c63efc7562 Mon Sep 17 00:00:00 2001 From: cambragol Date: Tue, 25 Feb 2025 07:41:56 +0900 Subject: [PATCH 2/2] Update pipboy.cc fixes #465 and #466 - previous fix did not handle all cases --- src/pipboy.cc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/pipboy.cc b/src/pipboy.cc index 27b55333..492274c5 100644 --- a/src/pipboy.cc +++ b/src/pipboy.cc @@ -908,21 +908,14 @@ static void pipboyWindowHandleStatus(int a1) gPipboyWindowHolodisksCount = pipboyWindowRenderHolodiskList(-1); - int greaterCount; // need greater count to build enough buttons, but not too many - if (gPipboyQuestLocationsCount > gPipboyWindowHolodisksCount){ - greaterCount = gPipboyQuestLocationsCount; - } else { - greaterCount = gPipboyWindowHolodisksCount; - } - windowRefreshRect(gPipboyWindow, &gPipboyWindowContentRect); - pipboyWindowCreateButtons(2, greaterCount, false); + pipboyWindowCreateButtons(2, gPipboyQuestLocationsCount + gPipboyWindowHolodisksCount + 1, false); windowRefresh(gPipboyWindow); return; } if (_stat_flag == 0 && _holo_flag == 0) { - if (gPipboyQuestLocationsCount != 0 && gPipboyMouseX < 429) { + if (gPipboyQuestLocationsCount != 0 && gPipboyQuestLocationsCount >= a1 && gPipboyMouseX < 429) { soundPlayFile("ib1p1xx1"); blitBufferToBuffer(_pipboyFrmImages[PIPBOY_FRM_BACKGROUND].getData() + PIPBOY_WINDOW_WIDTH * PIPBOY_WINDOW_CONTENT_VIEW_Y + PIPBOY_WINDOW_CONTENT_VIEW_X, PIPBOY_WINDOW_CONTENT_VIEW_WIDTH,