|
|
|
@ -4,6 +4,7 @@ |
|
|
|
|
#include "Menu.h" |
|
|
|
|
#include "MenuLabel.h" |
|
|
|
|
#include "MenuAnimatedIconButton.h" |
|
|
|
|
#include "GameState.h" |
|
|
|
|
|
|
|
|
|
INCLUDE_game |
|
|
|
|
typedef Attribute A; |
|
|
|
@ -22,6 +23,13 @@ void Menu::InitializeClassSelectionWindow(){ |
|
|
|
|
|
|
|
|
|
classSelectionWindow->AddComponent("Outline Border",outline); |
|
|
|
|
|
|
|
|
|
vf2d navigationButtonSize={24*2.5f,16}; |
|
|
|
|
|
|
|
|
|
MenuComponent*backButton=new MenuComponent(CLASS_SELECTION,{{4+2,outlineSize.y+4-navigationButtonSize.y-2},navigationButtonSize},"Back",[](MenuFuncData data){Menu::CloseMenu();}); |
|
|
|
|
classSelectionWindow->AddComponent("Back Button",backButton); |
|
|
|
|
MenuComponent*confirmButton=new MenuComponent(CLASS_SELECTION,{{outlineSize.x+4-navigationButtonSize.x-2,outlineSize.y+4-navigationButtonSize.y-2},navigationButtonSize},"Confirm",[](MenuFuncData data){GameState::ChangeState(States::GAME_RUN);}); |
|
|
|
|
classSelectionWindow->AddComponent("Confirm",confirmButton); |
|
|
|
|
|
|
|
|
|
vf2d buttonPadding={2,2}; |
|
|
|
|
vf2d buttonSize={floor(outlineSize.y/3-buttonPadding.y*3),outlineSize.y/9-buttonPadding.y*3}; //The floor is for fixing a small pixel rounding bug.
|
|
|
|
|
|
|
|
|
|