diff --git a/src/config.cpp b/src/config.cpp index 32048c0..9b0896a 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -32,6 +32,7 @@ size_t IMAGE_LOCATIONS_LENGTH = sizeof(IMAGE_LOCATIONS)/sizeof(IMAGE_LOCATIONS[0 //}; const FONT_SIZE FONT_LOCATIONS[] = { { "Roboto_Mono/RobotoMono-Medium.ttf", 50 }, + { "Roboto_Mono/RobotoMono-Medium.ttf", 28 }, }; size_t FONT_LOCATIONS_LENGTH = sizeof(FONT_LOCATIONS)/sizeof(FONT_LOCATIONS[0]); @@ -43,6 +44,6 @@ size_t FONT_LOCATIONS_LENGTH = sizeof(FONT_LOCATIONS)/sizeof(FONT_LOCATIONS[0]); //}; const FONT_SIZE_STRING CONST_STRINGS[] = { //Weather strings - { "Today's Weather", { "Roboto_Mono/RobotoMono-Medium.ttf", 36 } }, + { "Today's Weather", { "Roboto_Mono/RobotoMono-Medium.ttf", 50 } }, }; size_t CONST_STRINGS_LENGTH = sizeof(CONST_STRINGS)/sizeof(CONST_STRINGS[0]); diff --git a/src/panel/def_overlay.cpp b/src/panel/def_overlay.cpp index 9c19a76..39be18e 100644 --- a/src/panel/def_overlay.cpp +++ b/src/panel/def_overlay.cpp @@ -106,7 +106,20 @@ void def_overlay::update_texture() { tgt.h = DEF_OVERLAY_BAR_HEIGHT; SDL_RenderFillRect(board::getRenderer(), &tgt); + //change to text color + SDL_SetRenderDrawColor(board::getRenderer(), + DEF_OVERLAY_TEXT_RED, DEF_OVERLAY_TEXT_GREEN, + DEF_OVERLAY_TEXT_BLUE, DEF_OVERLAY_TEXT_ALPHA); + //show the date and time + TTF_SizeText(board::getFont({ "Roboto_Mono/RobotoMono-Medium.ttf", 28 }), + date_time.c_str(), + &tgt.w, &tgt.h); + tgt.x = SCREEN_WIDTH - tgt.w - 5; + tgt.y = 0; + SDL_RenderCopy(board::getRenderer(), + board::getString(date_time.c_str(), + { "Roboto_Mono/RobotoMono-Medium.ttf", 28 }), NULL, &tgt); @@ -117,8 +130,6 @@ void def_overlay::update_texture() { //reset back to the old render color SDL_SetRenderDrawColor(board::getRenderer(), o_red, o_green, o_blue, o_alpha); - - std::cerr << "Leaving overlay texture\n"; } ///////////////////////////////////////