private void LocalizationOnAddCallback(ReorderableList list) { List <SteamVR_Input_ActionFile_LocalizationItem> itemList = ((List <SteamVR_Input_ActionFile_LocalizationItem>)localizationList.list); SteamVR_Input_ActionFile_LocalizationItem newLanguage = new SteamVR_Input_ActionFile_LocalizationItem("new-language"); newLanguage.items.Add(selectedAction.name, selectedAction.name); itemList.Add(newLanguage); selectedLocalizationIndex = list.list.Count - 1; }
private void LocalizationDrawElementCallback(Rect rect, int index, bool isActive, bool isFocused) { SteamVR_Input_ActionFile_LocalizationItem item = ((List <SteamVR_Input_ActionFile_LocalizationItem>)localizationList.list)[index]; if (localizationList.index == index) { item.language = EditorGUI.TextField(rect, item.language); } else { EditorGUI.LabelField(rect, item.language); } }