Skip to content

Commit

Permalink
Add new category and more
Browse files Browse the repository at this point in the history
Added save to current folder option, altered the colours of Amiigo Maker, and reset active Amiibo when disabling Emuiibo.
  • Loading branch information
CompSciOrBust committed Aug 18, 2022
1 parent e8b1367 commit 8b8d8d3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,13 @@ Install [LibNX](https://switchbrew.org/wiki/Setting_up_Development_Environment).

Recursively clone this repo.

Run (dkp-)pacman -S switch-glm

Run (dkp-)pacman -S switch-glm

Run (dkp-)pacman -S switch-glfw

Run (dkp-)pacman -S switch-glad

Run (dkp-)pacman -S switch-curl

Run "Make".
Run Make

Optionally run "nxlink -s Amiigo.nro" after opening NetLoader to get debugging info.

Expand Down
3 changes: 2 additions & 1 deletion include/AmiigoSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace Amiigo::Settings
saveToRoot,
saveByGameName,
saveByAmiiboSeries,
categoryCount = saveByAmiiboSeries+1
saveByCurrentFolder,
categoryCount = saveByCurrentFolder+1
};
}
14 changes: 12 additions & 2 deletions source/AmiigoUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ namespace Amiigo::UI
break;

case Amiigo::Settings::categoryModes::saveByAmiiboSeries:
categoryButton->setText("Save to current folder");
break;

case Amiigo::Settings::categoryModes::saveByCurrentFolder:
categoryButton->setText("Save to root");
break;

Expand All @@ -208,10 +212,15 @@ namespace Amiigo::UI
break;

case Amiigo::Settings::categoryModes::saveByAmiiboSeries:
static_cast<Arriba::Elements::Button*>(Arriba::findObjectByName("CategorySettingsButton"))->setText("Save to root");
static_cast<Arriba::Elements::Button*>(Arriba::findObjectByName("CategorySettingsButton"))->setText("Save to current folder");
static_cast<Arriba::Primitives::Text*>(Arriba::findObjectByName("StatusBarText"))->setText("Amiibos will save to sdmc:/emuiibo/amiibo series");
break;

case Amiigo::Settings::categoryModes::saveByCurrentFolder:
static_cast<Arriba::Elements::Button*>(Arriba::findObjectByName("CategorySettingsButton"))->setText("Save to root");
static_cast<Arriba::Primitives::Text*>(Arriba::findObjectByName("StatusBarText"))->setText("Amiibos will save to the current location");
break;

default:
static_cast<Arriba::Elements::Button*>(Arriba::findObjectByName("CategorySettingsButton"))->setText("Error");
static_cast<Arriba::Primitives::Text*>(Arriba::findObjectByName("StatusBarText"))->setText("Error, uknown category mode");
Expand Down Expand Up @@ -335,6 +344,7 @@ namespace Amiigo::UI
switch (emu::GetEmulationStatus())
{
case emu::EmulationStatus::On:
emu::ResetActiveVirtualAmiibo();
emu::SetEmulationStatus(emu::EmulationStatus::Off);
static_cast<Arriba::Primitives::Text*>(Arriba::findObjectByName("StatusBarText"))->setText("Emuiibo disabled");
break;
Expand Down Expand Up @@ -429,7 +439,7 @@ namespace Amiigo::UI
makerIsInCategory = false;
}
makerList->updateStrings(seriesList);
Arriba::Colour::neutral = {0.22,0.8,0.47,0.97};
Arriba::Colour::neutral = {0.20,0.76,0.45,0.97};
Arriba::Colour::highlightA = {0.6,0.95,0.98,0.97};
Arriba::Colour::highlightB = {0.1,0.98,0.55,0.97};
static_cast<Arriba::Primitives::Text*>(Arriba::findObjectByName("StatusBarText"))->setText("Amiigo Store");
Expand Down
4 changes: 4 additions & 0 deletions source/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ void createVirtualAmiibo(AmiiboCreatorData amiibo)
pathBase += amiibo.amiiboSeries + "/";
mkdir(pathBase.c_str(), 0);
break;

case Amiigo::Settings::saveByCurrentFolder:
if (Amiigo::UI::selectorPath != "Favorites") pathBase = Amiigo::UI::selectorPath + "/";
break;;
}
pathBase += amiibo.name;
mkdir(pathBase.c_str(), 0);
Expand Down

0 comments on commit 8b8d8d3

Please sign in to comment.