Added WI-FI icon

This commit is contained in:
littlebalup 2016-09-25 01:00:52 +02:00
parent f30f7f425f
commit 7ca413410e
5 changed files with 17 additions and 2 deletions

2
init.c
View File

@ -31,6 +31,7 @@ INCLUDE_EXTERN_RESOURCE(image_icon_png);
INCLUDE_EXTERN_RESOURCE(audio_icon_png);
INCLUDE_EXTERN_RESOURCE(sfo_icon_png);
INCLUDE_EXTERN_RESOURCE(text_icon_png);
INCLUDE_EXTERN_RESOURCE(wifi_png);
INCLUDE_EXTERN_RESOURCE(ftp_png);
INCLUDE_EXTERN_RESOURCE(battery_png);
INCLUDE_EXTERN_RESOURCE(battery_bar_red_png);
@ -61,6 +62,7 @@ static DefaultFile default_files[] = {
DEFAULT_FILE("ux0:VitaShell/theme/Default/audio_icon.png", audio_icon_png),
DEFAULT_FILE("ux0:VitaShell/theme/Default/sfo_icon.png", sfo_icon_png),
DEFAULT_FILE("ux0:VitaShell/theme/Default/text_icon.png", text_icon_png),
DEFAULT_FILE("ux0:VitaShell/theme/Default/wifi.png", wifi_png),
DEFAULT_FILE("ux0:VitaShell/theme/Default/ftp.png", ftp_png),
DEFAULT_FILE("ux0:VitaShell/theme/Default/battery.png", battery_png),
DEFAULT_FILE("ux0:VitaShell/theme/Default/battery_bar_red.png", battery_bar_red_png),

6
main.c
View File

@ -375,6 +375,12 @@ void drawShellInfo(char *path) {
float date_time_x = ALIGN_LEFT(battery_x - 12.0f, vita2d_pgf_text_width(font, FONT_SIZE, string));
pgf_draw_text(date_time_x, SHELL_MARGIN_Y, DATE_TIME_COLOR, FONT_SIZE, string);
// WIFI
int state = 0;
sceNetCtlInetGetState(&state);
if (state == 3)
vita2d_draw_texture(wifi_image, date_time_x - 60.0f, SHELL_MARGIN_Y + 3.0f);
// FTP
if (ftpvita_is_initialized())
vita2d_draw_texture(ftp_image, date_time_x - 30.0f, SHELL_MARGIN_Y + 3.0f);

BIN
resources/wifi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

View File

@ -32,6 +32,7 @@ INCLUDE_EXTERN_RESOURCE(image_icon_png);
INCLUDE_EXTERN_RESOURCE(audio_icon_png);
INCLUDE_EXTERN_RESOURCE(sfo_icon_png);
INCLUDE_EXTERN_RESOURCE(text_icon_png);
INCLUDE_EXTERN_RESOURCE(wifi_png);
INCLUDE_EXTERN_RESOURCE(ftp_png);
INCLUDE_EXTERN_RESOURCE(battery_png);
INCLUDE_EXTERN_RESOURCE(battery_bar_red_png);
@ -101,7 +102,7 @@ int AUDIO_TIME_BAR;
int AUDIO_TIME_BAR_BG;
vita2d_texture *folder_icon = NULL, *file_icon = NULL, *archive_icon = NULL, *image_icon = NULL, *audio_icon = NULL, *sfo_icon = NULL, *text_icon = NULL,
*ftp_image = NULL, *dialog_image = NULL, *context_image = NULL, *context_more_image = NULL, *battery_image = NULL, *battery_bar_red_image = NULL,
*wifi_image = NULL, *ftp_image = NULL, *dialog_image = NULL, *context_image = NULL, *context_more_image = NULL, *battery_image = NULL, *battery_bar_red_image = NULL,
*battery_bar_green_image = NULL, *battery_bar_charge_image = NULL, *bg_browser_image = NULL, *bg_hex_image = NULL, *bg_text_image = NULL,
*bg_photo_image = NULL, *bg_audio_image = NULL, *cover_image = NULL, *play_image = NULL, *pause_image = NULL, *fastforward_image = NULL, *fastrewind_image = NULL;
@ -216,6 +217,9 @@ void loadTheme() {
snprintf(path, MAX_PATH_LENGTH, "ux0:VitaShell/theme/%s/text_icon.png", theme_name);
text_icon = vita2d_load_PNG_file(path);
snprintf(path, MAX_PATH_LENGTH, "ux0:VitaShell/theme/%s/wifi.png", theme_name);
wifi_image = vita2d_load_PNG_file(path);
snprintf(path, MAX_PATH_LENGTH, "ux0:VitaShell/theme/%s/ftp.png", theme_name);
ftp_image = vita2d_load_PNG_file(path);
@ -318,6 +322,9 @@ void loadTheme() {
if (!text_icon)
text_icon = vita2d_load_PNG_buffer(&_binary_resources_text_icon_png_start);
if (!wifi_image)
wifi_image = vita2d_load_PNG_buffer(&_binary_resources_wifi_png_start);
if (!ftp_image)
ftp_image = vita2d_load_PNG_buffer(&_binary_resources_ftp_png_start);

View File

@ -78,7 +78,7 @@ extern int AUDIO_TIME_BAR;
extern int AUDIO_TIME_BAR_BG;
extern vita2d_texture *folder_icon, *file_icon, *archive_icon, *image_icon, *audio_icon, *sfo_icon, *text_icon,
*ftp_image, *dialog_image, *context_image, *context_more_image, *battery_image, *battery_bar_red_image,
*wifi_image, *ftp_image, *dialog_image, *context_image, *context_more_image, *battery_image, *battery_bar_red_image,
*battery_bar_green_image, *battery_bar_charge_image, *bg_browser_image, *bg_hex_image, *bg_text_image,
*bg_photo_image, *bg_audio_image, *cover_image, *play_image, *pause_image, *fastforward_image, *fastrewind_image;