diff --git a/include/builddate.hpp b/include/builddate.hpp index 0c9b6db..097c4ef 100644 --- a/include/builddate.hpp +++ b/include/builddate.hpp @@ -3,6 +3,6 @@ namespace builddate { inline constexpr int MONTH = 10; - inline constexpr int DAY = 8; + inline constexpr int DAY = 7; inline constexpr int YEAR = 2025; } diff --git a/source/keyboard.cpp b/source/keyboard.cpp index a50aed7..65da88b 100644 --- a/source/keyboard.cpp +++ b/source/keyboard.cpp @@ -25,7 +25,12 @@ bool keyboard::get_input(SwkbdType keyboardType, const bool swkbdError = error::libnx(swkbdShow(&keyboard, stringOut, stringLength)); const bool empty = std::char_traits::length(stringOut) == 0; - if (swkbdError || empty) { return false; } + if (swkbdError || empty) + { + swkbdClose(&keyboard); + return false; + } + swkbdClose(&keyboard); return true; } diff --git a/source/ui/Menu.cpp b/source/ui/Menu.cpp index 3796034..ddabd2a 100644 --- a/source/ui/Menu.cpp +++ b/source/ui/Menu.cpp @@ -57,7 +57,7 @@ void ui::Menu::render(sdl::SharedTexture &target, bool hasFocus) m_boundingBox->set_y(tempY - 4); m_boundingBox->render(target, hasFocus); } - sdl::render_rect_fill(m_optionTarget, 8, 8, 4, m_optionHeight - 14, colors::BLUE_GREEN); + sdl::render_rect_fill(m_optionTarget, 8, 8, 4, m_optionHeight - 12, colors::BLUE_GREEN); m_optionScroll->render(m_optionTarget, hasFocus); } else { sdl::text::render(m_optionTarget, 24, m_textY, m_fontSize, sdl::text::NO_WRAP, colors::WHITE, m_options[i]); } @@ -75,7 +75,7 @@ void ui::Menu::add_option(std::string_view newOption) void ui::Menu::add_option(std::string &newOption) { - if (m_options.empty()) { m_optionScroll->set_text(newOption, false); } + if (m_options.empty()) { m_optionScroll->set_text(std::string_view{newOption}, false); } m_options.push_back(std::move(newOption)); } @@ -159,7 +159,7 @@ void ui::Menu::update_scroll_text() { const std::string_view text = m_optionScroll->get_text(); const std::string_view option = m_options[m_selected]; - if (text != option) { m_optionScroll->set_text(option, false); } + if (text != option) { m_optionScroll->set_text(std::string_view{option}, false); } } void ui::Menu::handle_input() diff --git a/source/ui/TitleView.cpp b/source/ui/TitleView.cpp index 46572ca..0fe060c 100644 --- a/source/ui/TitleView.cpp +++ b/source/ui/TitleView.cpp @@ -31,6 +31,7 @@ void ui::TitleView::update(bool hasFocus) TitleView::handle_input(); TitleView::handle_scrolling(); TitleView::update_tiles(); + m_transition.update(); } @@ -64,6 +65,7 @@ void ui::TitleView::render(sdl::SharedTexture &target, bool hasFocus) { m_bounding->set_x(m_selectedX - 30); m_bounding->set_y(m_selectedY - 30); + sdl::render_rect_fill(target, m_selectedX - 28, m_selectedY - 28, 184, 184, colors::CLEAR_COLOR); m_bounding->render(target, hasFocus); }