mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-02 16:49:05 +00:00
Universal-Updater Full Rewrite based of UniStore v3.0.0. (#51)
* No Nightlies for the Full-Rewrite. * Initial push, i guess. * Forgot to push the Test UniStore + T3X... * Use C2D flags for wrapping and centering * gitignore t3x correctly * Remove Test Store and hardcode to `sdmc:/3ds/Universal-Updater/stores/Universal-DB.unistore` for now. * Is functional now. * *More special checks and work.* * const <typename T> &. * Universal-DB, not Universal DB. * Derp. * Make 3DSX, NDS & Archive path configurable. * Last fixes + Fade out screen on exit. * See Desc. for more. - Add QR Code scan for downloading UniStores. - Add new Graphics. - Some fixes + improvements. * Fix search filtering, re-sort after search * Fix update check * Clear search items with X, not just reset results * The next progress. * PLEASE tell me, this is the only error.. Co-authored-by: Pk11 <epicpkmn11@outlook.com>
This commit is contained in:
+45
-14
@@ -27,24 +27,55 @@
|
||||
#ifndef _UNIVERSAL_UPDATER_GFX_HPP
|
||||
#define _UNIVERSAL_UPDATER_GFX_HPP
|
||||
|
||||
#include "colorHelper.hpp"
|
||||
#include "gui.hpp"
|
||||
#include "common.hpp"
|
||||
#include "sprites.h"
|
||||
#include <citro2d.h>
|
||||
#include <string>
|
||||
|
||||
extern std::unique_ptr<Config> config;
|
||||
/*
|
||||
Define all used Colors, for easier changes.
|
||||
*/
|
||||
|
||||
/* Standard Colors. */
|
||||
#define WHITE C2D_Color32(255, 255, 255, 255)
|
||||
#define BLACK C2D_Color32(0, 0, 0, 255)
|
||||
#define TRANSPARENT C2D_Color32(0, 0, 0, 0)
|
||||
#define DIM_COLOR C2D_Color32(0, 0, 0, 190)
|
||||
|
||||
/* Bar, Text, BG Colors. */
|
||||
#define TEXT_COLOR WHITE
|
||||
#define BAR_COLOR C2D_Color32(50, 73, 98, 255)
|
||||
#define BAR_OUTL_COLOR C2D_Color32(25, 30, 53, 255)
|
||||
#define BG_COLOR C2D_Color32(38, 44, 77, 255)
|
||||
|
||||
/* Progressbar Colors. */
|
||||
#define PROGRESSBAR_OUT_COLOR BLACK
|
||||
#define PROGRESSBAR_IN_COLOR WHITE
|
||||
|
||||
/* Entry Colors. */
|
||||
#define ENTRY_BAR_COLOR BAR_COLOR
|
||||
#define ENTRY_BAR_OUTL_COLOR BAR_OUTL_COLOR
|
||||
|
||||
/* Entry Box Colors. */
|
||||
#define BOX_INSIDE_COLOR C2D_Color32(49, 49, 49, 255)
|
||||
#define BOX_SELECTED_COLOR C2D_Color32(240, 0, 0, 255)
|
||||
#define BOX_UNSELECTED_COLOR BLACK
|
||||
|
||||
/* Search Menu Colors. */
|
||||
#define SEARCH_BAR_COLOR C2D_Color32(51, 75, 102, 255)
|
||||
#define SEARCH_BAR_OUTL_COLOR BAR_OUTL_COLOR
|
||||
|
||||
/* Sidebar Colors. */
|
||||
#define SIDEBAR_SELECTED_COLOR C2D_Color32(108, 130, 155, 255)
|
||||
#define SIDEBAR_UNSELECTED_COLOR C2D_Color32(77, 101, 128, 255)
|
||||
|
||||
namespace GFX {
|
||||
// Basic GUI.
|
||||
void DrawTop(void);
|
||||
void DrawBottom(void);
|
||||
// Draw arrow.
|
||||
void DrawArrow(int x, int y, float rotation = 0, int arrowSprite = 0);
|
||||
// Draw Sprites.
|
||||
void DrawSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1);
|
||||
void DrawSpriteBlend(int img, int x, int y, float ScaleX = 1, float ScaleY = 1);
|
||||
|
||||
void DrawButton(int x, int y, std::string ButtonText = "", u32 color = config->buttonColor());
|
||||
void TextFormatted(float x, float y, float size, const char *format, ...);
|
||||
}
|
||||
void DrawBottom();
|
||||
void DrawSprite(const int &img, const int &x, const int &y, const float &ScaleX = 1, const float &ScaleY = 1);
|
||||
void drawBox(const float &xPos, const float &yPos, const float &width = 50, const float &height = 50, const bool &selected = false, const uint32_t &clr = BOX_INSIDE_COLOR);
|
||||
void DrawButton(const float &xPos, const float &yPos, const float &width, const float &height, const bool &selected, const std::string &Text = "");
|
||||
void DrawCheckbox(const float &xPos, const float &yPos, const bool &selected);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* This file is part of Universal-Updater
|
||||
* Copyright (C) 2019-2020 Universal-Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Additional Terms 7.b and 7.c of GPLv3 apply to this file:
|
||||
* * Requiring preservation of specified reasonable legal notices or
|
||||
* author attributions in that material or in the Appropriate Legal
|
||||
* Notices displayed by works containing it.
|
||||
* * Prohibiting misrepresentation of the origin of that material,
|
||||
* or requiring that modified versions of such material be marked in
|
||||
* reasonable ways as different from the original version.
|
||||
*/
|
||||
|
||||
#ifndef _UNIVERSAL_UPDATER_KEYBOARD_HPP
|
||||
#define _UNIVERSAL_UPDATER_KEYBOARD_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Input {
|
||||
std::string setkbdString(uint maxLength, std::string Text);
|
||||
std::uint8_t setu8(std::string Text);
|
||||
int setInt(int maxValue, std::string Text);
|
||||
}
|
||||
|
||||
#endif
|
||||
+6
-6
@@ -25,15 +25,15 @@
|
||||
*/
|
||||
|
||||
#ifndef _UNIVERSAL_UPDATER_MSG_HPP
|
||||
#define UNIVERSAL_UPDATER_MSG_HPP
|
||||
#define _UNIVERSAL_UPDATER_MSG_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Msg {
|
||||
void DisplayMsg(std::string text);
|
||||
void DisplayWarnMsg(std::string Text);
|
||||
bool promptMsg(std::string promptMsg);
|
||||
void DisplayStartMSG();
|
||||
}
|
||||
void DisplayMsg(const std::string &Text);
|
||||
void DisplayWarnMsg(const std::string &Text);
|
||||
bool promptMsg(const std::string &promptMsg);
|
||||
void waitMsg(const std::string &msg);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user