modify
This commit is contained in:
parent
d5622f5e9b
commit
aac11841f2
@ -16,11 +16,10 @@ public class LocalizationDropdownField : IMGUIContainer
|
|||||||
public void InitializeElement()
|
public void InitializeElement()
|
||||||
{
|
{
|
||||||
var nameArray = Enum.GetNames(typeof(Language));
|
var nameArray = Enum.GetNames(typeof(Language));
|
||||||
_languageTypeNames = new string[nameArray.Length - 1];
|
_languageTypeNames = new string[nameArray.Length];
|
||||||
for (int i = 1; i < nameArray.Length; i++)
|
for (int i = 0; i < nameArray.Length; i++)
|
||||||
{
|
{
|
||||||
var name = nameArray[i];
|
_languageTypeNames[i] = nameArray[i];
|
||||||
_languageTypeNames[i - 1] = name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
appConfigBtContent =
|
appConfigBtContent =
|
||||||
@ -59,11 +58,12 @@ public class LocalizationDropdownField : IMGUIContainer
|
|||||||
|
|
||||||
static void ClickToolsSubmenu(int menuIdx)
|
static void ClickToolsSubmenu(int menuIdx)
|
||||||
{
|
{
|
||||||
EditorPrefs.SetInt(LocalizationComponent.PrefsKey, menuIdx + 1);
|
EditorPrefs.SetInt(LocalizationComponent.PrefsKey, menuIdx);
|
||||||
|
Debug.Log(((Language)menuIdx).ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
static int GetPrefsIndex()
|
static int GetPrefsIndex()
|
||||||
{
|
{
|
||||||
return EditorPrefs.GetInt(LocalizationComponent.PrefsKey, 1) - 1;
|
return EditorPrefs.GetInt(LocalizationComponent.PrefsKey, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user