Minor changes on the battery icon
This commit is contained in:
parent
b3847817f4
commit
810dced314
|
@ -106,13 +106,12 @@ static void StatusBar_GetBatteryStatus(int x, int y) {
|
||||||
|
|
||||||
snprintf(buf, 5, "%d%%", percent);
|
snprintf(buf, 5, "%d%%", percent);
|
||||||
TTF_SizeText(ROBOTO_20, buf, &width, NULL);
|
TTF_SizeText(ROBOTO_20, buf, &width, NULL);
|
||||||
SDL_DrawHorizonalAlignedImageText(RENDERER, batteryImage, ROBOTO_20, WHITE, buf, (x + width + 5), y, 34, 34, -2, -7);
|
SDL_DrawHorizonalAlignedImageText(RENDERER, batteryImage, ROBOTO_20, WHITE, buf, (x + width - 30), y, 34, 34, -2, 0);
|
||||||
//SDL_DrawText(RENDERER, ROBOTO_20, (x + width + 5), y, WHITE, buf);
|
//SDL_DrawText(RENDERER, ROBOTO_20, (x + width + 5), y, WHITE, buf);
|
||||||
} else {
|
} else {
|
||||||
snprintf(buf, 5, "%d%%", percent);
|
snprintf(buf, 5, "%d%%", percent);
|
||||||
TTF_SizeText(ROBOTO_20, buf, &width, NULL);
|
TTF_SizeText(ROBOTO_20, buf, &width, NULL);
|
||||||
SDL_DrawHorizonalAlignedImageText(RENDERER, battery_unknown, ROBOTO_20, WHITE, buf, x, y, 34, 34, -2, -7);
|
SDL_DrawHorizonalAlignedImageText(RENDERER, battery_unknown, ROBOTO_20, WHITE, buf, x, y, 34, 34, -2, 0);
|
||||||
|
|
||||||
/*SDL_DrawText(RENDERER, ROBOTO_20, (x + width + 5), y, WHITE, buf);
|
/*SDL_DrawText(RENDERER, ROBOTO_20, (x + width + 5), y, WHITE, buf);
|
||||||
SDL_DrawImage(RENDERER, battery_unknown, x, 1);*/
|
SDL_DrawImage(RENDERER, battery_unknown, x, 1);*/
|
||||||
}
|
}
|
||||||
|
@ -126,19 +125,16 @@ void StatusBar_DisplayTime(bool portriat) {
|
||||||
|
|
||||||
if (portriat) {
|
if (portriat) {
|
||||||
int timeX = (1280 - timeWidth) + timeHeight;
|
int timeX = (1280 - timeWidth) + timeHeight;
|
||||||
int timeY = (720 - timeWidth) + 15;
|
int timeY = (720 - timeWidth) + 15;
|
||||||
SDL_DrawRotatedText(RENDERER, ROBOTO_25, (double) 90, timeX, timeY, WHITE, Clock_GetCurrentTime());
|
SDL_DrawRotatedText(RENDERER, ROBOTO_25, (double) 90, timeX, timeY, WHITE, Clock_GetCurrentTime());
|
||||||
|
|
||||||
int helpX = (1280 - helpWidth) + 21;
|
int helpX = (1280 - helpWidth) + 21;
|
||||||
int helpY = (720 - helpHeight) - (720 - timeY) - 75;
|
int helpY = (720 - helpHeight) - (720 - timeY) - 75;
|
||||||
SDL_DrawRotatedText(RENDERER, ROBOTO_20, (double) 90, helpX, helpY, WHITE, "\"+\" - Help");
|
SDL_DrawRotatedText(RENDERER, ROBOTO_20, (double) 90, helpX, helpY, WHITE, "\"+\" - Help");
|
||||||
|
|
||||||
//SDL_DrawRotatedText(RENDERER, ROBOTO_25, (double) 90, 1270 - width, (720 - height), WHITE, Clock_GetCurrentTime());
|
//SDL_DrawRotatedText(RENDERER, ROBOTO_25, (double) 90, 1270 - width, (720 - height), WHITE, Clock_GetCurrentTime());
|
||||||
} else {
|
} else {
|
||||||
SDL_DrawText(RENDERER, ROBOTO_25, 1260 - timeWidth, (40 - timeHeight) / 2, WHITE, Clock_GetCurrentTime());
|
SDL_DrawText(RENDERER, ROBOTO_25, 1260 - timeWidth, (40 - timeHeight) / 2, WHITE, Clock_GetCurrentTime());
|
||||||
|
|
||||||
SDL_DrawText(RENDERER, ROBOTO_20, 1260 - helpWidth - timeWidth - 25, (40 - helpHeight) / 2, WHITE, "\"+\" - Help");
|
SDL_DrawText(RENDERER, ROBOTO_20, 1260 - helpWidth - timeWidth - 25, (40 - helpHeight) / 2, WHITE, "\"+\" - Help");
|
||||||
|
|
||||||
StatusBar_GetBatteryStatus(1260 - (timeWidth + helpWidth) - 110, (40 - timeHeight) / 2 + 34); // 34 is height of battery img
|
StatusBar_GetBatteryStatus(1260 - (timeWidth + helpWidth) - 110, (40 - timeHeight) / 2 + 34); // 34 is height of battery img
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue