Exemple #1
0
        private protected override void SetGodotProperty(string property, object value, GodotAssetScene context)
        {
            base.SetGodotProperty(property, value, context);

            if (property == "hide_root")
            {
                HideRoot = (bool)value;
            }
        }
Exemple #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;
            }
        }
Exemple #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;
            }
        }