コード例 #1
0
ファイル: UTAttributes.cs プロジェクト: Baka626/UdonToolkit
 /// <summary>
 /// An alternative [Popup] signature that avoids enums to compile with U#
 /// </summary>
 /// <param name="sourceType">Can be "method", "animator", "behaviour" or "shader"</param>
 /// <param name="methodName"></param>
 /// <param name="hideLabel"></param>
 /// <param name="shaderPropType">Can be "float", "color" or "vector"</param>
 public PopupAttribute(string sourceType, string methodName, string shaderPropType, bool hideLabel)
 {
     this.sourceType     = sourcesMap.ContainsKey(sourceType) ? sourcesMap[sourceType] : PopupSource.Method;
     this.shaderPropType = shaderPropsMap.ContainsKey(shaderPropType) ? shaderPropsMap[shaderPropType] : ShaderPropType.Float;
     this.hideLabel      = hideLabel;
     this.methodName     = methodName;
 }
コード例 #2
0
ファイル: UTAttributes.cs プロジェクト: Baka626/UdonToolkit
 public PopupAttribute(PopupSource sourceType, string methodName, ShaderPropType shaderPropType, bool hideLabel)
 {
     this.sourceType     = sourceType;
     this.methodName     = methodName;
     this.shaderPropType = shaderPropType;
     this.hideLabel      = hideLabel;
 }
コード例 #3
0
ファイル: Popup.cs プロジェクト: Egaros/lib
        public Popup()
        {
            PopupSource = new PopupSource(this);

            Panel = new PopupPanel(this)
            {
                Visibility = Visibility.Collapsed
            };

            PopupCloseController = new PopupCloseController(this);

            PlatformCtor();

            IsTabStop = false;
        }
コード例 #4
0
ファイル: UTAttributes.cs プロジェクト: Baka626/UdonToolkit
 /// <summary>
 /// An alternative [Popup] signature that avoids enums to compile with U#
 /// </summary>
 /// <param name="sourceType">Can be "method", "animator", "behaviour" or "shader"</param>
 /// <param name="methodName"></param>
 public PopupAttribute(string sourceType, string methodName)
 {
     this.sourceType = sourcesMap.ContainsKey(sourceType) ? sourcesMap[sourceType] : PopupSource.Method;
     this.methodName = methodName;
 }
コード例 #5
0
ファイル: UTAttributes.cs プロジェクト: Baka626/UdonToolkit
 public PopupAttribute(PopupSource sourceType, string methodName, ShaderPropType shaderPropType)
 {
     this.sourceType     = sourceType;
     this.methodName     = methodName;
     this.shaderPropType = shaderPropType;
 }
コード例 #6
0
ファイル: UTAttributes.cs プロジェクト: Baka626/UdonToolkit
 public PopupAttribute(PopupSource sourceType, string methodName)
 {
     this.sourceType = sourceType;
     this.methodName = methodName;
 }
コード例 #7
0
ファイル: UTAttributes.cs プロジェクト: Baka626/UdonToolkit
 /// <summary>
 /// Draws a popup with options provided by the specified field or method
 /// </summary>
 /// <param name="methodName"></param>
 public PopupAttribute(string methodName)
 {
     sourceType      = PopupSource.Method;
     this.methodName = methodName;
 }