Reworked options menu as a prefab and changed pause menu a bit. Need to work on option loading (Currently still old mechanic) and jumping cam when striving and looking.
This commit is contained in:
@@ -115,19 +115,6 @@ namespace Assets.Scripts
|
||||
EventSystem.current.SetSelectedGameObject(GameObject.Find("btnCloseTutorial"));
|
||||
}
|
||||
|
||||
public void openOptions()
|
||||
{
|
||||
FileHandler.loadOptionDisplay();
|
||||
hideOtherElements(options);
|
||||
state = UIState.PAUSEOPTIONS;
|
||||
}
|
||||
|
||||
public void closeOptions()
|
||||
{
|
||||
state = UIState.PAUSE;
|
||||
openPauseMenu();
|
||||
}
|
||||
|
||||
public void switchInventory()
|
||||
{
|
||||
if (state == UIState.INVENTORY)
|
||||
@@ -233,77 +220,6 @@ namespace Assets.Scripts
|
||||
showHUD();
|
||||
}
|
||||
|
||||
public string saveVideoSettings()
|
||||
{
|
||||
GameObject resolution = GameObject.Find("dropResolution");
|
||||
GameObject mode = GameObject.Find("dropMode");
|
||||
string result = "";
|
||||
switch (resolution.GetComponent<Dropdown>().value)
|
||||
{
|
||||
case 0:
|
||||
Screen.SetResolution(800, 600, Screen.fullScreenMode);
|
||||
break;
|
||||
case 1:
|
||||
Screen.SetResolution(1280, 800, Screen.fullScreenMode);
|
||||
break;
|
||||
case 2:
|
||||
Screen.SetResolution(1920, 1080, Screen.fullScreenMode);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (mode.GetComponent<Dropdown>().value)
|
||||
{
|
||||
case 0:
|
||||
if (Screen.fullScreenMode != FullScreenMode.Windowed)
|
||||
{
|
||||
Screen.fullScreenMode = FullScreenMode.Windowed;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (Screen.fullScreenMode != FullScreenMode.ExclusiveFullScreen)
|
||||
{
|
||||
Screen.fullScreenMode = FullScreenMode.ExclusiveFullScreen;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (Screen.fullScreenMode != FullScreenMode.FullScreenWindow)
|
||||
{
|
||||
Screen.fullScreenMode = FullScreenMode.FullScreenWindow;
|
||||
}
|
||||
break;
|
||||
}
|
||||
result = result + "Resolution:" + resolution.GetComponent<Dropdown>().value + "\r\n";
|
||||
result = result + "Mode:" + mode.GetComponent<Dropdown>().value;
|
||||
return result;
|
||||
}
|
||||
|
||||
public string saveLanguage()
|
||||
{
|
||||
GameObject language = GameObject.Find("dropLanguage");
|
||||
string result = "";
|
||||
switch (language.GetComponent<Dropdown>().value)
|
||||
{
|
||||
case 0:
|
||||
result = "de";
|
||||
break;
|
||||
case 1:
|
||||
result = "en";
|
||||
break;
|
||||
}
|
||||
result = "Language:" + result;
|
||||
return result;
|
||||
}
|
||||
|
||||
public string saveAudioSettings()
|
||||
{
|
||||
string result = "";
|
||||
float music = GameObject.Find("slideMusic").GetComponent<Slider>().value;
|
||||
float effects = GameObject.Find("slideEffects").GetComponent<Slider>().value;
|
||||
result = result + "Music:" + music + "\r\n";
|
||||
result = result + "Effects:" + effects;
|
||||
return result;
|
||||
}
|
||||
|
||||
public void openPauseMenu()
|
||||
{
|
||||
hideOtherElements(pauseMenu);
|
||||
|
||||
Reference in New Issue
Block a user