1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-26 12:12:02 +00:00
nxdumptool/source/ui.h

91 lines
1.9 KiB
C
Raw Normal View History

#pragma once
#ifndef __UI_H__
#define __UI_H__
2019-04-21 17:27:33 +01:00
#define FB_WIDTH 1280
#define FB_HEIGHT 720
#define CHAR_PT_SIZE 12
#define SCREEN_DPI_CNT 96
#define BG_COLOR_RGB 50
#define HIGHLIGHT_BG_COLOR_R 33
#define HIGHLIGHT_BG_COLOR_G 34
#define HIGHLIGHT_BG_COLOR_B 39
#define HIGHLIGHT_FONT_COLOR_R 0
#define HIGHLIGHT_FONT_COLOR_G 255
#define HIGHLIGHT_FONT_COLOR_B 197
#define XCIDUMP_OPTIONS_X_POS (35 * CHAR_PT_SIZE)
#define TAB_WIDTH 4
typedef enum {
2019-04-21 17:27:33 +01:00
resultNone,
resultShowMainMenu,
resultShowXciDumpMenu,
resultDumpXci,
resultShowRawPartitionDumpMenu,
resultDumpRawPartition,
resultShowPartitionDataDumpMenu,
resultDumpPartitionData,
resultShowViewGameCardFsMenu,
resultShowViewGameCardFsGetList,
resultShowViewGameCardFsBrowser,
resultViewGameCardFsBrowserCopyFile,
resultDumpGameCardCertificate,
resultUpdateNSWDBXml,
resultUpdateApplication,
resultExit
} UIResult;
typedef enum {
2019-04-21 17:27:33 +01:00
stateMainMenu,
stateXciDumpMenu,
stateDumpXci,
stateRawPartitionDumpMenu,
stateDumpRawPartition,
statePartitionDataDumpMenu,
stateDumpPartitionData,
stateViewGameCardFsMenu,
stateViewGameCardFsGetList,
stateViewGameCardFsBrowser,
stateViewGameCardFsBrowserCopyFile,
stateDumpGameCardCertificate,
stateUpdateNSWDBXml,
stateUpdateApplication
} UIState;
void uiFill(int x, int y, int width, int height, u8 r, u8 g, u8 b);
2019-04-21 17:27:33 +01:00
void uiDrawString(const char *string, int x, int y, u8 r, u8 g, u8 b);
void uiRefreshDisplay();
void uiStatusMsg(const char *fmt, ...);
2018-06-22 01:46:17 +01:00
void uiUpdateStatusMsg();
void uiPleaseWait();
void uiUpdateFreeSpace();
2019-04-21 17:27:33 +01:00
void uiClearScreen();
void uiPrintHeadline();
int uiInit();
void uiDeinit();
void uiSetState(UIState state);
2019-04-21 17:27:33 +01:00
UIState uiGetState();
2019-04-21 17:27:33 +01:00
UIResult uiProcess();
#endif