Complete main menu without event bindings.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
#ifndef GUI_MAINMENU_H__
|
||||
#define GUI_MAINMENU_H__
|
||||
|
||||
#include "GUI/TextureFrame.h"
|
||||
#include "Game/MainMenuMain.h"
|
||||
#include "Game/MainMenuOptions.h"
|
||||
|
||||
namespace dd
|
||||
{
|
||||
namespace GUI
|
||||
{
|
||||
|
||||
class MainMenu : public TextureFrame
|
||||
{
|
||||
public:
|
||||
MainMenu(Frame* parent, std::string name)
|
||||
: TextureFrame(parent, name)
|
||||
{
|
||||
SetTexture("Textures/GUI/Menu/Background.png");
|
||||
Width = 675;
|
||||
Height = 1080;
|
||||
|
||||
m_LeftBanner = new GUI::TextureFrame(this, "MainMenuLeftBanner");
|
||||
m_LeftBanner->SetTexture("Textures/GUI/Menu/Left.png");
|
||||
m_LeftBanner->Width = 231;
|
||||
m_LeftBanner->Height = 1080;
|
||||
|
||||
m_MainMenuMain = new GUI::MainMenuMain(this, "MainMenuMain");
|
||||
m_MainMenuMain->SetLeft(m_LeftBanner->Right());
|
||||
m_MainMenuMain->SetTop(60);
|
||||
|
||||
m_MainMenuOptions = new GUI::MainMenuOptions(this, "MainMenuOptions");
|
||||
m_MainMenuOptions->SetLeft(m_LeftBanner->Right());
|
||||
m_MainMenuOptions->SetTop(m_MainMenuMain->Bottom());
|
||||
}
|
||||
|
||||
private:
|
||||
TextureFrame* m_LeftBanner;
|
||||
MainMenuMain* m_MainMenuMain;
|
||||
MainMenuOptions* m_MainMenuOptions;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
#ifndef GUI_MAINMENUMAIN_H__
|
||||
#define GUI_MAINMENUMAIN_H__
|
||||
|
||||
#include "GUI/TextureFrame.h"
|
||||
#include "GUI/Button.h"
|
||||
|
||||
namespace dd
|
||||
{
|
||||
namespace GUI
|
||||
{
|
||||
|
||||
class MainMenuMain : public TextureFrame
|
||||
{
|
||||
public:
|
||||
MainMenuMain(Frame* parent, std::string name)
|
||||
: TextureFrame(parent, name)
|
||||
{
|
||||
Width = 409;
|
||||
Height = 543;
|
||||
|
||||
m_Title = new GUI::TextureFrame(this, "MainMenuMainTitle");
|
||||
m_Title->SetTexture("Textures/GUI/Menu/MainTitle.png");
|
||||
|
||||
m_SquidoutButton = new GUI::Button(this, "MainMenuMainSquidoutButton");
|
||||
m_SquidoutButton->SetTop(m_Title->Bottom());
|
||||
m_SquidoutButton->SetTextureReleased("Textures/GUI/Menu/MainSquidout.png");
|
||||
m_SquidoutButton->SetTextureHover("Textures/GUI/Menu/MainSquidoutHover.png");
|
||||
m_SquidoutButton->SetTexturePressed("Textures/GUI/Menu/MainSquidoutClick.png");
|
||||
m_SquidoutButton->SizeToTexture();
|
||||
|
||||
m_TimeAttackButton = new GUI::Button(this, "MainMenuMainTimeAttackButton");
|
||||
m_TimeAttackButton->SetTop(m_SquidoutButton->Bottom());
|
||||
m_TimeAttackButton->SetTextureReleased("Textures/GUI/Menu/MainTimeAttack.png");
|
||||
m_TimeAttackButton->SetTextureHover("Textures/GUI/Menu/MainTimeAttackHover.png");
|
||||
m_TimeAttackButton->SetTexturePressed("Textures/GUI/Menu/MainTimeAttackClick.png");
|
||||
m_TimeAttackButton->SizeToTexture();
|
||||
|
||||
m_OptionsButton = new GUI::Button(this, "MainMenuMainOptionsButton");
|
||||
m_OptionsButton->SetTop(m_TimeAttackButton->Bottom());
|
||||
m_OptionsButton->SetTextureReleased("Textures/GUI/Menu/MainOptions.png");
|
||||
m_OptionsButton->SetTextureHover("Textures/GUI/Menu/MainOptionsHover.png");
|
||||
m_OptionsButton->SetTexturePressed("Textures/GUI/Menu/MainOptionsClick.png");
|
||||
m_OptionsButton->SizeToTexture();
|
||||
}
|
||||
|
||||
private:
|
||||
TextureFrame* m_Title;
|
||||
Button* m_SquidoutButton;
|
||||
Button* m_TimeAttackButton;
|
||||
Button* m_OptionsButton;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
#ifndef GUI_MAINMENUOPTIONS_H__
|
||||
#define GUI_MAINMENUOPTIONS_H__
|
||||
|
||||
#include "GUI/TextureFrame.h"
|
||||
#include "GUI/Button.h"
|
||||
#include "GUI/Slider.h"
|
||||
|
||||
namespace dd
|
||||
{
|
||||
namespace GUI
|
||||
{
|
||||
|
||||
class MainMenuOptions : public TextureFrame
|
||||
{
|
||||
public:
|
||||
MainMenuOptions(Frame* parent, std::string name)
|
||||
: TextureFrame(parent, name)
|
||||
{
|
||||
Width = 409;
|
||||
Height = 1080;
|
||||
|
||||
m_Title = new GUI::TextureFrame(this, "MainMenuOptionsTitle");
|
||||
m_Title->SetTexture("Textures/GUI/Menu/OptionsTitle.png");
|
||||
|
||||
m_TitleSFX = new GUI::TextureFrame(this, "MainMenuOptionsSFXTitle");
|
||||
m_TitleSFX->SetTop(m_Title->Bottom() + 20);
|
||||
m_TitleSFX->SetTexture("Textures/GUI/Menu/OptionsSFXTitle.png");
|
||||
m_SFXSlider = new GUI::Slider(this, "MainMenuOptionsSFXSlider");
|
||||
m_SFXSlider->X = 66;
|
||||
m_SFXSlider->SetTop(m_TitleSFX->Bottom());
|
||||
m_SFXSlider->SetTexture("Textures/GUI/Menu/SliderBackground.png");
|
||||
m_SFXSlider->SetTextureReleased("Textures/GUI/Menu/SliderHandle.png");
|
||||
m_SFXSlider->CenterSlider();
|
||||
|
||||
m_TitleBGM = new GUI::TextureFrame(this, "MainMenuOptionsBGMTitle");
|
||||
m_TitleBGM->SetTop(m_TitleSFX->Bottom());
|
||||
m_TitleBGM->SetTexture("Textures/GUI/Menu/OptionsBGMTitle.png");
|
||||
}
|
||||
|
||||
private:
|
||||
TextureFrame* m_Title;
|
||||
TextureFrame* m_TitleSFX;
|
||||
Slider* m_SFXSlider;
|
||||
TextureFrame* m_TitleBGM;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user