Game/Source/MenuSettings.cpp
// Called before the first frame / when activated
Called before the first frame / when activated
Called before the first frame / when activated
bool MenuSettings::Load()
{
	LOG("Loading Settings Menu");
	 Load buttons
	GUITexture = tex->Load("Assets/Textures/GUI/gui_spritesheet.png");
	buttonBack = new GUIButton(6, { 163, 205, 100, 24 }, "BACK", audioManager, fonts);
	buttonBack->SetObserver(this);
	buttonBack->SetTexture(GUITexture);
	sliderMusic = new GUISlider(7, { 163, 65, 100, 10 }, audioManager, fonts, "Music Volume", audioManager->GetMusicVolume(), 0, 100);
	sliderMusic->SetObserver(this);
	sliderMusic->SetTexture(GUITexture);
	sliderFX = new GUISlider(8, { 163, 95, 100, 10 }, audioManager, fonts, "FX Volume", audioManager->GetFXVolume(), 0, 100);
	sliderFX->SetObserver(this);
	sliderFX->SetTexture(GUITexture);
	checkBoxFullScreen = new GUICheckBox(9, { 206, 125, 15, 15 }, "Full Screen", audioManager, fonts, false);
	checkBoxFullScreen->SetObserver(this);
	checkBoxFullScreen->SetTexture(GUITexture);
	checkBoxVSync = new GUICheckBox(10, { 206, 155, 15, 15 }, "VSync", audioManager, fonts, false);
	checkBoxVSync->SetObserver(this);
	checkBoxVSync->SetTexture(GUITexture);
	 Load white font
	font = fonts->Load("Assets/Fonts/font_big_white.png", "abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ ", 2, 324, 32);
	 Move camera
	render->camera.x = render->camera.y = 0;
	return false;
}
bool MenuSettings :: Load ( ) { LOG ( " " ) ; GUITexture = tex -> Load ( " " ) ; buttonBack = new GUIButton ( 6 , { 163 , 205 , 100 , 24 } , " " , audioManager , fonts ) ; buttonBack -> SetObserver ( this ) ; buttonBack -> SetTexture ( GUITexture ) ; sliderMusic = new GUISlider ( 7 , { 163 , 65 , 100 , 10 } , audioManager , fonts , " " , audioManager -> GetMusicVolume ( ) , 0 , 100 ) ; sliderMusic -> SetObserver ( this ) ; sliderMusic -> SetTexture ( GUITexture ) ; sliderFX = new GUISlider ( 8 , { 163 , 95 , 100 , 10 } , audioManager , fonts , " " , audioManager -> GetFXVolume ( ) , 0 , 100 ) ; sliderFX -> SetObserver ( this ) ; sliderFX -> SetTexture ( GUITexture ) ; checkBoxFullScreen = new GUICheckBox ( 9 , { 206 , 125 , 15 , 15 } , " " , audioManager , fonts , false ) ; checkBoxFullScreen -> SetObserver ( this ) ; checkBoxFullScreen -> SetTexture ( GUITexture ) ; checkBoxVSync = new GUICheckBox ( 10 , { 206 , 155 , 15 , 15 } , " " , audioManager , fonts , false ) ; checkBoxVSync -> SetObserver ( this ) ; checkBoxVSync -> SetTexture ( GUITexture ) ; font = fonts -> Load ( " " , " " , 2 , 324 , 32 ) ; render -> camera . x = render -> camera . y = 0 ; return false ; }
Called before the first frame / when activated
Called before the first frame / when activated
// // Load buttons // // // Load white font // // // Move camera //