Exemple #1
0
 public ScrollPaneStyle(ScrollPaneStyle style) : base(style)
 {
     HorizontalScrollBackground = style.HorizontalScrollBackground;
     HorizontalScrollKnob       = style.HorizontalScrollKnob;
     VerticalScrollBackground   = style.VerticalScrollBackground;
     VerticalScrollKnob         = style.VerticalScrollKnob;
 }
Exemple #2
0
 public Stylesheet()
 {
     DesktopStyle               = new DesktopStyle();
     TextBlockStyle             = new TextBlockStyle();
     TextFieldStyle             = new TextFieldStyle();
     ButtonStyle                = new ButtonStyle();
     CheckBoxStyle              = new ButtonStyle();
     RadioButtonStyle           = new ButtonStyle();
     ImageButtonStyle           = new ImageButtonStyle();
     SpinButtonStyle            = new SpinButtonStyle();
     TextButtonStyle            = new TextButtonStyle();
     HorizontalSliderStyle      = new SliderStyle();
     VerticalSliderStyle        = new SliderStyle();
     HorizontalProgressBarStyle = new ProgressBarStyle();
     VerticalProgressBarStyle   = new ProgressBarStyle();
     HorizontalSeparatorStyle   = new SeparatorStyle();
     VerticalSeparatorStyle     = new SeparatorStyle();
     ComboBoxStyle              = new ComboBoxStyle();
     ListBoxStyle               = new ListBoxStyle();
     TabControlStyle            = new TabControlStyle();
     TreeStyle = new TreeStyle();
     HorizontalSplitPaneStyle = new SplitPaneStyle();
     VerticalSplitPaneStyle   = new SplitPaneStyle();
     ScrollPaneStyle          = new ScrollPaneStyle();
     HorizontalMenuStyle      = new MenuStyle();
     VerticalMenuStyle        = new MenuStyle();
     WindowStyle = new WindowStyle();
     DialogStyle = new DialogStyle();
 }
        private void LoadScrollAreaStyleFromSource(JObject source, ScrollPaneStyle result)
        {
            LoadWidgetStyleFromSource(source, result);

            string textureRegion2DName;

            if (source.GetStyle(HorizontalScrollName, out textureRegion2DName))
            {
                result.HorizontalScrollBackground = GetTextureRegion2D(textureRegion2DName);
            }

            if (source.GetStyle(HorizontalScrollKnobName, out textureRegion2DName))
            {
                result.HorizontalScrollKnob = GetTextureRegion2D(textureRegion2DName);
            }

            if (source.GetStyle(VerticalScrollName, out textureRegion2DName))
            {
                result.VerticalScrollBackground = GetTextureRegion2D(textureRegion2DName);
            }

            if (source.GetStyle(VerticalScrollKnobName, out textureRegion2DName))
            {
                result.VerticalScrollKnob = GetTextureRegion2D(textureRegion2DName);
            }
        }
Exemple #4
0
 public Stylesheet()
 {
     TextBlockStyle             = new TextBlockStyle();
     TextFieldStyle             = new TextFieldStyle();
     ButtonStyle                = new ButtonStyle();
     CheckBoxStyle              = new ButtonStyle();
     ImageButtonStyle           = new ImageButtonStyle();
     SpinButtonStyle            = new SpinButtonStyle();
     TextButtonStyle            = new TextButtonStyle();
     HorizontalSliderStyle      = new SliderStyle();
     VerticalSliderStyle        = new SliderStyle();
     HorizontalProgressBarStyle = new ProgressBarStyle();
     VerticalProgressBarStyle   = new ProgressBarStyle();
     ComboBoxStyle              = new ComboBoxStyle();
     ListBoxStyle               = new ListBoxStyle();
     TreeStyle = new TreeStyle();
     HorizontalSplitPaneStyle = new SplitPaneStyle();
     VerticalSplitPaneStyle   = new SplitPaneStyle();
     ScrollPaneStyle          = new ScrollPaneStyle();
     HorizontalMenuStyle      = new MenuStyle();
     VerticalMenuStyle        = new MenuStyle();
     WindowStyle = new WindowStyle();
 }
        private void LoadScrollAreaStyleFromSource(Dictionary <string, object> source, ScrollPaneStyle result)
        {
            LoadWidgetStyleFromSource(source, result);

            string TextureRegionName;

            if (source.GetStyle(HorizontalScrollName, out TextureRegionName))
            {
                result.HorizontalScrollBackground = GetDrawable(TextureRegionName);
            }

            if (source.GetStyle(HorizontalScrollKnobName, out TextureRegionName))
            {
                result.HorizontalScrollKnob = GetDrawable(TextureRegionName);
            }

            if (source.GetStyle(VerticalScrollName, out TextureRegionName))
            {
                result.VerticalScrollBackground = GetDrawable(TextureRegionName);
            }

            if (source.GetStyle(VerticalScrollKnobName, out TextureRegionName))
            {
                result.VerticalScrollKnob = GetDrawable(TextureRegionName);
            }
        }