Exemple #1
0
        public static void PaintMoveButtons(IGraphics g, int width, int height, MoveButtonState state)
        {
            const int bsize = zoomButtonSize;

            g.SmoothingMode = SmoothingMode2.AntiAlias;
            Brush2 b = buttonBrush;

            switch (state)
            {
            case MoveButtonState.HighlightUp:
                b = buttonBrushHighlight;
                break;

            case MoveButtonState.PressUp:
                b = buttonBrushPress;
                break;
            }
            PaintMoveUpButton(g, b, width - 3 * bsize, height - 2 * bsize - 8, bsize);
            b = buttonBrush;
            switch (state)
            {
            case MoveButtonState.HighlightLeft:
                b = buttonBrushHighlight;
                break;

            case MoveButtonState.PressLeft:
                b = buttonBrushPress;
                break;
            }
            PaintMoveLeftButton(g, b, (int)(width - 3.5 * bsize - 2), (int)(height - 1.5f * bsize - 6), bsize);
            b = buttonBrush;
            switch (state)
            {
            case MoveButtonState.HighlightRight:
                b = buttonBrushHighlight;
                break;

            case MoveButtonState.PressRight:
                b = buttonBrushPress;
                break;
            }
            PaintMoveRightButton(g, b, (int)(width - 2.5 * bsize + 2), (int)(height - 1.5f * bsize - 6), bsize);
            b = buttonBrush;
            switch (state)
            {
            case MoveButtonState.HighlightDown:
                b = buttonBrushHighlight;
                break;

            case MoveButtonState.PressDown:
                b = buttonBrushPress;
                break;
            }
            PaintMoveDownButton(g, b, width - 3 * bsize, height - bsize - 4, bsize);
            g.SmoothingMode = SmoothingMode2.Default;
        }
Exemple #2
0
 public static void PaintMoveButtons(IGraphics g, int width, int height, MoveButtonState state)
 {
     const int bsize = zoomButtonSize;
     g.SmoothingMode = SmoothingMode2.AntiAlias;
     Brush2 b = buttonBrush;
     switch (state){
         case MoveButtonState.HighlightUp:
             b = buttonBrushHighlight;
             break;
         case MoveButtonState.PressUp:
             b = buttonBrushPress;
             break;
     }
     PaintMoveUpButton(g, b, width - 3*bsize, height - 2*bsize - 8, bsize);
     b = buttonBrush;
     switch (state){
         case MoveButtonState.HighlightLeft:
             b = buttonBrushHighlight;
             break;
         case MoveButtonState.PressLeft:
             b = buttonBrushPress;
             break;
     }
     PaintMoveLeftButton(g, b, (int) (width - 3.5*bsize - 2), (int) (height - 1.5f*bsize - 6), bsize);
     b = buttonBrush;
     switch (state){
         case MoveButtonState.HighlightRight:
             b = buttonBrushHighlight;
             break;
         case MoveButtonState.PressRight:
             b = buttonBrushPress;
             break;
     }
     PaintMoveRightButton(g, b, (int) (width - 2.5*bsize + 2), (int) (height - 1.5f*bsize - 6), bsize);
     b = buttonBrush;
     switch (state){
         case MoveButtonState.HighlightDown:
             b = buttonBrushHighlight;
             break;
         case MoveButtonState.PressDown:
             b = buttonBrushPress;
             break;
     }
     PaintMoveDownButton(g, b, width - 3*bsize, height - bsize - 4, bsize);
     g.SmoothingMode = SmoothingMode2.Default;
 }