fixed controls, texts and added image, v1.4.1

This commit is contained in:
TAASONI3
2023-07-05 17:42:35 +02:00
parent 0dc2ff831f
commit d0d9a6847a
33 changed files with 11964 additions and 405 deletions

View File

@@ -4,6 +4,7 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Localization.Settings;
using UnityEngine.UI;
namespace Assets.Scripts
@@ -127,7 +128,6 @@ namespace Assets.Scripts
public void openOptions()
{
options.SetActive(true);
FileHandler.loadOptionDisplay();
hideOtherElements(options);
state = UIState.PAUSEOPTIONS;
@@ -137,7 +137,6 @@ namespace Assets.Scripts
public void closeOptions()
{
options.SetActive(false);
state = UIState.PAUSE;
openPauseMenu();
}
@@ -304,6 +303,22 @@ namespace Assets.Scripts
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 void openPauseMenu()
{
hideOtherElements(pauseMenu);
@@ -576,5 +591,18 @@ namespace Assets.Scripts
}
}
}
public void switchLanguage(){
GameObject language = GameObject.Find("dropLanguage");
switch (language.GetComponent<Dropdown>().value)
{
case 0:
LocalizationSettings.SelectedLocale = LocalizationSettings.AvailableLocales.GetLocale("de");
break;
case 1:
LocalizationSettings.SelectedLocale = LocalizationSettings.AvailableLocales.GetLocale("en");
break;
}
}
}
}