Skip to content

Commit

Permalink
add new button assets, bump libchesto
Browse files Browse the repository at this point in the history
  • Loading branch information
vgmoose committed Mar 25, 2024
1 parent a7814e3 commit b4b3a21
Show file tree
Hide file tree
Showing 215 changed files with 1,191 additions and 18 deletions.
4 changes: 2 additions & 2 deletions gui/AppDetailsContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ std::string getTrimmedDetails(AppDetailsContent* content, std::string details)

AppDetailsContent::AppDetailsContent(Package *package, bool useBannerIcons)
: reportIssue(i18n("contents.report"), L_BUTTON)
, moreByAuthor(i18n("more"), R_BUTTON)
, moreByAuthor(i18n("contents.more"), R_BUTTON)
, title(package->getTitle().c_str(), 35, &HBAS::ThemeManager::textPrimary)
, title2(package->getAuthor().c_str(), 27, &HBAS::ThemeManager::textSecondary)
, details(i18n("contents.placeholder1"), 20 / SCALER, &HBAS::ThemeManager::textPrimary, false, PANE_WIDTH + 20 / SCALER)
Expand Down Expand Up @@ -297,7 +297,7 @@ void AppDetailsContent::switchExtraInfo(Package* package, int newState) {
// update button text
auto hideText = i18n("contents.hide");
auto showText = i18n("contents.show");
showFiles.updateText((std::string(newState == SHOW_LIST_OF_FILES ? hideText : showText) + " " + i18n("contents.showinstalled ")).c_str());
showFiles.updateText((std::string(newState == SHOW_LIST_OF_FILES ? hideText : showText) + " " + i18n("contents.showinstalled")).c_str());
showChangelog.updateText((std::string(newState == SHOW_CHANGELOG ? hideText : showText) + " " + i18n("contents.changelog")).c_str());

// hide/show changelog text based on if neither is true
Expand Down
1 change: 1 addition & 0 deletions gui/AppList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ bool AppList::process(InputEvents* event)
hideSidebar = !hideSidebar;
R = (SCREEN_WIDTH - 400) / 260 + hideSidebar;
this->x = 400 - 260 * hideSidebar;
sidebar->addHints();
update();
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion gui/MainDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ bool MainDisplay::process(InputEvents* event)
}
else writeFailed = true;

if (writeFailed || true) {
if (writeFailed) {
std::string cardText = replaceAll(i18n("errors.writetestfail"), "PATH", tmp_file) + "\n";
#if defined(__WIIU__)
cardText = i18n("errors.sdlock") + "\n"s + cardText;
Expand Down
26 changes: 13 additions & 13 deletions gui/Sidebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,20 @@ Sidebar::~Sidebar()

void Sidebar::addHints()
{
// small indicator to switch to advanced view using L
hider = new ImageElement(RAMFS "res/button-l-outline.png");
hider->resize(20, 20);
hider->position(270, SCREEN_HEIGHT - 35);
super::append(hider);
if (hider == nullptr) {
// small indicator to switch to advanced view using L
hider = new ImageElement(Button::getControllerButtonImageForPlatform(L_BUTTON, false, false));
hider->resize(20, 20);
super::append(hider);
}

hint = new TextElement(i18n("contents.hide"), 15);
hint->position(hider->x + hider->width + 5, hider->y);
super::append(hint);
if (hint == nullptr) {
hint = new TextElement(i18n("sidebar.hide"), 15);
super::append(hint);
}

hider->position(getWidth() - 25 - (!appList->hideSidebar)*(hint->width+10), SCREEN_HEIGHT - 35);
hint->position(hider->x + hider->width + 5, hider->y);
showCurrentCategory = true;
}

Expand Down Expand Up @@ -279,9 +283,5 @@ std::string Sidebar::currentCatValue()
}

int Sidebar::getWidth() {
#if defined(WII)
return 400 - 260 * appList->hideSidebar - 35; // hardcoded sidebar width on wii, for now TODO: fix all the things
#endif
return 400 - 260 * appList->hideSidebar - 35; // hardcoded sidebar width on wii, for now TODO: fix all the things
return 400 - 260 * (appList->R - 3) - 35;
return 400 - 260 * appList->hideSidebar - 35;
}
2 changes: 1 addition & 1 deletion libs/chesto
6 changes: 6 additions & 0 deletions resin/res/controllers/buttons/keyboard_a.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions resin/res/controllers/buttons/keyboard_a_gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions resin/res/controllers/buttons/keyboard_a_outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions resin/res/controllers/buttons/keyboard_a_outline_gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions resin/res/controllers/buttons/keyboard_b.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions resin/res/controllers/buttons/keyboard_b_gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions resin/res/controllers/buttons/keyboard_b_outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions resin/res/controllers/buttons/keyboard_b_outline_gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions resin/res/controllers/buttons/keyboard_backspace.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions resin/res/controllers/buttons/keyboard_backspace_gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions resin/res/controllers/buttons/keyboard_backspace_outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b4b3a21

Please sign in to comment.