public static DagGUIContent FactoryLocale(string key) { DagLocale dagLocale = new DagLocale(key); DagGUIContent dagGUIContent = new DagGUIContent(); DagNode.Link(0, dagLocale, dagGUIContent); return(dagGUIContent); }
//"version" public static DagGUIContent FactoryLocaleVersion() { DagLocale dagLocale = new DagLocale("version"); DagNodeValue <string> dagVersion = new DagNodeValue <string>(Bootstrap.GetDataStore().staticData.GetString("version")); DagStringConcat dagStringConcat = new DagStringConcat(" "); DagNode.Link(0, dagLocale, dagStringConcat); DagNode.Link(1, dagVersion, dagStringConcat); DagGUIContent dagGUIContent = new DagGUIContent(); DagNode.Link(0, dagStringConcat, dagGUIContent); return(dagGUIContent); }
public static UILable FactoryVersion(int depth) { DagNodeValue <int> dagDepth = new DagNodeValue <int>(depth); DagNodeValue <UnityEngine.Rect> dagRect = new DagNodeValue <UnityEngine.Rect>(new UnityEngine.Rect(UnityEngine.Screen.width - 200.0f, UnityEngine.Screen.height - 25.0f, 200.0f, 25.0f)); UnityEngine.GUIStyle style = new UnityEngine.GUIStyle(); //style.normal.background = UnityEngine.Texture2D.whiteTexture; DagNodeValue <UnityEngine.GUIStyle> dagStyle = new DagNodeValue <UnityEngine.GUIStyle>(style); DagGUIContent dagGUIContent = DagGUIContent.FactoryLocaleVersion(); return(new UILable(dagRect, dagGUIContent, dagStyle, dagDepth)); }
public static UIButton FactoryButton(IDagNodeValue <UnityEngine.Rect> dagRect, string localeKey, int depth, ClickEventHandler onClick) { DagNodeValue <int> dagDepth = new DagNodeValue <int>(depth); UnityEngine.GUIStyle style = new UnityEngine.GUIStyle(); style.normal.background = UnityEngine.Texture2D.whiteTexture; UnityEngine.Texture2D texture = new UnityEngine.Texture2D(1, 1); texture.SetPixel(0, 0, new UnityEngine.Color(0.9f, 0.9f, 0.9f, 1.0f)); texture.Apply(); style.hover.background = texture; DagNodeValue <UnityEngine.GUIStyle> dagStyle = new DagNodeValue <UnityEngine.GUIStyle>(style); DagGUIContent dagGUIContent = DagGUIContent.FactoryLocale(localeKey); return(new UIButton(dagRect, dagGUIContent, dagStyle, dagDepth, onClick)); }