当前位置: 首页>>代码示例>>C#>>正文


C# Skins类代码示例

本文整理汇总了C#中Skins的典型用法代码示例。如果您正苦于以下问题:C# Skins类的具体用法?C# Skins怎么用?C# Skins使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Skins类属于命名空间,在下文中一共展示了Skins类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PostLayout

 /// <summary>
 /// Function invoked after layout.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void PostLayout(Skins.Skin skin)
 {
     foreach (Control child in Children) // ok?
     {
         child.Position(m_Pos);
     }
 }
开发者ID:tritao,项目名称:flood,代码行数:11,代码来源:Positioner.cs

示例2: Layout

        /// <summary>
        /// Lays out the control's interior according to alignment, padding, dock etc.
        /// </summary>
        /// <param name="skin">Skin to use.</param>
        protected override void Layout(Skins.Skin skin)
        {
            if (null == Parent)
                return;

            //Move to our current position to force clamping - is this a hack?
            MoveTo(X, Y);
        }
开发者ID:tritao,项目名称:flood,代码行数:12,代码来源:ScrollBarBar.cs

示例3: Layout

 /// <summary>
 /// Lays out the control's interior according to alignment, padding, dock etc.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Layout(Skins.Skin skin)
 {
     base.Layout(skin);
     if (AutoSizeToContents)
     {
         DoSizeToContents();
     }
 }
开发者ID:tritao,项目名称:flood,代码行数:12,代码来源:GroupBox.cs

示例4: Canvas

        /// <summary>
        /// Initializes a new instance of the <see cref="Canvas"/> class.
        /// </summary>
        /// <param name="skin">Skin to use.</param>
        public Canvas(Skins.Skin skin)
        {
            SetBounds(0, 0, 10000, 10000);
            SetSkin(skin);
            Scale = 1.0f;
            BackgroundColor = Color.White;
            ShouldDrawBackground = false;

            m_DisposeQueue = new List<IDisposable>();
        }
开发者ID:tritao,项目名称:flood,代码行数:14,代码来源:Canvas.cs

示例5: Layout

        /// <summary>
        /// Lays out the control's interior according to alignment, padding, dock etc.
        /// </summary>
        /// <param name="skin">Skin to use.</param>
        protected override void Layout(Skins.Skin skin)
        {
            base.Layout(skin);

            Align.PlaceDownLeft(m_Button, m_Label, 10);
            Align.CenterHorizontally(m_Button);
            m_InnerPanel.SizeToChildren();
            m_InnerPanel.Height += 10;
            SizeToChildren();
        }
开发者ID:tritao,项目名称:flood,代码行数:14,代码来源:MessageBox.cs

示例6: Layout

 protected override void Layout(Skins.Skin skin)
 {
     // ugly stuff because we don't have anchoring without docking (docking resizes children)
     if (m_Label.Height > m_RadioButton.Height) // usually radio is smaller than label so it gets repositioned to avoid clipping with negative Y
     {
         m_RadioButton.Y = (m_Label.Height - m_RadioButton.Height)/2;
     }
     Align.PlaceRightBottom(m_Label, m_RadioButton);
     SizeToChildren();
     base.Layout(skin);
 }
开发者ID:tritao,项目名称:flood,代码行数:11,代码来源:LabeledRadioButton.cs

示例7: StateHandler

 public StateHandler()
 {
     _score = 0;
     _gamestate = GameState.Menu;
     _menustate = MenuState.MainMenu;
     _levelstate = LevelState.Level1;
     _transitionstate = TransitionState.LevelStart;
     _characterstate = CharacterState.Standing;
     _characterskin = Skins.Mario;
     _nextgamestate = GameState.Menu;
     _nextmenustate = MenuState.MainMenu;
     _nextlevelstate = LevelState.Level1;
     _nexttransitionstate = TransitionState.LevelStart;
     _nextcharacterstate = CharacterState.Standing;
     _nextcharacterskin = Skins.Mario;
     _cursor = MenuCursor.PlayGame;
     _keyscursor = 1;
     _skinscursor = 1;
 }
开发者ID:Rblack1994,项目名称:DonkeyKong,代码行数:19,代码来源:StateHandler.cs

示例8: PostLayout

        protected override void PostLayout(Skins.Skin skin)
        {
            var  bounds = InnerBounds;
            var pos = new Point( bounds.X, bounds.Y );

            foreach (var pChild in Children){
                if ( pChild.Dock != Pos.None ) continue;

                pChild.SetPosition( pos.X + (m_TileSize.X/2) - (pChild.Width/2), pos.Y + (m_TileSize.Y/2) - (pChild.Height/2) );

                pos.X = pos.X + m_TileSize.X;
                if (pos.X + m_TileSize.X > bounds.X + bounds.Width)
                {
                        pos.X = bounds.X;
                        pos.Y += m_TileSize.Y;
                }

            }
        }
开发者ID:tritao,项目名称:flood,代码行数:19,代码来源:Tile.cs

示例9: RenderToolTip

        /// <summary>
        /// Renders the currently visible tooltip.
        /// </summary>
        /// <param name="skin"></param>
        public static void RenderToolTip(Skins.Skin skin)
        {
            if (null == g_ToolTip) return;

            Renderers.Renderer render = skin.Renderer;

            Point oldRenderOffset = render.RenderOffset;
            Point mousePos = Input.InputHandler.MousePosition;
            Rectangle bounds = g_ToolTip.ToolTip.Bounds;

            Rectangle offset = Util.FloatRect(mousePos.X - bounds.Width*0.5f, mousePos.Y - bounds.Height - 10,
                                                 bounds.Width, bounds.Height);
            offset = Util.ClampRectToRect(offset, g_ToolTip.GetCanvas().Bounds);

            //Calculate offset on screen bounds
            render.AddRenderOffset(offset);
            render.EndClip();

            skin.DrawToolTip(g_ToolTip.ToolTip);
            g_ToolTip.ToolTip.DoRender(skin);

            render.RenderOffset = oldRenderOffset;
        }
开发者ID:tritao,项目名称:flood,代码行数:27,代码来源:ToolTip.cs

示例10: Render

        /// <summary>
        /// Renders the control using specified skin.
        /// </summary>
        /// <param name="skin">Skin to use.</param>
        protected override void Render(Skins.Skin skin)
        {
            if (m_Alt)
            {
                if (IsDepressed || ToggleState)
                    Skin.Renderer.DrawColor = skin.Colors.Category.LineAlt.Button_Selected;
                else if (IsHovered)
                    Skin.Renderer.DrawColor = skin.Colors.Category.LineAlt.Button_Hover;
                else
                    Skin.Renderer.DrawColor = skin.Colors.Category.LineAlt.Button;
            }
            else
            {
                if (IsDepressed || ToggleState)
                    Skin.Renderer.DrawColor = skin.Colors.Category.Line.Button_Selected;
                else if (IsHovered)
                    Skin.Renderer.DrawColor = skin.Colors.Category.Line.Button_Hover;
                else
                    Skin.Renderer.DrawColor = skin.Colors.Category.Line.Button;
            }

            skin.Renderer.DrawFilledRect(RenderBounds);
        }
开发者ID:FloodProject,项目名称:flood,代码行数:27,代码来源:CategoryButton.cs

示例11: LayoutVertical

        protected virtual void LayoutVertical(Skins.Skin skin)
        {
            int w = Width;
            int h = Height;

            if (m_Panel[0] != null)
            {
                Margin m = m_Panel[0].Margin;
                if (m_Scale[0])
                    m_Panel[0].SetBounds(m.Left, m.Top, w - m.Left - m.Right, (h*0.5f) - m.Top - m.Bottom);
                else
                    m_Panel[0].Position(Pos.Center, 0, (int) (h*-0.25f));
            }

            if (m_Panel[1] != null)
            {
                Margin m = m_Panel[1].Margin;
                if (m_Scale[1])
                    m_Panel[1].SetBounds(m.Left, m.Top + (h*0.5f), w - m.Left - m.Right, (h*0.5f) - m.Top - m.Bottom);
                else
                    m_Panel[1].Position(Pos.Center, 0, (int) (h*0.25f));
            }
        }
开发者ID:tritao,项目名称:flood,代码行数:23,代码来源:Splitter.cs

示例12: Render

        /// <summary>
        /// Renders the control using specified skin.
        /// </summary>
        /// <param name="skin">Skin to use.</param>
        protected override void Render(Skins.Skin skin)
        {
            base.Render(skin);

            if (ShouldDrawBackground)
                skin.DrawTextBox(this);

            if (!HasFocus) return;

            // Draw selection.. if selected..
            if (m_CursorPos != m_CursorEnd)
            {
                skin.Renderer.DrawColor = Color.FromArgb(200, 50, 170, 255);
                skin.Renderer.DrawFilledRect(m_SelectionBounds);
            }

            // Draw caret
            float time = Platform.Neutral.GetTimeInSeconds() - m_LastInputTime;

            if ((time % 1.0f) <= 0.5f)
            {
                skin.Renderer.DrawColor = Color.Black;
                skin.Renderer.DrawFilledRect(m_CaretBounds);
            }
        }
开发者ID:tritao,项目名称:flood,代码行数:29,代码来源:TextBox.cs

示例13: Layout

        /// <summary>
        /// Lays out the control's interior according to alignment, padding, dock etc.
        /// </summary>
        /// <param name="skin">Skin to use.</param>
        protected override void Layout(Skins.Skin skin)
        {
            base.Layout(skin);

            RefreshCursorBounds();
        }
开发者ID:tritao,项目名称:flood,代码行数:10,代码来源:TextBox.cs

示例14: Render

 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawModalControl(this);
 }
开发者ID:tritao,项目名称:flood,代码行数:8,代码来源:Modal.cs

示例15: Layout

 /// <summary>
 /// Lays out the control's interior according to alignment, padding, dock etc.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Layout(Skins.Skin skin)
 {
     SetBounds(0, 0, GetCanvas().Width, GetCanvas().Height);
 }
开发者ID:tritao,项目名称:flood,代码行数:8,代码来源:Modal.cs


注:本文中的Skins类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。