Qt: Add SkyEmu duck icon (#657)

This commit is contained in:
wheremyfoodat 2024-12-02 19:41:51 +02:00 committed by GitHub
parent 79a9de25d4
commit 545ac81d81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 5 deletions

View file

@ -698,7 +698,7 @@ if(NOT BUILD_HYDRA_CORE AND NOT BUILD_LIBRETRO_CORE)
docs/img/rsob_icon.png docs/img/rstarstruck_icon.png docs/img/rpog_icon.png docs/img/rsyn_icon.png docs/img/rsob_icon.png docs/img/rstarstruck_icon.png docs/img/rpog_icon.png docs/img/rsyn_icon.png
docs/img/settings_icon.png docs/img/display_icon.png docs/img/speaker_icon.png docs/img/settings_icon.png docs/img/display_icon.png docs/img/speaker_icon.png
docs/img/sparkling_icon.png docs/img/battery_icon.png docs/img/sdcard_icon.png docs/img/sparkling_icon.png docs/img/battery_icon.png docs/img/sdcard_icon.png
docs/img/rnap_icon.png docs/img/rcow_icon.png docs/img/rnap_icon.png docs/img/rcow_icon.png docs/img/skyemu_icon.png
) )
else() else()
set(FRONTEND_SOURCE_FILES src/panda_sdl/main.cpp src/panda_sdl/frontend_sdl.cpp src/panda_sdl/mappings.cpp) set(FRONTEND_SOURCE_FILES src/panda_sdl/main.cpp src/panda_sdl/frontend_sdl.cpp src/panda_sdl/mappings.cpp)

BIN
docs/img/skyemu_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -19,6 +19,7 @@ struct FrontendSettings {
Rsyn = 1, Rsyn = 1,
Rnap = 2, Rnap = 2,
Rcow = 3, Rcow = 3,
SkyEmu = 4,
}; };
Theme theme = Theme::Dark; Theme theme = Theme::Dark;

View file

@ -38,10 +38,8 @@ FrontendSettings::WindowIcon FrontendSettings::iconFromString(std::string inStri
std::transform(inString.begin(), inString.end(), inString.begin(), [](unsigned char c) { return std::tolower(c); }); std::transform(inString.begin(), inString.end(), inString.begin(), [](unsigned char c) { return std::tolower(c); });
static const std::unordered_map<std::string, WindowIcon> map = { static const std::unordered_map<std::string, WindowIcon> map = {
{"rpog", WindowIcon::Rpog}, {"rpog", WindowIcon::Rpog}, {"rsyn", WindowIcon::Rsyn}, {"rcow", WindowIcon::Rcow},
{"rsyn", WindowIcon::Rsyn}, {"rnap", WindowIcon::Rnap}, {"skyemu", WindowIcon::SkyEmu},
{"rcow", WindowIcon::Rcow},
{"rnap", WindowIcon::Rnap},
}; };
if (auto search = map.find(inString); search != map.end()) { if (auto search = map.find(inString); search != map.end()) {
@ -57,6 +55,7 @@ const char* FrontendSettings::iconToString(WindowIcon icon) {
case WindowIcon::Rsyn: return "rsyn"; case WindowIcon::Rsyn: return "rsyn";
case WindowIcon::Rcow: return "rcow"; case WindowIcon::Rcow: return "rcow";
case WindowIcon::Rnap: return "rnap"; case WindowIcon::Rnap: return "rnap";
case WindowIcon::SkyEmu: return "skyemu";
case WindowIcon::Rpog: case WindowIcon::Rpog:
default: return "rpog"; default: return "rpog";

View file

@ -85,6 +85,7 @@ ConfigWindow::ConfigWindow(ConfigCallback configCallback, MainWindowCallback win
iconSelect->addItem(tr("Happy panda (colourful)")); iconSelect->addItem(tr("Happy panda (colourful)"));
iconSelect->addItem(tr("Sleepy panda")); iconSelect->addItem(tr("Sleepy panda"));
iconSelect->addItem(tr("Cow panda")); iconSelect->addItem(tr("Cow panda"));
iconSelect->addItem(tr("The penguin from SkyEmu"));
iconSelect->setCurrentIndex(static_cast<int>(config.frontendSettings.icon)); iconSelect->setCurrentIndex(static_cast<int>(config.frontendSettings.icon));
connect(iconSelect, &QComboBox::currentIndexChanged, this, [&](int index) { connect(iconSelect, &QComboBox::currentIndexChanged, this, [&](int index) {
@ -398,6 +399,7 @@ void ConfigWindow::setIcon(WindowIcon icon) {
case WindowIcon::Rsyn: updateIcon(":/docs/img/rsyn_icon.png"); break; case WindowIcon::Rsyn: updateIcon(":/docs/img/rsyn_icon.png"); break;
case WindowIcon::Rnap: updateIcon(":/docs/img/rnap_icon.png"); break; case WindowIcon::Rnap: updateIcon(":/docs/img/rnap_icon.png"); break;
case WindowIcon::Rcow: updateIcon(":/docs/img/rcow_icon.png"); break; case WindowIcon::Rcow: updateIcon(":/docs/img/rcow_icon.png"); break;
case WindowIcon::SkyEmu: updateIcon(":/docs/img/skyemu_icon.png"); break;
case WindowIcon::Rpog: case WindowIcon::Rpog:
default: updateIcon(":/docs/img/rpog_icon.png"); break; default: updateIcon(":/docs/img/rpog_icon.png"); break;