mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-09-07 01:55:19 -05:00
Data partially implemented with no crashes. Getting too tired.
This commit is contained in:
28
Source/AppStates/MainMenuState.cpp
Normal file
28
Source/AppStates/MainMenuState.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "AppStates/MainMenuState.hpp"
|
||||
#include "Colors.hpp"
|
||||
#include "SDL.hpp"
|
||||
#include "Strings.hpp"
|
||||
|
||||
MainMenuState::MainMenuState(void)
|
||||
: m_RenderTarget(SDL::TextureManager::CreateLoadTexture("MainMenuTarget", 200, 555, SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET)),
|
||||
m_Background(SDL::TextureManager::CreateLoadTexture("MainMenuBackground", "romfs:/Textures/MenuBackground.png")),
|
||||
m_ControlGuide(Strings::GetByName(Strings::Names::ControlGuides, 0)), m_ControlGuideX(1220 - SDL::Text::GetWidth(20, m_ControlGuide)) {};
|
||||
|
||||
void MainMenuState::Update(void)
|
||||
{
|
||||
}
|
||||
|
||||
void MainMenuState::Render(void)
|
||||
{
|
||||
// Clear render target by rendering background to it.
|
||||
m_Background->Render(m_RenderTarget->Get(), 0, 0);
|
||||
|
||||
// Render target to screen.
|
||||
m_RenderTarget->Render(NULL, 0, 91);
|
||||
|
||||
// Control Guide.
|
||||
if (AppState::HasFocus())
|
||||
{
|
||||
SDL::Text::Render(NULL, m_ControlGuideX, 673, 20, SDL::Text::NO_TEXT_WRAP, Colors::White, m_ControlGuide);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user