public static void setSetting(QHierarchySetting setting, List <QTagTexture> tagTextureList) { string result = ""; for (int i = 0; i < tagTextureList.Count; i++) { result += tagTextureList[i].tag + ";" + AssetDatabase.GetAssetPath(tagTextureList[i].texture.GetInstanceID()) + ";"; } setEditorSetting(setting, result); settings[(int)setting] = tagTextureList; QHierarchy.repaint(); }
public static void setSetting(QHierarchySetting setting, List <QHierarchyIconType> value) { string result = ""; for (int i = 0; i < value.Count; i++) { result += ((int)value[i]).ToString(); } setEditorSetting(setting, result); settings[(int)setting] = value; QHierarchy.repaint(); }
private bool drawTitle(QHierarchySetting foldoutSetting, string title) { bool foldout = QHierarchySettings.getSetting<bool>(foldoutSetting); GUILayout.Space(5); Rect rect = EditorGUILayout.GetControlRect(GUILayout.ExpandWidth(true), GUILayout.Height(24)); rect.width += rect.x * 2 + 1; rect.x = 0; GUI.Box(rect, ""); GUILayout.Space(5); rect.x = 5; rect.y += 4; bool newFoldout = EditorGUI.Foldout(rect, foldout, title); if (newFoldout != foldout) { QHierarchySettings.setSetting(foldoutSetting, newFoldout); } return newFoldout; }
private bool drawTitle(QHierarchySetting foldoutSetting, string title) { bool foldout = QHierarchySettings.getSetting <bool>(foldoutSetting); GUILayout.Space(5); Rect rect = EditorGUILayout.GetControlRect(GUILayout.ExpandWidth(true), GUILayout.Height(24)); rect.width += rect.x * 2 + 1; rect.x = 0; GUI.Box(rect, ""); GUILayout.Space(5); rect.x = 5; rect.y += 4; bool newFoldout = EditorGUI.Foldout(rect, foldout, title); if (newFoldout != foldout) { QHierarchySettings.setSetting(foldoutSetting, newFoldout); } return(newFoldout); }
private static void setEditorSetting(QHierarchySetting setting, float value) { EditorPrefs.SetFloat(PREFS_PREFIX + setting.ToString("G"), value); }
private static void setEditorSetting(QHierarchySetting setting, bool value) { EditorPrefs.SetBool(PREFS_PREFIX + setting.ToString("G"), value); }
private static float getEditorSetting(QHierarchySetting setting, float defaultValue) { return(EditorPrefs.GetFloat(PREFS_PREFIX + setting.ToString("G"), defaultValue)); }
private static string getEditorSetting(QHierarchySetting setting, string defaultValue) { return(EditorPrefs.GetString(PREFS_PREFIX + setting.ToString("G"), defaultValue)); }
private static bool getEditorSetting(QHierarchySetting setting, bool defaultValue) { return(EditorPrefs.GetBool(PREFS_PREFIX + setting.ToString("G"), defaultValue)); }
public static void setSetting(QHierarchySetting setting, float value) { setEditorSetting(setting, value); settings[(int)setting] = value; QHierarchy.repaint(); }
public static T getSetting <T>(QHierarchySetting setting) { return((T)settings[(int)setting]); }