diff --git a/include/map_name_popup.h b/include/map_name_popup.h index 8a55c14ecb..e278793666 100644 --- a/include/map_name_popup.h +++ b/include/map_name_popup.h @@ -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 diff --git a/src/map_name_popup.c b/src/map_name_popup.c index f708a447fc..1455c01442 100644 --- a/src/map_name_popup.c +++ b/src/map_name_popup.c @@ -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);