Exemple #1
0
        public new static void Parse(XNode node, DefinitionFile file)
        {
            UiEditBoxBase.Parse(node, file);

            var parser = new DefinitionParser(node);

            file["NativeInputMargin"] = parser.ParseMargin("NativeInputMargin");

            file["NativeInputAlign"]    = parser.ParseEnum <Align>("NativeInputAlign");
            file["NativeInputFontSize"] = parser.ParseInt("NativeInputFontSize");
        }
        public static void Parse(XNode node, DefinitionFile file)
        {
            var parser = new DefinitionParser(node);

            file["Color"] = parser.ParseColor("Color");

            file["Image"]       = parser.ParseResource <NinePatchImage>("Image");
            file["ScaleByUnit"] = parser.ParseBoolean("ScaleByUnit");
            file["Scale"]       = parser.ParseDouble("Scale");

            file["Margin"] = parser.ParseMargin("Margin");
        }
        public static void Parse(XNode node, DefinitionFile file)
        {
            var parser = new DefinitionParser(node);

            file["Width"]  = parser.ParseLength("Width");
            file["Height"] = parser.ParseLength("Height");
            file["Margin"] = parser.ParseMargin("Margin");

            file["HorizontalAlignment"] = parser.ParseEnum <HorizontalAlignment>("HorizontalAlignment");
            file["VerticalAlignment"]   = parser.ParseEnum <VerticalAlignment>("VerticalAlignment");

            file["X"] = parser.ParseLength("X");
            file["Y"] = parser.ParseLength("Y");
        }
Exemple #4
0
        public static void Parse(XNode node, DefinitionFile file)
        {
            var parser = new DefinitionParser(node);

            file["ChangeTime"] = parser.ParseDouble("ChangeTime");

            file["Opacity"] = parser.ParseDouble("Opacity");

            file["ColorPushed"]   = parser.ParseColor("ColorPushed");
            file["ColorReleased"] = parser.ParseColor("ColorReleased");
            file["ColorDisabled"] = parser.ParseColor("ColorDisabled");
            file["Margin"]        = parser.ParseMargin("Margin");

            file["Checked"] = parser.ParseBoolean("Checked");
            file["Special"] = parser.ParseBoolean("Special");
        }
Exemple #5
0
        public static void Parse(XNode node, DefinitionFile file)
        {
            var parser = new DefinitionParser(node);

            file["Width"] = parser.ParseLength("Width");

            file["Font"]        = parser.ValueOrNull("Font");
            file["FontSize"]    = parser.ParseInt("FontSize");
            file["FontSpacing"] = parser.ParseInt("FontSpacing");

            file["TextAlign"] = parser.ParseEnum <TextAlign>("TextAlign");

            file["LineHeight"] = parser.ParseInt("LineHeight");

            file["TextMargin"] = parser.ParseMargin("TextMargin");
        }
        public new static void Parse(XNode node, DefinitionFile file)
        {
            UiEditBoxBase.Parse(node, file);

            var parser = new DefinitionParser(node);

            file["NativeInputMargin"] = parser.ParseMargin("NativeInputMargin");
            file["NativeInputAlign"]  = parser.ParseEnum <Align>("NativeInputAlign");

                        #if __IOS__
            file["NativeInputFontSize"] = parser.ParseInt("iOS.NativeInputFontSize");
                        #elif __ANDROID__
            file["NativeInputFontSize"] = parser.ParseInt("Android.NativeInputFontSize");
                        #elif __WINDOWSPHONE__
            file["NativeInputFontSize"] = parser.ParseInt("WindowsPhone.NativeInputFontSize");
                        #elif __WINRT__
            file["NativeInputFontSize"] = parser.ParseInt("WindowsRT.NativeInputFontSize");
                        #endif
        }
Exemple #7
0
        public new static void Parse(XNode node, DefinitionFile file)
        {
            UiView.Parse(node, file);

            var parser = new DefinitionParser(node);

            file["Text"]        = parser.ParseString("Text");
            file["Font"]        = parser.ValueOrNull("Font");
            file["FontSize"]    = parser.ParseInt("FontSize");
            file["FontSpacing"] = parser.ParseInt("FontSpacing");
            file["LineHeight"]  = parser.ParseInt("LineHeight");

            file["TextColor"] = parser.ParseColor("TextColor");
            file["HorizontalContentAlignment"] = parser.ParseEnum <HorizontalContentAlignment>("HorizontalContentAlignment");
            file["VerticalContentAlignment"]   = parser.ParseEnum <VerticalContentAlignment>("VerticalContentAlignment");

            file["AutoSizeUpdate"] = parser.ParseBoolean("AutoSizeUpdate");
            file["TextRotation"]   = parser.ParseEnum <TextRotation>("TextRotation");

            file["TextMargin"] = parser.ParseMargin("TextMargin");
        }
Exemple #8
0
        public new static void Parse(XNode node, DefinitionFile file)
        {
            UiView.Parse(node, file);

            var parser = new DefinitionParser(node);

            file["Text"]  = parser.ParseString("Text");
            file["Icon"]  = parser.ParseResource <Texture2D>("Icon");
            file["Click"] = parser.ParseDelegate("Click");
            file["Hold"]  = parser.ParseDelegate("Hold");

            file["Push"]    = parser.ParseDelegate("Push");
            file["Release"] = parser.ParseDelegate("Release");

            file["Enabled"]  = parser.ParseBoolean("Enabled");
            file["Disabled"] = parser.ParseBoolean("Disabled");

            file["RepeatStart"]    = parser.ParseInt("RepeatStart");
            file["RepeatInterval"] = parser.ParseInt("RepeatInterval");

            file["PushSound"]    = parser.ParseResource <SoundEffect>("PushSound");
            file["ReleaseSound"] = parser.ParseResource <SoundEffect>("ReleaseSound");
            file["ActionSound"]  = parser.ParseResource <SoundEffect>("ActionSound");

            file["GestureMargin"] = parser.ParseMargin("GestureMargin");

            file["Mode"] = parser.ParseEnum <UiButtonMode>("Mode");

            foreach (var cn in node.Nodes)
            {
                switch (cn.Tag)
                {
                case "UiButton.Drawables":
                    ParseDrawables(cn, file, typeof(ButtonDrawable));
                    break;
                }
            }
        }