Menu framework in place
This commit is contained in:
@@ -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) {
|
||||
//
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user