From 0ab8be2f1a12bbcd7d5676fca8707d2fe4120253 Mon Sep 17 00:00:00 2001 From: kwek kwok Date: Thu, 10 Dec 2020 16:12:52 +0000 Subject: [PATCH 1/2] Fix outfit list pagination logic. There were weird "phantom" non-existent outfits introduced when > 11. Also, the page separator is on a different column, so can use all real estate. --- src/papyrus/skyoutsysmcm.psc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/papyrus/skyoutsysmcm.psc b/src/papyrus/skyoutsysmcm.psc index 5d8d673..e511f7d 100644 --- a/src/papyrus/skyoutsysmcm.psc +++ b/src/papyrus/skyoutsysmcm.psc @@ -337,18 +337,18 @@ EndFunction AddHeaderOption("$SkyOutSys_MCMHeader_OutfitList") If _sOutfitNames.Length > 11 ; too many to fit on one screen Int iCount = _sOutfitNames.Length - Int iPageCount = iCount / 8 - If iPageCount * 8 < iCount + Int iPageCount = iCount / 11 ;; Kwek - the separator and buttons are on a different column, so can use all real estate + If iPageCount * 11 < iCount iPageCount = iPageCount + 1 EndIf If _iOutfitBrowserPage >= iPageCount _iOutfitBrowserPage = iPageCount - 1 EndIf - Int iOffset = _iOutfitBrowserPage * 8 + Int iOffset = _iOutfitBrowserPage * 11 Int iIterator = 0 - Int iMax = iCount - _iOutfitBrowserPage - If iMax > 8 ; (visible - 3) -- make room for page separator and buttons - iMax = 8 + Int iMax = iCount - iOffset ;;Kwek - use iOffset instead of _iOutfitBrowserPage yields correct result, else weirdness ensues + If iMax > 11 ;; Kwek - the separator and buttons are on a different column, so can use all real estate + iMax = 11 EndIf While iIterator < iMax String sName = _sOutfitNames[iIterator + iOffset] @@ -892,4 +892,4 @@ EndFunction EndState ;/EndBlock/; ;/EndBlock/; -;/EndBlock/; \ No newline at end of file +;/EndBlock/; From 481bfdf1754bd96516705919980af8ea14d29f54 Mon Sep 17 00:00:00 2001 From: MetricExpansion <> Date: Thu, 10 Dec 2020 19:36:40 -0800 Subject: [PATCH 2/2] Cleanup bufix comments --- src/papyrus/skyoutsysmcm.psc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/papyrus/skyoutsysmcm.psc b/src/papyrus/skyoutsysmcm.psc index e511f7d..eb73db3 100644 --- a/src/papyrus/skyoutsysmcm.psc +++ b/src/papyrus/skyoutsysmcm.psc @@ -337,7 +337,7 @@ EndFunction AddHeaderOption("$SkyOutSys_MCMHeader_OutfitList") If _sOutfitNames.Length > 11 ; too many to fit on one screen Int iCount = _sOutfitNames.Length - Int iPageCount = iCount / 11 ;; Kwek - the separator and buttons are on a different column, so can use all real estate + Int iPageCount = iCount / 11 If iPageCount * 11 < iCount iPageCount = iPageCount + 1 EndIf @@ -346,8 +346,8 @@ EndFunction EndIf Int iOffset = _iOutfitBrowserPage * 11 Int iIterator = 0 - Int iMax = iCount - iOffset ;;Kwek - use iOffset instead of _iOutfitBrowserPage yields correct result, else weirdness ensues - If iMax > 11 ;; Kwek - the separator and buttons are on a different column, so can use all real estate + Int iMax = iCount - iOffset + If iMax > 11 iMax = 11 EndIf While iIterator < iMax