Added an empty navigation shell to the client
This commit is contained in:
+23
-5
@@ -26,7 +26,21 @@
|
||||
//-------------------------
|
||||
|
||||
OptionsMenu::OptionsMenu() {
|
||||
//
|
||||
//setup the utility objects
|
||||
image.LoadSurface("rsc\\graphics\\interface\\button_menu.bmp");
|
||||
image.SetClipH(image.GetClipH()/3);
|
||||
font.LoadSurface("rsc\\graphics\\fonts\\pk_white_8.bmp");
|
||||
|
||||
//pass the utility objects
|
||||
backButton.SetImage(&image);
|
||||
backButton.SetFont(&font);
|
||||
|
||||
//set the button positions
|
||||
backButton.SetX(50);
|
||||
backButton.SetY(50 + image.GetClipH() * 0);
|
||||
|
||||
//set the button texts
|
||||
backButton.SetText("Back");
|
||||
}
|
||||
|
||||
OptionsMenu::~OptionsMenu() {
|
||||
@@ -50,7 +64,9 @@ void OptionsMenu::FrameEnd() {
|
||||
}
|
||||
|
||||
void OptionsMenu::Render(SDL_Surface* const screen) {
|
||||
//
|
||||
backButton.DrawTo(screen);
|
||||
|
||||
font.DrawStringTo("Oh, were you looking for the options screen?", screen, 50, 30);
|
||||
}
|
||||
|
||||
//-------------------------
|
||||
@@ -58,15 +74,17 @@ void OptionsMenu::Render(SDL_Surface* const screen) {
|
||||
//-------------------------
|
||||
|
||||
void OptionsMenu::MouseMotion(SDL_MouseMotionEvent const& motion) {
|
||||
//
|
||||
backButton.MouseMotion(motion);
|
||||
}
|
||||
|
||||
void OptionsMenu::MouseButtonDown(SDL_MouseButtonEvent const& button) {
|
||||
//
|
||||
backButton.MouseButtonDown(button);
|
||||
}
|
||||
|
||||
void OptionsMenu::MouseButtonUp(SDL_MouseButtonEvent const& button) {
|
||||
//
|
||||
if (backButton.MouseButtonUp(button) == Button::State::HOVER) {
|
||||
SetNextScene(SceneList::MAINMENU);
|
||||
}
|
||||
}
|
||||
|
||||
void OptionsMenu::KeyDown(SDL_KeyboardEvent const& key) {
|
||||
|
||||
Reference in New Issue
Block a user