mirror of
https://github.com/joel16/CMFileManager-PSP.git
synced 2024-11-23 11:49:51 +00:00
gui: Add helper function for intraFontPrintf to shorten args
This commit is contained in:
parent
55e4eb4a52
commit
13dea6e3ab
@ -14,6 +14,7 @@ namespace G2D {
|
||||
char *KeyboardGetText(const std::string &desc_msg, const std::string &initial_msg);
|
||||
void FontSetStyle(intraFont *font, float size, unsigned int colour, unsigned int options);
|
||||
float GetTextHeight(intraFont *font);
|
||||
float DrawText(float x, float y, const char *text);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -144,4 +144,8 @@ namespace G2D {
|
||||
float GetTextHeight(intraFont *font) {
|
||||
return font->advancey * font->size / 4.f + 2.f;
|
||||
}
|
||||
|
||||
float DrawText(float x, float y, const char *text) {
|
||||
return intraFontPrintf(font, x, y, text);
|
||||
}
|
||||
}
|
||||
|
@ -35,16 +35,16 @@ namespace GUI {
|
||||
snprintf(time_string, 30, "%2i:%02i %s", ((time.hour % 12) == 0)? 12 : time.hour % 12, time.minutes, (time.hour / 12)? "PM" : "AM");
|
||||
|
||||
G2D::FontSetStyle(font, 1.0f, WHITE, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, 5, 14, time_string);
|
||||
G2D::DrawText(5, 14, time_string);
|
||||
|
||||
int state = scePowerIsBatteryCharging();
|
||||
int percent = scePowerGetBatteryLifePercent();
|
||||
int battery_val = (percent / 20);
|
||||
|
||||
static char percent_string[13];
|
||||
snprintf(percent_string, 13, "%d%%", percent);
|
||||
static char percent_string[10];
|
||||
snprintf(percent_string, 10, "%d%%", percent);
|
||||
int percent_width = intraFontMeasureText(font, percent_string);
|
||||
intraFontPrint(font, 475 - percent_width, 14, percent_string);
|
||||
G2D::DrawText(475 - percent_width, 14, percent_string);
|
||||
|
||||
G2D::DrawImage(state != 0? battery_charging[battery_val] : battery[battery_val], 475 - percent_width - battery[battery_val]->w, 2);
|
||||
}
|
||||
@ -65,11 +65,11 @@ namespace GUI {
|
||||
G2D::DrawRect(0, 18, 480, 254, G2D_RGBA(0, 0, 0, cfg.dark_theme? 50: 80));
|
||||
G2D::DrawImage(cfg.dark_theme? dialog_dark : dialog, ((480 - (dialog->w)) / 2), ((272 - (dialog->h)) / 2));
|
||||
G2D::FontSetStyle(font, 1.0f, TITLE_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, ((480 - (dialog->w)) / 2) + 10, ((272 - (dialog->h)) / 2) + 20, title.c_str());
|
||||
G2D::DrawText(((480 - (dialog->w)) / 2) + 10, ((272 - (dialog->h)) / 2) + 20, title.c_str());
|
||||
|
||||
int text_width = intraFontMeasureText(font, message.c_str());
|
||||
G2D::FontSetStyle(font, 1.0f, TEXT_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, ((480 - (text_width)) / 2), ((272 - (dialog->h)) / 2) + 60, message.c_str());
|
||||
G2D::DrawText(((480 - (text_width)) / 2), ((272 - (dialog->h)) / 2) + 60, message.c_str());
|
||||
|
||||
G2D::DrawRect(((480 - dialog->w) / 2) + 20, ((272 - dialog->h) / 2) + 70, 318, 4, SELECTOR_COLOUR);
|
||||
G2D::DrawRect(((480 - dialog->w) / 2) + 20, ((272 - dialog->h) / 2) + 70,
|
||||
|
@ -44,7 +44,7 @@ namespace GUI {
|
||||
G2D::DrawRect(0, 18, 480, 254, G2D_RGBA(0, 0, 0, cfg.dark_theme? 50: 80));
|
||||
G2D::DrawImage(cfg.dark_theme? dialog_dark : dialog, ((480 - (dialog->w)) / 2), ((272 - (dialog->h)) / 2));
|
||||
G2D::FontSetStyle(font, 1.0f, TITLE_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, ((480 - (dialog->w)) / 2) + 10, ((272 - (dialog->h)) / 2) + 20, "Delete");
|
||||
G2D::DrawText(((480 - (dialog->w)) / 2) + 10, ((272 - (dialog->h)) / 2) + 20, "Delete");
|
||||
|
||||
int confirm_width = intraFontMeasureText(font, "YES");
|
||||
int cancel_width = intraFontMeasureText(font, "NO");
|
||||
@ -54,12 +54,12 @@ namespace GUI {
|
||||
else
|
||||
G2D::DrawRect((409 - (confirm_width)) - 5, (180 - (font->texYSize - 15)) - 5, confirm_width + 10, (font->texYSize - 5) + 10, SELECTOR_COLOUR);
|
||||
|
||||
intraFontPrint(font, 409 - (confirm_width), (192 - (font->texYSize - 15)) - 3, "YES");
|
||||
intraFontPrint(font, 364 - cancel_width, (192 - (font->texYSize - 15)) - 3, "NO");
|
||||
G2D::DrawText(409 - (confirm_width), (192 - (font->texYSize - 15)) - 3, "YES");
|
||||
G2D::DrawText(364 - cancel_width, (192 - (font->texYSize - 15)) - 3, "NO");
|
||||
|
||||
int prompt_width = intraFontMeasureText(font, prompt.c_str());
|
||||
G2D::FontSetStyle(font, 1.0f, TEXT_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, ((480 - (prompt_width)) / 2), ((272 - (dialog->h)) / 2) + 60, prompt.c_str());
|
||||
G2D::DrawText(((480 - (prompt_width)) / 2), ((272 - (dialog->h)) / 2) + 60, prompt.c_str());
|
||||
}
|
||||
|
||||
void ControlDeleteOptions(MenuItem *item, int *ctrl) {
|
||||
|
@ -13,7 +13,7 @@ namespace GUI {
|
||||
G2D::DrawRect(0, 18, 480, 254, G2D_RGBA(0, 0, 0, cfg.dark_theme? 50: 80));
|
||||
G2D::DrawImage(cfg.dark_theme? dialog_dark : dialog, ((480 - (dialog->w)) / 2), ((272 - (dialog->h)) / 2));
|
||||
G2D::FontSetStyle(font, 1.0f, TITLE_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, ((480 - (dialog->w)) / 2) + 10, ((272 - (dialog->h)) / 2) + 20, "Exit");
|
||||
G2D::DrawText(((480 - (dialog->w)) / 2) + 10, ((272 - (dialog->h)) / 2) + 20, "Exit");
|
||||
|
||||
int confirm_width = intraFontMeasureText(font, "YES");
|
||||
int cancel_width = intraFontMeasureText(font, "NO");
|
||||
@ -23,12 +23,12 @@ namespace GUI {
|
||||
else
|
||||
G2D::DrawRect((409 - (confirm_width)) - 5, (180 - (font->texYSize - 15)) - 5, confirm_width + 10, (font->texYSize - 5) + 10, SELECTOR_COLOUR);
|
||||
|
||||
intraFontPrint(font, 409 - (confirm_width), (192 - (font->texYSize - 15)) - 3, "YES");
|
||||
intraFontPrint(font, 364 - cancel_width, (192 - (font->texYSize - 15)) - 3, "NO");
|
||||
G2D::DrawText(409 - (confirm_width), (192 - (font->texYSize - 15)) - 3, "YES");
|
||||
G2D::DrawText(364 - cancel_width, (192 - (font->texYSize - 15)) - 3, "NO");
|
||||
|
||||
int prompt_width = intraFontMeasureText(font, prompt.c_str());
|
||||
G2D::FontSetStyle(font, 1.0f, TEXT_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, ((480 - (prompt_width)) / 2), ((272 - (dialog->h)) / 2) + 60, prompt.c_str());
|
||||
G2D::DrawText(((480 - (prompt_width)) / 2), ((272 - (dialog->h)) / 2) + 60, prompt.c_str());
|
||||
}
|
||||
|
||||
bool ControlHomeMenu(MenuItem *item, int *ctrl) {
|
||||
|
@ -31,61 +31,61 @@ namespace GUI {
|
||||
|
||||
if (is_psp_go) {
|
||||
G2D::DrawImage(cfg.dark_theme? icon_sd_dark : icon_sd, pos_x + 10, 92);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2), !is_ms_inserted? "ef0:/" : "ms0:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2), !is_ms_inserted? "ef0:/" : "ms0:/");
|
||||
|
||||
if (is_ms_inserted) {
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 122);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 30, "ef0:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 30, "ef0:/");
|
||||
|
||||
if (cfg.dev_options) {
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 152);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 60, "flash0:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 60, "flash0:/");
|
||||
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 182);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 90, "flash1:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 90, "flash1:/");
|
||||
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 212);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 120, "flash2:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 120, "flash2:/");
|
||||
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 242);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 150, "flash3:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 150, "flash3:/");
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (cfg.dev_options) {
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 122);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 30, "flash0:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 30, "flash0:/");
|
||||
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 152);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 60, "flash1:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 60, "flash1:/");
|
||||
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 182);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 90, "flash2:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 90, "flash2:/");
|
||||
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 212);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 120, "flash3:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 120, "flash3:/");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
G2D::DrawImage(cfg.dark_theme? icon_sd_dark : icon_sd, pos_x + 10, 92);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2), "ms0:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2), "ms0:/");
|
||||
|
||||
if (cfg.dev_options) {
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 122);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 30, "flash0:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 30, "flash0:/");
|
||||
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 152);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 60, "flash1:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 60, "flash1:/");
|
||||
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 182);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 90, "flash2:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 90, "flash2:/");
|
||||
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 212);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 120, "flash3:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 120, "flash3:/");
|
||||
|
||||
G2D::DrawImage(cfg.dark_theme? icon_secure_dark : icon_secure, pos_x + 10, 242);
|
||||
intraFontPrint(font, pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 150, "disc0:/");
|
||||
G2D::DrawText(pos_x + 50, 90 + ((30 - (font->glyph->height - 6)) / 2) + 150, "disc0:/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ namespace GUI {
|
||||
G2D::DrawRect(0, 18, 480, 254, G2D_RGBA(0, 0, 0, cfg.dark_theme? 50: 80));
|
||||
G2D::DrawImage(cfg.dark_theme? options_dialog_dark : options_dialog, (480 - options_dialog->w) / 2, (272 - options_dialog->h) / 2);
|
||||
G2D::FontSetStyle(font, 1.0f, TITLE_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, 140, 52, "Actions");
|
||||
G2D::DrawText(140, 52, "Actions");
|
||||
|
||||
if (row == 0 && column == 0)
|
||||
G2D::DrawRect(132, 71, 107, 38, SELECTOR_COLOUR);
|
||||
@ -147,21 +147,21 @@ namespace GUI {
|
||||
G2D::DrawRect((340 - intraFontMeasureText(font, "CANCEL")) - 5, (230 - (font->texYSize - 6)) - 5, intraFontMeasureText(font, "CANCEL") + 10,
|
||||
(font->texYSize - 6) + 10, SELECTOR_COLOUR);
|
||||
|
||||
intraFontPrint(font, 340 - intraFontMeasureText(font, "CANCEL"), 230 - (font->texYSize - 15), "CANCEL");
|
||||
G2D::DrawText(340 - intraFontMeasureText(font, "CANCEL"), 230 - (font->texYSize - 15), "CANCEL");
|
||||
G2D::FontSetStyle(font, 1.0f, TEXT_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
|
||||
if (!options_more) {
|
||||
intraFontPrint(font, 143, 95, "Properties");
|
||||
intraFontPrint(font, 143, 133, copy? "Paste" : "Copy");
|
||||
intraFontPrint(font, 143, 171, "Delete");
|
||||
intraFontPrint(font, 247, 95, "Refresh");
|
||||
intraFontPrint(font, 247, 133, move? "Paste" : "Move");
|
||||
intraFontPrint(font, 247, 171, "More...");
|
||||
G2D::DrawText(143, 95, "Properties");
|
||||
G2D::DrawText(143, 133, copy? "Paste" : "Copy");
|
||||
G2D::DrawText(143, 171, "Delete");
|
||||
G2D::DrawText(247, 95, "Refresh");
|
||||
G2D::DrawText(247, 133, move? "Paste" : "Move");
|
||||
G2D::DrawText(247, 171, "More...");
|
||||
}
|
||||
else {
|
||||
intraFontPrint(font, 143, 95, "New folder");
|
||||
intraFontPrint(font, 143, 133, "Rename");
|
||||
intraFontPrint(font, 247, 95, "New file");
|
||||
G2D::DrawText(143, 95, "New folder");
|
||||
G2D::DrawText(143, 133, "Rename");
|
||||
G2D::DrawText(247, 95, "New file");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,11 +13,11 @@ namespace GUI {
|
||||
G2D::DrawImage(cfg.dark_theme? properties_dialog_dark : properties_dialog, ((480 - (properties_dialog->w)) / 2), ((272 - (properties_dialog->h)) / 2));
|
||||
G2D::FontSetStyle(font, 1.0f, TITLE_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
|
||||
intraFontPrint(font, ((480 - (properties_dialog->w)) / 2) + 10, ((272 - (properties_dialog->h)) / 2) + 20, "Properties");
|
||||
G2D::DrawText(((480 - (properties_dialog->w)) / 2) + 10, ((272 - (properties_dialog->h)) / 2) + 20, "Properties");
|
||||
|
||||
int ok_width = intraFontMeasureText(font, "OK");
|
||||
G2D::DrawRect((340 - (ok_width)) - 5, (220 - (font->texYSize - 15)) - 5, ok_width + 10, (font->texYSize - 5) + 10, SELECTOR_COLOUR);
|
||||
intraFontPrint(font, 340 - (ok_width), (232 - (font->texYSize - 15)) - 3, "OK");
|
||||
G2D::DrawText(340 - (ok_width), (232 - (font->texYSize - 15)) - 3, "OK");
|
||||
|
||||
G2D::FontSetStyle(font, 1.0f, TEXT_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrintf(font, 140, 74, std::string(item->entries[item->selected].d_name).length() > 14? "Name: %.14s..." : "%s",
|
||||
|
@ -231,15 +231,15 @@ namespace GUI {
|
||||
G2D::DrawRect(0, 18, 480, 254, G2D_RGBA(0, 0, 0, cfg.dark_theme? 50: 80));
|
||||
G2D::DrawImage(cfg.dark_theme? dialog_dark : dialog, ((480 - (dialog->w)) / 2), ((272 - (dialog->h)) / 2));
|
||||
G2D::FontSetStyle(font, 1.0f, TITLE_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, ((480 - (dialog->w)) / 2) + 10, ((272 - (dialog->h)) / 2) + 20, "FTP");
|
||||
G2D::DrawText(((480 - (dialog->w)) / 2) + 10, ((272 - (dialog->h)) / 2) + 20, "FTP");
|
||||
|
||||
int ok_width = intraFontMeasureText(font, "OK");
|
||||
G2D::DrawRect((409 - (ok_width)) - 5, (180 - (font->texYSize - 15)) - 5, ok_width + 10, (font->texYSize - 5) + 10, SELECTOR_COLOUR);
|
||||
intraFontPrint(font, 409 - (ok_width), (192 - (font->texYSize - 15)) - 3, "OK");
|
||||
G2D::DrawText(409 - (ok_width), (192 - (font->texYSize - 15)) - 3, "OK");
|
||||
|
||||
int text_width = intraFontMeasureText(font, ftp_text);
|
||||
G2D::FontSetStyle(font, 1.0f, TEXT_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, ((480 - (text_width)) / 2), ((272 - (dialog->h)) / 2) + 60, ftp_text);
|
||||
G2D::DrawText(((480 - (text_width)) / 2), ((272 - (dialog->h)) / 2) + 60, ftp_text);
|
||||
}
|
||||
|
||||
static void ControlFTPSettings(void) {
|
||||
@ -252,20 +252,20 @@ namespace GUI {
|
||||
}
|
||||
|
||||
static void DisplaySortSettings(void) {
|
||||
intraFontPrint(font, 40, 40, "Sorting Options");
|
||||
G2D::DrawText(40, 40, "Sorting Options");
|
||||
|
||||
G2D::FontSetStyle(font, 1.0f, cfg.dark_theme? WHITE : BLACK, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, 40, 72, "Alphabetical");
|
||||
intraFontPrint(font, 40, 86, "Sort alphabetically in ascending order.");
|
||||
G2D::DrawText(40, 72, "Alphabetical");
|
||||
G2D::DrawText(40, 86, "Sort alphabetically in ascending order.");
|
||||
|
||||
intraFontPrint(font, 40, 116, "Alphabetical");
|
||||
intraFontPrint(font, 40, 130, "Sort alphabetically in descending order.");
|
||||
G2D::DrawText(40, 116, "Alphabetical");
|
||||
G2D::DrawText(40, 130, "Sort alphabetically in descending order.");
|
||||
|
||||
intraFontPrint(font, 40, 160, "Size");
|
||||
intraFontPrint(font, 40, 174, "Sort by size (largest first).");
|
||||
G2D::DrawText(40, 160, "Size");
|
||||
G2D::DrawText(40, 174, "Sort by size (largest first).");
|
||||
|
||||
intraFontPrint(font, 40, 204, "Size");
|
||||
intraFontPrint(font, 40, 218, "Sort by size (smallest first).");
|
||||
G2D::DrawText(40, 204, "Size");
|
||||
G2D::DrawText(40, 218, "Sort by size (smallest first).");
|
||||
|
||||
G2D::DrawImage(cfg.sort == 0? (cfg.dark_theme? icon_radio_dark_on : icon_radio_on) : (cfg.dark_theme? icon_radio_dark_off : icon_radio_off), 425, 60);
|
||||
G2D::DrawImage(cfg.sort == 1? (cfg.dark_theme? icon_radio_dark_on : icon_radio_on) : (cfg.dark_theme? icon_radio_dark_off : icon_radio_off), 425, 104);
|
||||
@ -291,11 +291,11 @@ namespace GUI {
|
||||
G2D::DrawRect(0, 18, 480, 254, G2D_RGBA(0, 0, 0, cfg.dark_theme? 50: 80));
|
||||
G2D::DrawImage(cfg.dark_theme? dialog_dark : dialog, ((480 - (dialog->w)) / 2), ((272 - (dialog->h)) / 2));
|
||||
G2D::FontSetStyle(font, 1.0f, TITLE_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, ((480 - (dialog->w)) / 2) + 10, ((272 - (dialog->h)) / 2) + 20, "About");
|
||||
G2D::DrawText(((480 - (dialog->w)) / 2) + 10, ((272 - (dialog->h)) / 2) + 20, "About");
|
||||
|
||||
int ok_width = intraFontMeasureText(font, "OK");
|
||||
G2D::DrawRect((409 - (ok_width)) - 5, (180 - (font->texYSize - 15)) - 5, ok_width + 10, (font->texYSize - 5) + 10, SELECTOR_COLOUR);
|
||||
intraFontPrint(font, 409 - (ok_width), (192 - (font->texYSize - 15)) - 3, "OK");
|
||||
G2D::DrawText(409 - (ok_width), (192 - (font->texYSize - 15)) - 3, "OK");
|
||||
|
||||
G2D::FontSetStyle(font, 1.0f, TEXT_COLOUR, INTRAFONT_ALIGN_LEFT);
|
||||
int version_width = intraFontMeasureText(font, "CMFileManager-PSP version: v4.0.0");
|
||||
@ -303,7 +303,7 @@ namespace GUI {
|
||||
VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO);
|
||||
|
||||
int author_width = intraFontMeasureText(font, "Author: Joel16");
|
||||
intraFontPrint(font, ((480 - (author_width)) / 2), ((272 - (dialog->h)) / 2) + 68, "Author: Joel16");
|
||||
G2D::DrawText(((480 - (author_width)) / 2), ((272 - (dialog->h)) / 2) + 68, "Author: Joel16");
|
||||
}
|
||||
|
||||
static void ControlAboutSettings(void) {
|
||||
@ -314,23 +314,23 @@ namespace GUI {
|
||||
}
|
||||
|
||||
static void DisplayGeneralSettings(void) {
|
||||
intraFontPrint(font, 40, 40, "Settings");
|
||||
G2D::DrawText(40, 40, "Settings");
|
||||
|
||||
G2D::FontSetStyle(font, 1.0f, cfg.dark_theme? WHITE : BLACK, INTRAFONT_ALIGN_LEFT);
|
||||
intraFontPrint(font, 40, 72, "FTP connection");
|
||||
intraFontPrint(font, 40, 86, "Wireless connection");
|
||||
G2D::DrawText(40, 72, "FTP connection");
|
||||
G2D::DrawText(40, 86, "Wireless connection");
|
||||
|
||||
intraFontPrint(font, 40, 116, "Sorting options");
|
||||
intraFontPrint(font, 40, 130, "Select between various sorting options.");
|
||||
G2D::DrawText(40, 116, "Sorting options");
|
||||
G2D::DrawText(40, 130, "Select between various sorting options.");
|
||||
|
||||
intraFontPrint(font, 40, 160, "Dark theme");
|
||||
intraFontPrint(font, 40, 174, "Enables dark theme mode.");
|
||||
G2D::DrawText(40, 160, "Dark theme");
|
||||
G2D::DrawText(40, 174, "Enables dark theme mode.");
|
||||
|
||||
intraFontPrint(font, 40, 204, "Developer options");
|
||||
intraFontPrint(font, 40, 218, "Enable logging and fs access to NAND.");
|
||||
G2D::DrawText(40, 204, "Developer options");
|
||||
G2D::DrawText(40, 218, "Enable logging and fs access to NAND.");
|
||||
|
||||
intraFontPrint(font, 40, 248, "About");
|
||||
intraFontPrint(font, 40, 262, "Application and device info");
|
||||
G2D::DrawText(40, 248, "About");
|
||||
G2D::DrawText(40, 262, "Application and device info");
|
||||
|
||||
if (cfg.dark_theme)
|
||||
G2D::DrawImage(cfg.dark_theme? icon_toggle_dark_on : icon_toggle_on, 415, 143);
|
||||
|
Loading…
Reference in New Issue
Block a user