mirror of
https://github.com/wiiu-env/AromaUpdater.git
synced 2024-11-24 05:39:20 +01:00
Fix package selection on page 2
This commit is contained in:
parent
804fe518e4
commit
9a1cf20366
@ -8,15 +8,15 @@ ApplicationState::eSubState UpdaterState::UpdateShowVersionsMenu(Input *input) {
|
|||||||
if (selectedOptionX != oldX) {
|
if (selectedOptionX != oldX) {
|
||||||
selectedOptionY = 0;
|
selectedOptionY = 0;
|
||||||
} else {
|
} else {
|
||||||
proccessMenuNavigationY(input, mTotalPackageCount);
|
auto &curPage = mVersionInfo[selectedOptionX];
|
||||||
|
proccessMenuNavigationY(input, curPage.getPackagesCount(mOnlyRequired));
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t offset = 0;
|
int32_t offset = 0;
|
||||||
bool stop = false;
|
bool stop = false;
|
||||||
if (entrySelected(input)) {
|
if (entrySelected(input)) {
|
||||||
for (auto &base : mVersionInfo) {
|
auto &curPage = mVersionInfo[selectedOptionX];
|
||||||
if (stop) { break; }
|
for (auto &cat : curPage.getMutableCategory()) {
|
||||||
for (auto &cat : base.getMutableCategory()) {
|
|
||||||
if (stop) { break; }
|
if (stop) { break; }
|
||||||
for (auto &package : cat.getMutablePackages()) {
|
for (auto &package : cat.getMutablePackages()) {
|
||||||
if (!package.getRequired() && mOnlyRequired) {
|
if (!package.getRequired() && mOnlyRequired) {
|
||||||
@ -31,7 +31,6 @@ ApplicationState::eSubState UpdaterState::UpdateShowVersionsMenu(Input *input) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (buttonPressed(input, Input::BUTTON_PLUS)) {
|
if (buttonPressed(input, Input::BUTTON_PLUS)) {
|
||||||
uint32_t countValid = 0;
|
uint32_t countValid = 0;
|
||||||
|
@ -454,6 +454,14 @@ namespace VersionCheck {
|
|||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const size_t getPackagesCount(bool required) const {
|
||||||
|
size_t result = 0;
|
||||||
|
for (auto &cur : category) {
|
||||||
|
result += cur.getPackagesCount(required);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
using VersionInfo = std::vector<BaseCategory>;
|
using VersionInfo = std::vector<BaseCategory>;
|
||||||
|
Loading…
Reference in New Issue
Block a user