Menu framework in place

This commit is contained in:
Kayne Ruse
2013-06-12 21:56:17 +10:00
parent f3ec4d4d8e
commit 2148c1f13e
8 changed files with 92 additions and 46 deletions
+7 -20
View File
@@ -12,6 +12,7 @@ OptionScreen::OptionScreen() {
#ifdef DEBUG
cout << "entering OptionScreen" << endl;
#endif
backButton.Setup(50, 50, surfaceMgr->Get("button"), surfaceMgr->Get("font"), "Back");
}
OptionScreen::~OptionScreen() {
@@ -24,20 +25,8 @@ OptionScreen::~OptionScreen() {
//Frame loop
//-------------------------
void OptionScreen::FrameStart() {
//
}
void OptionScreen::Update(double delta) {
//
}
void OptionScreen::FrameEnd() {
//
}
void OptionScreen::Render(SDL_Surface* const screen) {
//
backButton.DrawTo(screen);
}
//-------------------------
@@ -45,15 +34,17 @@ void OptionScreen::Render(SDL_Surface* const screen) {
//-------------------------
void OptionScreen::MouseMotion(SDL_MouseMotionEvent const& motion) {
//
backButton.MouseMotion(motion);
}
void OptionScreen::MouseButtonDown(SDL_MouseButtonEvent const& button) {
//
backButton.MouseButtonDown(button);
}
void OptionScreen::MouseButtonUp(SDL_MouseButtonEvent const& button) {
//
if (backButton.MouseButtonUp(button) == Button::State::HOVER) {
QuitEvent();
}
}
void OptionScreen::KeyDown(SDL_KeyboardEvent const& key) {
@@ -63,7 +54,3 @@ void OptionScreen::KeyDown(SDL_KeyboardEvent const& key) {
break;
}
}
void OptionScreen::KeyUp(SDL_KeyboardEvent const& key) {
//
}