예제 #1
0
        public override bool Draw()
        {
            base.Draw();



            DisplayNameText.Position = OffsetVector(ColorBarNative.TopLeft, 0, -22);
            DisplayNameText.Draw();

            //Color Display Bar
            DrawRectangle(ColorBarNative, DefaultColorGold, 2, false);
            Line.DrawLine(CurrentValue, ColorBarNative.Height - 2,
                          SetVector(ColorBarNative.TopLeft, ColorBarNative.TopLeft.X + 1, ColorBarNative.Center.Y),
                          SetVector(ColorBarNative.TopRight, ColorBarNative.Right, ColorBarNative.Center.Y));

            //Red
            DrawColorBar(RedBarNative, color => Color.FromArgb(color, Green, Blue));
            DrawRectangle(RedBarNative, DefaultColorGold, 2f);
            DrawColorPointer(RedBarNative, Red);
            RedText.TextValue = "Red: " + Red;
            RedText.Position  = OffsetVector(RedBarNative.BottomRight, -50, _barPadding[3]);
            RedText.Draw();

            //Green
            DrawColorBar(GreenBarNative, color => Color.FromArgb(Red, color, Blue));
            DrawRectangle(GreenBarNative, DefaultColorGold, 2);
            DrawColorPointer(GreenBarNative, Green);
            GreenText.TextValue = "Green: " + Green;
            GreenText.Position  = OffsetVector(GreenBarNative.BottomRight, -60, _barPadding[3]);
            GreenText.Draw();

            //Blue
            DrawColorBar(BlueBarNative, color => Color.FromArgb(Red, Green, color));
            DrawRectangle(BlueBarNative, DefaultColorGold, 2);
            DrawColorPointer(BlueBarNative, Blue);
            BlueText.TextValue = "Blue: " + Blue;
            BlueText.Position  = OffsetVector(BlueBarNative.BottomRight, -50, _barPadding[3]);
            BlueText.Draw();

            //Alpha
            DrawColorBar(AlphaBarNative, color => Color.FromArgb(color, color, color));
            DrawRectangle(AlphaBarNative, DefaultColorGold, 2);
            DrawColorPointer(AlphaBarNative, Alpha);
            AlphaText.TextValue = "Alpha: " + Alpha;
            AlphaText.Position  = OffsetVector(AlphaBarNative.BottomRight, -60, _barPadding[3]);
            AlphaText.Draw();

            return(true);
        }
예제 #2
0
 private void Awake()
 {
     _alphaText = feedbackText.GetComponent <AlphaText>();
     _moveUI    = feedbackText.GetComponent <MoveUI>();
     _cam       = Camera.main;
 }