JKSV/inc/ui.h

81 lines
1.8 KiB
C++

#ifndef UI_H
#define UI_H
#include <vector>
#include <string>
#include "data.h"
#include "gfx.h"
//ui headers - split up to keep a bit more organized
#include "menu.h"
#include "miscui.h"
#include "txtui.h"
#include "uiupdate.h"
enum menuState
{
USR_SEL,
TTL_SEL,
FLD_SEL,
ADV_MDE,
TXT_USR,
TXT_TTL,
TXT_FLD,
EX_MNU,
OPT_MNU
};
namespace ui
{
//Text menus
extern bool textMode;
//Current menu/ui state
extern int mstate, prevState;
//Holds theme set id
extern ColorSetId thmID;
//Both UI modes need access to this
extern std::string folderMenuInfo;
//Strings since translation support soonish
extern std::string userHelp, titleHelp, folderHelp, optHelp;
extern std::string confBlackList, confOverwrite, confRestore, confDel, confCopy;
extern std::string confEraseNand, confEraseFolder;
//Colors to use now that I added theme detection
/*NEED TO COME UP WITH BETTER NAMES*/
extern clr clearClr, mnuTxt, txtClr, rectLt, rectSh, tboxClr, sideRect;
//Textbox graphics
extern tex *cornerTopLeft, *cornerTopRight, *cornerBottomLeft, *cornerBottomRight;
//Covers left and right of progress bar to fake being not a rectangle.
extern tex *progCovLeft, *progCovRight;
//Side bar from Freebird. RIP
extern tex *sideBar;
//Shared font
extern font *shared;
//Sets colors and loads font for icon creation
void initTheme();
//Loads graphics and stuff
void init();
void exit();
//Clears and draws general stuff used by multiple screens
void drawUI();
//Draws selection box
void drawBoundBox(int x, int y, int w, int h, int clrSh);
//switch case so we don't have problems with multiple main loops like 3DS
void runApp(const uint64_t& down, const uint64_t& held);
}
#endif