コード例 #1
0
ファイル: Tree.cs プロジェクト: modi0012/RobustToolbox
        private protected override void SetGodotProperty(string property, object value, GodotAssetScene context)
        {
            base.SetGodotProperty(property, value, context);

            if (property == "hide_root")
            {
                HideRoot = (bool)value;
            }
        }
コード例 #2
0
        private protected override void SetGodotProperty(string property, object value, GodotAssetScene context)
        {
            base.SetGodotProperty(property, value, context);

            if (property == "texture_normal")
            {
                var          extRef = context.GetExtResource((GodotAsset.TokenExtResource)value);
                ResourcePath godotPathToResourcePath;
                try
                {
                    godotPathToResourcePath = GodotPathUtility.GodotPathToResourcePath(extRef.Path);
                }
                catch (ArgumentException)
                {
                    Logger.Error("TextureButton is referencing non-VFS Godot path {0}.", extRef.Path);
                    return;
                }
                var texture = IoCManager.Resolve <IResourceCache>()
                              .GetResource <TextureResource>(godotPathToResourcePath);
                TextureNormal = texture;
            }
        }
コード例 #3
0
        private protected override void SetGodotProperty(string property, object value, GodotAssetScene context)
        {
            base.SetGodotProperty(property, value, context);

            switch (property)
            {
            case "custom_constants/margin_right":
                MarginRightOverride = (int)(long)value;
                break;

            case "custom_constants/margin_left":
                MarginLeftOverride = (int)(long)value;
                break;

            case "custom_constants/margin_bottom":
                MarginBottomOverride = (int)(long)value;
                break;

            case "custom_constants/margin_top":
                MarginTopOverride = (int)(long)value;
                break;
            }
        }