add configuration to remove the clock entirely

This commit is contained in:
RavePossum 2024-04-15 09:41:42 -04:00
parent 8098b6e55a
commit b4537e20ca
2 changed files with 12 additions and 6 deletions

View file

@ -9,7 +9,11 @@
void HideMapNamePopUpWindow(void);
void ShowMapNamePopup(void);
#define MAPPOPUP_24_HOUR_TIME FALSE
#define MAPPOPUP_ALPHA_BLEND TRUE
#define MAP_POPUP_TIME_NONE 0 // don't show the time
#define MAP_POPUP_TIME_12_HR 1 // use 12 hour (AM/PM) time
#define MAP_POPUP_TIME_24_HR 2 // use 24 hour time
#define MAP_POPUP_TIME_MODE MAP_POPUP_TIME_NONE // determines what type of time is shown
#define MAPPOPUP_ALPHA_BLEND TRUE // enables alpha blending/transparency for the pop-ups
#endif //GUARD_MAP_NAME_POPUP_H

View file

@ -359,10 +359,12 @@ static void ShowMapNamePopUpWindow(void)
mapDisplayHeader[2] = TEXT_COLOR_TRANSPARENT;
AddTextPrinterParameterized(primaryPopUpWindowId, FONT_SHORT, mapDisplayHeader, mapNameX, mapNameY, TEXT_SKIP_DRAW, NULL);
RtcCalcLocalTime();
FormatDecimalTimeWithoutSeconds(withoutPrefixPtr, gLocalTime.hours, gLocalTime.minutes, MAPPOPUP_24_HOUR_TIME);
AddTextPrinterParameterized(secondaryPopUpWindowId, FONT_SMALL, mapDisplayHeader, GetStringRightAlignXOffset(FONT_SMALL, mapDisplayHeader, DISPLAY_WIDTH) - timeX, timeY, TEXT_SKIP_DRAW, NULL);
if (MAP_POPUP_TIME_MODE != MAP_POPUP_TIME_NONE)
{
RtcCalcLocalTime();
FormatDecimalTimeWithoutSeconds(withoutPrefixPtr, gLocalTime.hours, gLocalTime.minutes, MAP_POPUP_TIME_MODE == MAP_POPUP_TIME_24_HR);
AddTextPrinterParameterized(secondaryPopUpWindowId, FONT_SMALL, mapDisplayHeader, GetStringRightAlignXOffset(FONT_SMALL, mapDisplayHeader, DISPLAY_WIDTH) - timeX, timeY, TEXT_SKIP_DRAW, NULL);
}
CopyWindowToVram(primaryPopUpWindowId, COPYWIN_FULL);
CopyWindowToVram(secondaryPopUpWindowId, COPYWIN_FULL);