示例#1
0
        private void DrawHeader(Graphics g, LiveSplitState State, float x, float y, float Width, float Height)
        {
            HeaderLabel.ForeColor = Settings.p_HeaderTextColorEnabled?Settings.p_HeaderTextColor:
                                    State.LayoutSettings.TextColor;
            HeaderLabel.HorizontalAlignment = StringAlignment.Near;
            HeaderLabel.VerticalAlignment   = StringAlignment.Center;

            HeaderLabel.X = x + 4;
            HeaderLabel.Y = y + 2;

            HeaderLabel.Width  = Width;
            HeaderLabel.Height = Height - 4;

            HeaderLabel.SetActualWidth(g);
            HeaderLabel.Font = Settings.p_HeaderTextFontEnabled?Settings.p_HeaderTextFont:State.LayoutSettings.TextFont;

            HeaderLabel.HasShadow   = State.LayoutSettings.DropShadows;
            HeaderLabel.ShadowColor = State.LayoutSettings.ShadowsColor;

            g.FillRectangle(new SolidBrush(Settings.p_HeaderBackgroundColor), x, y, Width, Height);
            HeaderLabel.Draw(g);
        }