mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Fix a few problems.
This commit is contained in:
@@ -207,6 +207,8 @@ void runFunctions(nlohmann::json &json) {
|
||||
seconds = json.at(choice).at(i).at("seconds");
|
||||
else missing = true;
|
||||
if(!missing) ScriptHelper::displayTimeMsg(message, seconds);
|
||||
} else if (type == "saveConfig") {
|
||||
Config::save();
|
||||
}
|
||||
}
|
||||
doneMsg();
|
||||
@@ -284,9 +286,9 @@ void ScriptList::DrawList(void) const {
|
||||
Gui::DrawStringCentered(0, 120, 0.6f, Config::TxtColor, std::string(fileInfo[selection].shortDesc), 400);
|
||||
|
||||
Gui::DrawBottom();
|
||||
Gui::DrawArrow(295, -3);
|
||||
Gui::DrawArrow(315, 242, 180.0);
|
||||
Gui::DrawArrow(0, 242, 270.0);
|
||||
Gui::DrawArrow(295, -1);
|
||||
Gui::DrawArrow(315, 240, 180.0);
|
||||
Gui::DrawArrow(0, 218, 0, 1);
|
||||
Gui::spriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y);
|
||||
|
||||
if (Config::viewMode == 0) {
|
||||
@@ -341,9 +343,9 @@ void ScriptList::DrawSingleObject(void) const {
|
||||
Gui::DrawStringCentered(0, 120-((lines.size()*20)/2)+i*20, 0.6f, TextColor, lines[i], 400);
|
||||
}
|
||||
Gui::DrawBottom();
|
||||
Gui::DrawArrow(295, -3);
|
||||
Gui::DrawArrow(315, 242, 180.0);
|
||||
Gui::DrawArrow(0, 242, 270.0);
|
||||
Gui::DrawArrow(295, -1);
|
||||
Gui::DrawArrow(315, 240, 180.0);
|
||||
Gui::DrawArrow(0, 218, 0, 1);
|
||||
Gui::spriteBlend(sprites_view_idx, arrowPos[3].x, arrowPos[3].y);
|
||||
|
||||
if (Config::viewMode == 0) {
|
||||
@@ -404,7 +406,7 @@ void ScriptList::ListSelection(u32 hDown, u32 hHeld, touchPosition touch) {
|
||||
if (hDown & KEY_TOUCH) {
|
||||
if (Config::viewMode == 0) {
|
||||
for(int i=0;i<ENTRIES_PER_SCREEN && i<(int)fileInfo.size(); i++) {
|
||||
if(touch.py > (i+1)*57 && touch.py < (i+2)*57) {
|
||||
if(touch.py > 40+(i*57) && touch.py < 40+(i*57)+45) {
|
||||
if (dirContents[screenPos + i].isDirectory) {
|
||||
} else if (fileInfo.size() != 0) {
|
||||
if (ScriptHelper::checkIfValid(dirContents[screenPos + i].name) == true) {
|
||||
@@ -542,7 +544,7 @@ void ScriptList::SelectFunction(u32 hDown, u32 hHeld, touchPosition touch) {
|
||||
if (hDown & KEY_TOUCH) {
|
||||
if (Config::viewMode == 0) {
|
||||
for(int i=0;i<ENTRIES_PER_SCREEN && i<(int)fileInfo2.size(); i++) {
|
||||
if(touch.py > (i+1)*57 && touch.py < (i+2)*57) {
|
||||
if(touch.py > 40+(i*57) && touch.py < 40+(i*57)+45) {
|
||||
if (fileInfo2.size() != 0) {
|
||||
choice = fileInfo2[screenPos2 + i];
|
||||
runFunctions(jsonFile);
|
||||
|
||||
Reference in New Issue
Block a user