|
|
|
@ -36,6 +36,7 @@ All rights reserved. |
|
|
|
|
*/ |
|
|
|
|
#pragma endregion |
|
|
|
|
|
|
|
|
|
#include "AdventuresInLestoria.h" |
|
|
|
|
#include "Menu.h" |
|
|
|
|
#include "MenuComponent.h" |
|
|
|
|
#include "SoundEffect.h" |
|
|
|
@ -44,20 +45,22 @@ All rights reserved. |
|
|
|
|
#include "Unlock.h" |
|
|
|
|
|
|
|
|
|
INCLUDE_DATA |
|
|
|
|
INCLUDE_game |
|
|
|
|
INCLUDE_WINDOW_SIZE |
|
|
|
|
|
|
|
|
|
void Menu::InitializeSettingsWindow(){ |
|
|
|
|
vf2d windowSize=game->WINDOW_SIZE-vf2d{28,28}; |
|
|
|
|
vf2d windowSize=WINDOW_SIZE-vf2d{28,28}; |
|
|
|
|
Menu*settingsWindow=CreateMenu(SETTINGS,CENTERED,windowSize); |
|
|
|
|
|
|
|
|
|
settingsWindow->ADD("Unlock All Button",MenuComponent)({{4,4},{72,12}},"Unlock All",[](MenuFuncData data){ |
|
|
|
|
settingsWindow->ADD("Unlock All Button",MenuComponent)(geom2d::rect<float>{{4,4},{72,12}},"Unlock All",[](MenuFuncData data){ |
|
|
|
|
for(auto&[key,size]:DATA["Levels"]){ |
|
|
|
|
Unlock::UnlockArea(key); |
|
|
|
|
} |
|
|
|
|
SoundEffect::PlaySFX("Buy Item",SoundEffect::CENTERED); |
|
|
|
|
return true; |
|
|
|
|
}); |
|
|
|
|
settingsWindow->ADD("Go Back",MenuComponent)({windowSize/2-vf2d{36,16},{72,12}},"Go Back",[](MenuFuncData data){ |
|
|
|
|
})END; |
|
|
|
|
settingsWindow->ADD("Go Back",MenuComponent)(geom2d::rect<float>{windowSize/2-vf2d{36,16},{72,12}},"Go Back",[](MenuFuncData data){ |
|
|
|
|
Menu::CloseMenu(); |
|
|
|
|
return true; |
|
|
|
|
}); |
|
|
|
|
})END; |
|
|
|
|
} |