diff options
Diffstat (limited to 'lib/nes/app/ui/screen-title.cc')
| -rw-r--r-- | lib/nes/app/ui/screen-title.cc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/nes/app/ui/screen-title.cc b/lib/nes/app/ui/screen-title.cc new file mode 100644 index 0000000..2a7bc5c --- /dev/null +++ b/lib/nes/app/ui/screen-title.cc @@ -0,0 +1,30 @@ +#include "nes/app/ui/screen-title.hh" +#include "nes/app/graphics/renderer.hh" +#include "nes/app/graphics/color.hh" +#include "nes/app/graphics/mask-tile.hh" +#include "nes/app/input/input-manager.hh" + +namespace nes::app +{ + screen_title::screen_title(input_manager& input_manager) + : input_manager_{ input_manager } + { + } + + auto screen_title::render(renderer& renderer) -> void + { + renderer.render_fill(color::background_primary); + renderer.render_rect(2, 4, 28, 8, color::accent_primary); + renderer.render_mask_tile(10, 16, tiles::letter_a, color::foreground_primary); + } + + auto screen_title::process_events() -> action + { + if (input_manager_.get_keyboard().read_key_start()) + { + return action::load_game; + } + + return action::none; + } +} // namespace nes::app
\ No newline at end of file |
