#include <MainMenu.h>
|
enum class | ThemeTypes { LightTheme
, DarkTheme
} |
|
bool | isSetUp = false |
|
std::string | m_sceneName |
|
static ThemeTypes | currentTheme = ThemeTypes::LightTheme |
|
static const std::array< std::string, 2 > | themePaths = {"lightTheme", "darkTheme"} |
|
static const std::array< Color, 2 > | backgroundColors {{{239, 239, 239, 255}, {5, 11, 30, 255}}} |
|
◆ MainMenu()
ss::pl::mainMenu::MainMenu::MainMenu |
( |
std::string |
sceneName, |
|
|
SceneManager & |
sceneManager |
|
) |
| |
Constructor for the MainMenu class.
- Parameters
-
sceneName | The name of the current scene. Which here is "MainMenu". |
sceneManager | A reference to already existing SceneManager object to control the program flow. |
◆ animateGraphsContainer()
void ss::pl::mainMenu::MainMenu::animateGraphsContainer |
( |
| ) |
|
|
private |
Method for slowing down the showing of the graph container.
◆ calculateGraphsContainer()
float ss::pl::mainMenu::MainMenu::calculateGraphsContainer |
( |
| ) |
|
|
private |
Method for calculating the Graph container's place.
- Returns
- The possition in float.
◆ checkCollision()
void ss::pl::mainMenu::MainMenu::checkCollision |
( |
| ) |
|
|
private |
Method for checking collision on every possible button.
◆ checkGraphButtonCollisions()
void ss::pl::mainMenu::MainMenu::checkGraphButtonCollisions |
( |
| ) |
|
|
private |
Method for checking which of the graph buttons is clicked.
◆ deleteAssets()
void ss::pl::mainMenu::MainMenu::deleteAssets |
( |
| ) |
|
|
virtual |
Method for deallocating the dynamically created assets.
Implements Scene.
◆ displayGraphCards()
void ss::pl::mainMenu::MainMenu::displayGraphCards |
( |
| ) |
|
|
private |
Method for displaying the graph cards on click on the menu.
◆ drawTextures()
void ss::pl::mainMenu::MainMenu::drawTextures |
( |
| ) |
|
|
private |
Method for drawing all the needed assets in the MainMenu page.
◆ handleMouseCursor()
bool ss::pl::mainMenu::MainMenu::handleMouseCursor |
( |
| ) |
|
|
private |
Method for handling when the mouse cursor is on click.
- Returns
- bool.
◆ handleScroll()
void ss::pl::mainMenu::MainMenu::handleScroll |
( |
| ) |
|
|
private |
Method for handling the scroll button.
◆ loadAssets()
void ss::pl::mainMenu::MainMenu::loadAssets |
( |
| ) |
|
|
virtual |
Method for loading all the needed assets in the graph page.
Implements Scene.
◆ onExit()
void ss::pl::mainMenu::MainMenu::onExit |
( |
| ) |
|
|
virtual |
Method which is called when we exit the program or the MainMenu page.
It deallocates every dynamically created object in the class' instance.
Implements Scene.
◆ playThemeAnimation()
void ss::pl::mainMenu::MainMenu::playThemeAnimation |
( |
| ) |
|
|
private |
Method for displaying the theme switch animation.
◆ positionGraphsContainer()
void ss::pl::mainMenu::MainMenu::positionGraphsContainer |
( |
| ) |
|
|
private |
Method for positioning the graph container through the animation.
◆ Start()
void ss::pl::mainMenu::MainMenu::Start |
( |
| ) |
|
|
virtual |
Method which is called in the start of the MainMenu page.
Implements Scene.
◆ Update()
void ss::pl::mainMenu::MainMenu::Update |
( |
| ) |
|
|
virtual |
Method which is called every frame.
It updates the current scene every frame.
Implements Scene.
◆ animationIsPlaying
bool ss::pl::mainMenu::MainMenu::animationIsPlaying = false |
|
private |
◆ background_Lines
Texture2D ss::pl::mainMenu::MainMenu::background_Lines |
|
private |
◆ currentAnimationFrame
int ss::pl::mainMenu::MainMenu::currentAnimationFrame = 0 |
|
private |
◆ currentFrameTexture
Texture2D ss::pl::mainMenu::MainMenu::currentFrameTexture |
|
private |
◆ currentGraphPos
Vector2 ss::pl::mainMenu::MainMenu::currentGraphPos |
|
private |
◆ fontInter
Font ss::pl::mainMenu::MainMenu::fontInter |
|
private |
◆ graphButtonPos
Vector2 ss::pl::mainMenu::MainMenu::graphButtonPos |
|
private |
◆ graphCards
std::vector<graphsCard> ss::pl::mainMenu::MainMenu::graphCards |
|
private |
◆ graphContainerAnimationEase
float ss::pl::mainMenu::MainMenu::graphContainerAnimationEase = 3000 |
|
private |
◆ graphNamePos
Vector2 ss::pl::mainMenu::MainMenu::graphNamePos |
|
private |
◆ graphsContainer_Texture
Texture2D ss::pl::mainMenu::MainMenu::graphsContainer_Texture |
|
private |
◆ graphsContainerPos
float ss::pl::mainMenu::MainMenu::graphsContainerPos = -887 |
|
private |
◆ graphsIsAnimatingIn
bool ss::pl::mainMenu::MainMenu::graphsIsAnimatingIn = false |
|
private |
◆ graphsIsAnimatingOut
bool ss::pl::mainMenu::MainMenu::graphsIsAnimatingOut = false |
|
private |
◆ graphsIsOut
bool ss::pl::mainMenu::MainMenu::graphsIsOut = false |
|
private |
◆ graphsMenu_Texture
Texture2D ss::pl::mainMenu::MainMenu::graphsMenu_Texture |
|
private |
◆ logo_Texture
Texture2D ss::pl::mainMenu::MainMenu::logo_Texture |
|
private |
◆ m_sceneManager
◆ mousePos
Vector2 ss::pl::mainMenu::MainMenu::mousePos |
|
private |
◆ scrollOffset
int ss::pl::mainMenu::MainMenu::scrollOffset = 0 |
|
private |
◆ simulatorButton_Texture
Texture2D ss::pl::mainMenu::MainMenu::simulatorButton_Texture |
|
private |
◆ statisticCard_Texture
Texture2D ss::pl::mainMenu::MainMenu::statisticCard_Texture |
|
private |
◆ statisticNames
std::vector<std::string> ss::pl::mainMenu::MainMenu::statisticNames |
|
private |
◆ themeButton_Texture
Texture2D ss::pl::mainMenu::MainMenu::themeButton_Texture |
|
private |
◆ viewGraph_Texture
Texture2D ss::pl::mainMenu::MainMenu::viewGraph_Texture |
|
private |
The documentation for this class was generated from the following files: