mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Applied RetroDECK pathes
This commit is contained in:
parent
77bf5ed8a0
commit
4bbc6997b5
|
@ -70,15 +70,17 @@ GuiMenu::GuiMenu()
|
||||||
if (isFullUI)
|
if (isFullUI)
|
||||||
addEntry("UTILITIES", mMenuColorPrimary, true, [this] { openUtilities(); });
|
addEntry("UTILITIES", mMenuColorPrimary, true, [this] { openUtilities(); });
|
||||||
|
|
||||||
|
addEntry("RETRODECK CONFIGURATOR", mMenuColorPrimary, false, [this] { openRetroDeckConfigurator(); });
|
||||||
|
|
||||||
if (!Settings::getInstance()->getBool("ForceKiosk") &&
|
if (!Settings::getInstance()->getBool("ForceKiosk") &&
|
||||||
Settings::getInstance()->getString("UIMode") != "kiosk") {
|
Settings::getInstance()->getString("UIMode") != "kiosk") {
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
addEntry("QUIT EMULATIONSTATION", mMenuColorPrimary, false, [this] { openQuitMenu(); });
|
addEntry("QUIT RETRODECK", mMenuColorPrimary, false, [this] { openQuitMenu(); });
|
||||||
#else
|
#else
|
||||||
if (Settings::getInstance()->getBool("ShowQuitMenu"))
|
if (Settings::getInstance()->getBool("ShowQuitMenu"))
|
||||||
addEntry("QUIT", mMenuColorPrimary, true, [this] { openQuitMenu(); });
|
addEntry("QUIT", mMenuColorPrimary, true, [this] { openQuitMenu(); });
|
||||||
else
|
else
|
||||||
addEntry("QUIT EMULATIONSTATION", mMenuColorPrimary, false, [this] { openQuitMenu(); });
|
addEntry("QUIT RETRODECK", mMenuColorPrimary, false, [this] { openQuitMenu(); });
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1789,7 +1791,7 @@ void GuiMenu::openQuitMenu()
|
||||||
"NO", nullptr));
|
"NO", nullptr));
|
||||||
});
|
});
|
||||||
auto quitText = std::make_shared<TextComponent>(
|
auto quitText = std::make_shared<TextComponent>(
|
||||||
"QUIT EMULATIONSTATION", Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
|
"QUIT RETRODECK", Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
|
||||||
quitText->setSelectable(true);
|
quitText->setSelectable(true);
|
||||||
row.addElement(quitText, true);
|
row.addElement(quitText, true);
|
||||||
s->addRow(row);
|
s->addRow(row);
|
||||||
|
@ -1947,3 +1949,16 @@ std::vector<HelpPrompt> GuiMenu::getHelpPrompts()
|
||||||
prompts.push_back(HelpPrompt("start", "close menu"));
|
prompts.push_back(HelpPrompt("start", "close menu"));
|
||||||
return prompts;
|
return prompts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GuiMenu::openRetroDeckConfigurator()
|
||||||
|
{
|
||||||
|
// Launch the configurator.sh script
|
||||||
|
std::string command;
|
||||||
|
std::string startDirectory;
|
||||||
|
bool runInBackground;
|
||||||
|
command = "bash /app/tools/configurator.sh";
|
||||||
|
startDirectory = "/app/tools";
|
||||||
|
runInBackground = false;
|
||||||
|
int result = Utils::Platform::launchGameUnix(command, startDirectory, runInBackground);
|
||||||
|
// You can add any checks for the script's outcome here.
|
||||||
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@ private:
|
||||||
void openConfigInput(GuiSettings* settings);
|
void openConfigInput(GuiSettings* settings);
|
||||||
void openCollectionSystemOptions();
|
void openCollectionSystemOptions();
|
||||||
void openOtherOptions();
|
void openOtherOptions();
|
||||||
|
void openRetroDeckConfigurator();
|
||||||
void openUtilities();
|
void openUtilities();
|
||||||
void openQuitMenu();
|
void openQuitMenu();
|
||||||
|
|
||||||
|
@ -54,3 +55,4 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ES_APP_GUIS_GUI_MENU_H
|
#endif // ES_APP_GUIS_GUI_MENU_H
|
||||||
|
|
||||||
|
|
|
@ -600,8 +600,8 @@ void GuiThemeDownloader::parseThemesList()
|
||||||
"downloading is not recommended";
|
"downloading is not recommended";
|
||||||
mWindow->pushGui(new GuiMsgBox(
|
mWindow->pushGui(new GuiMsgBox(
|
||||||
getHelpStyle(),
|
getHelpStyle(),
|
||||||
"IT SEEMS AS IF YOU'RE NOT RUNNING THE LATEST ES-DE RELEASE, PLEASE UPGRADE BEFORE "
|
"ES-DE THEME ENGINE WAS UPDATED UPSTREAM. THESE THEMES MAY NOT BE COMPATIBLE WITH THE CURRENT RETRODECK VERSION."
|
||||||
"PROCEEDING AS THESE THEMES MAY NOT BE COMPATIBLE WITH YOUR VERSION",
|
"CHECK IF A NEW RETRODECK UPDATE IS AVAILABLE, ELSE PLEASE WAIT FOR IT OR PROCEED AT YOUR OWN RISK.",
|
||||||
"OK", [] { return; }, "", nullptr, "", nullptr, nullptr, true));
|
"OK", [] { return; }, "", nullptr, "", nullptr, nullptr, true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,101 +193,13 @@ void ViewController::noGamesDialog()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mNoGamesMessageBox = new GuiMsgBox(
|
mNoGamesMessageBox = new GuiMsgBox(
|
||||||
HelpStyle(), mNoGamesErrorMessage + mRomDirectory, "CHANGE ROM DIRECTORY",
|
HelpStyle(), mNoGamesErrorMessage + mRomDirectory, "QUIT",
|
||||||
[this] {
|
|
||||||
std::string currentROMDirectory;
|
|
||||||
#if defined(_WIN64)
|
|
||||||
currentROMDirectory = Utils::String::replace(FileData::getROMDirectory(), "/", "\\");
|
|
||||||
#else
|
|
||||||
currentROMDirectory = FileData::getROMDirectory();
|
|
||||||
#endif
|
|
||||||
if (Settings::getInstance()->getBool("VirtualKeyboard")) {
|
|
||||||
mWindow->pushGui(new GuiTextEditKeyboardPopup(
|
|
||||||
HelpStyle(), 0.0f, "ENTER ROM DIRECTORY PATH", currentROMDirectory,
|
|
||||||
[this, currentROMDirectory](const std::string& newROMDirectory) {
|
|
||||||
if (currentROMDirectory != newROMDirectory) {
|
|
||||||
Settings::getInstance()->setString(
|
|
||||||
"ROMDirectory", Utils::String::trim(newROMDirectory));
|
|
||||||
Settings::getInstance()->saveFile();
|
|
||||||
#if defined(_WIN64)
|
|
||||||
mRomDirectory =
|
|
||||||
Utils::String::replace(FileData::getROMDirectory(), "/", "\\");
|
|
||||||
#else
|
|
||||||
mRomDirectory = FileData::getROMDirectory();
|
|
||||||
#endif
|
|
||||||
mNoGamesMessageBox->changeText(mNoGamesErrorMessage + mRomDirectory);
|
|
||||||
mWindow->pushGui(new GuiMsgBox(HelpStyle(),
|
|
||||||
"ROM DIRECTORY SETTING SAVED, RESTART\n"
|
|
||||||
"THE APPLICATION TO RESCAN THE SYSTEMS",
|
|
||||||
"OK", nullptr, "", nullptr, "", nullptr,
|
|
||||||
nullptr, true, true));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
false, "SAVE", "SAVE CHANGES?", "Currently configured path:",
|
|
||||||
currentROMDirectory, "LOAD CURRENTLY CONFIGURED PATH",
|
|
||||||
"CLEAR (LEAVE BLANK TO RESET TO DEFAULT PATH)"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
mWindow->pushGui(new GuiTextEditPopup(
|
|
||||||
HelpStyle(), "ENTER ROM DIRECTORY PATH", currentROMDirectory,
|
|
||||||
[this](const std::string& newROMDirectory) {
|
|
||||||
Settings::getInstance()->setString("ROMDirectory",
|
|
||||||
Utils::String::trim(newROMDirectory));
|
|
||||||
Settings::getInstance()->saveFile();
|
|
||||||
#if defined(_WIN64)
|
|
||||||
mRomDirectory =
|
|
||||||
Utils::String::replace(FileData::getROMDirectory(), "/", "\\");
|
|
||||||
#else
|
|
||||||
mRomDirectory = FileData::getROMDirectory();
|
|
||||||
#endif
|
|
||||||
mNoGamesMessageBox->changeText(mNoGamesErrorMessage + mRomDirectory);
|
|
||||||
mWindow->pushGui(new GuiMsgBox(HelpStyle(),
|
|
||||||
"ROM DIRECTORY SETTING SAVED, RESTART\n"
|
|
||||||
"THE APPLICATION TO RESCAN THE SYSTEMS",
|
|
||||||
"OK", nullptr, "", nullptr, "", nullptr,
|
|
||||||
nullptr, true));
|
|
||||||
},
|
|
||||||
false, "SAVE", "SAVE CHANGES?", "Currently configured path:",
|
|
||||||
currentROMDirectory, "LOAD CURRENTLY CONFIGURED PATH",
|
|
||||||
"CLEAR (LEAVE BLANK TO RESET TO DEFAULT PATH)"));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"CREATE DIRECTORIES",
|
|
||||||
[this] {
|
|
||||||
mWindow->pushGui(new GuiMsgBox(
|
|
||||||
HelpStyle(),
|
|
||||||
"THIS WILL CREATE DIRECTORIES FOR ALL THE\n"
|
|
||||||
"GAME SYSTEMS DEFINED IN es_systems.xml\n\n"
|
|
||||||
"THIS MAY CREATE A LOT OF FOLDERS SO IT'S\n"
|
|
||||||
"ADVICED TO REMOVE THE ONES YOU DON'T NEED",
|
|
||||||
"PROCEED",
|
|
||||||
[this] {
|
|
||||||
if (!SystemData::createSystemDirectories()) {
|
|
||||||
mWindow->pushGui(new GuiMsgBox(HelpStyle(),
|
|
||||||
"THE SYSTEM DIRECTORIES WERE SUCCESSFULLY\n"
|
|
||||||
"GENERATED, EXIT THE APPLICATION AND PLACE\n"
|
|
||||||
"YOUR GAMES IN THE NEWLY CREATED FOLDERS",
|
|
||||||
"OK", nullptr, "", nullptr, "", nullptr,
|
|
||||||
nullptr, true));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
mWindow->pushGui(new GuiMsgBox(HelpStyle(),
|
|
||||||
"ERROR CREATING THE SYSTEM DIRECTORIES,\n"
|
|
||||||
"PERMISSION PROBLEMS OR DISK FULL?\n\n"
|
|
||||||
"SEE THE LOG FILE FOR MORE DETAILS",
|
|
||||||
"OK", nullptr, "", nullptr, "", nullptr,
|
|
||||||
nullptr, true));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"CANCEL", nullptr, "", nullptr, nullptr, false));
|
|
||||||
},
|
|
||||||
"QUIT",
|
|
||||||
[] {
|
[] {
|
||||||
SDL_Event quit;
|
SDL_Event quit;
|
||||||
quit.type = SDL_QUIT;
|
quit.type = SDL_QUIT;
|
||||||
SDL_PushEvent(&quit);
|
SDL_PushEvent(&quit);
|
||||||
},
|
},
|
||||||
nullptr, true, false,
|
"", nullptr, "", nullptr, nullptr, true, true,
|
||||||
(mRenderer->getIsVerticalOrientation() ?
|
(mRenderer->getIsVerticalOrientation() ?
|
||||||
0.90f :
|
0.90f :
|
||||||
0.62f * (1.778f / mRenderer->getScreenAspectRatio())));
|
0.62f * (1.778f / mRenderer->getScreenAspectRatio())));
|
||||||
|
|
|
@ -180,7 +180,7 @@ bool Window::init()
|
||||||
progressBarRect.barHeight -= borderThickness * 2.0f;
|
progressBarRect.barHeight -= borderThickness * 2.0f;
|
||||||
progressBarRect.barPosX += borderThickness;
|
progressBarRect.barPosX += borderThickness;
|
||||||
progressBarRect.barPosY += borderThickness;
|
progressBarRect.barPosY += borderThickness;
|
||||||
progressBarRect.color = 0x79010FFF;
|
progressBarRect.color = 0xC858E6FF;
|
||||||
mProgressBarRectangles.emplace_back(progressBarRect);
|
mProgressBarRectangles.emplace_back(progressBarRect);
|
||||||
|
|
||||||
mBackgroundOverlay->setImage(":/graphics/frame.png");
|
mBackgroundOverlay->setImage(":/graphics/frame.png");
|
||||||
|
|
Loading…
Reference in a new issue