Exemplo n.º 1
0
 public UILable(
     IDagNodeValue <UnityEngine.Rect> dagRect,
     IDagNodeValue <UnityEngine.GUIContent> dagGUIContent,
     IDagNodeValue <UnityEngine.GUIStyle> dagGUIStyle,
     IDagNodeValue <int> dagDepth
     )
 {
     _dagRect       = dagRect;
     _dagGUIContent = dagGUIContent;
     _dagGUIStyle   = dagGUIStyle;
     _dagDepth      = dagDepth;
 }
Exemplo n.º 2
0
 public UIButton(
     IDagNodeValue <UnityEngine.Rect> dagRect,
     IDagNodeValue <UnityEngine.GUIContent> dagGUIContent,
     IDagNodeValue <UnityEngine.GUIStyle> dagGUIStyle,
     IDagNodeValue <int> dagDepth,
     ClickEventHandler onClick
     )
 {
     _dagRect       = dagRect;
     _dagGUIContent = dagGUIContent;
     _dagGUIStyle   = dagGUIStyle;
     _dagDepth      = dagDepth;
     _onClick       = onClick;
 }
Exemplo n.º 3
0
 public UnityEngine.GUIContent GetValue()
 {
     if (true == _dirty)
     {
         _dirty = false;
         _value = new UnityEngine.GUIContent();
         IDagNodeValue <string> dagInput = _dagCalculateComponent.inputArray[0] as IDagNodeValue <string>;
         if (null != dagInput)
         {
             _value.text = dagInput.GetValue();
         }
     }
     return(_value);
 }
Exemplo n.º 4
0
    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));
    }
Exemplo n.º 5
0
 public string GetValue()
 {
     if (true == _dirty)
     {
         _dirty = false;
         _value = "";
         {
             IDagNodeValue <string> dagInput = _dagCalculateComponent.inputArray[0] as IDagNodeValue <string>;
             if (null != dagInput)
             {
                 _value += dagInput.GetValue();
             }
         }
         _value += _join;
         {
             IDagNodeValue <string> dagInput = _dagCalculateComponent.inputArray[1] as IDagNodeValue <string>;
             if (null != dagInput)
             {
                 _value += dagInput.GetValue();
             }
         }
     }
     return(_value);
 }