public override void Draw()
    {
        base.Draw();

        TXT("Hi there!", 0.2f, 0.8f, P.Get(Anim.Runtime_int(3f) % P.totalColours), PRESENTATION.DEFAULT_TXT_CELL_HEIGHT * 2);
        TXT("Here is some info on the GL drawing tools", 0.2f, 0.75f, P.Get(4));

        TXT("draw primitives!", 0.2f, 0.6f, P.Get(4));

        int   _CELLS_X   = 10;
        int   _CELLS_Y   = 3;
        float _XDIV      = 0.6f / _CELLS_X;
        float _YDIV      = 0.4f / _CELLS_Y;
        float _CELL_SIZE = _XDIV * 0.75f;
        float _CS2       = _CELL_SIZE * 0.5f;

        int _COUNT = 0;

        for (int x = 0; x < _CELLS_X; x++)
        {
            for (int y = 0; y < _CELLS_Y; y++)
            {
                _COUNT++;
                Color _COL = P.Get(_COUNT % P.totalColours);
                GL.PushMatrix();
                //GL_DRAW.TransformMatrix(0.1f + (x * _XDIV), 0.1f + (y * _YDIV), _rotationZ: Anim.PNoise(0.1f, _offsetA: x, _offsetB: y));
                float _CS = Anim.Sin_Time(10f, _CS2, _CELL_SIZE, _COUNT);
                GL_DRAW.Translate(0.1f + (x * _XDIV), 0.1f + (y * _YDIV));

                switch (_COUNT % 6)
                {
                case 0:
                    GL_DRAW.Draw_RECT(0, 0, _CS, _CS, _COL);
                    break;

                case 1:
                    GL_DRAW.Draw_RECT_FILL(0, 0, _CS, _CS, _COL);
                    break;

                case 2:
                    GL_DRAW.Draw_CIRCLE_LINE(3, 0, 0, _CS, _COL);
                    break;

                case 3:
                    GL_DRAW.Draw_CIRCLE_FILL(3, 0, 0, _CS, _COL);
                    break;

                case 4:
                    GL_DRAW.Draw_CIRCLE_LINE(20, 0, 0, _CS, _COL);
                    break;

                case 5:
                    GL_DRAW.Draw_CIRCLE_FILL(20, 0, 0, _CS, _COL);
                    break;
                }
                GL.PopMatrix();
            }
        }
    }
Exemple #2
0
 public static void Draw_BAR_PARTITIONS_Y(float _x, float _y, float _w, float _h, Partitions _partitions)
 {
     for (int i = 0; i < _partitions.count; i++)
     {
         Partition _P = _partitions.Get(i);
         GL_DRAW.Draw_RECT(_x, _y + (_h * _P.start), _w, _h * _partitions.Get_Share(i), _P.colour);
     }
 }
Exemple #3
0
    void WallCell(float _x, float _y, float _w, float _h, Color _col, int _sprawlIndex, float _animOffset, float _tickerOffset)
    {
        bool  _TICKER = Anim.Runtime_int(5f, _tickerOffset) % 2 == 0;
        float _TOP    = _y + _h;
        float _lw     = _w * 0.5f;

        GL_DRAW.Draw_RECT(_x - (_w * 0.1f), _y + (_h * 0.1f), _lw, _h, COL.Set_alphaStrength(_col, 0.2f));
        GL_DRAW.Draw_RECT(_x - (_w * 0.05f), _y + (_h * 0.05f), _lw, _h, COL.Set_alphaStrength(_col, 0.2f));
        GL_DRAW.Draw_RECT_FILL(_x, _y, _lw, _h, COL.Set_alphaStrength(_col, 0.2f));
        GL_DRAW.Draw_RECT_FILL(_x, _TOP, _lw, _h * -0.1f, COL.Set_alphaStrength(_col, _TICKER ? 0.05f : 0.3f));
        HUD.Draw_LABEL_BOX("a" + _sprawlIndex, _x + (_lw * 0.1f), _y + (_h * 0.1f), _lw * 0.6f, _h * 0.6f, 0.01f, 0.1f, 0.5f, _col, P.Get(0));
        GL_MATRIX_ANIMS.Draw(GL_MATRIX_ANIMS.NAME_INC_3X3, Anim.Runtime_int(3f, _animOffset + Anim.Sin_Time(1.1f, 0f, 3f)), _x + _lw, _y + (_h * 0.75f), _h * 0.25f, _col);
        sprawls[_sprawlIndex].Draw(_x + _lw, _y + (_h * 0.75f), _lw * 0.25f, _h * -0.75f, COL.Set_alphaStrength(_col, 0.25f));
    }
Exemple #4
0
    void FloorMarker(float _x, float _y, float _size, float _value, int _dataIndex = 0, float _timeOffset = 0)
    {
        Color _COL        = P.Get(3);
        float _markerSize = _HOOP_SIZE * _size;
        float _valueInv   = 1f - _value;
        float _SIZE2      = _size * 0.5f;
        float _Y_OFFSET   = Mathf.Lerp(0.01f * _size, 0.4f * _size, _value);

        // floor hoop
        DrawHoop(_x, _y, _size, 0.05f + (_valueInv * 0.2f), _angleOffset: 0);
        DrawHoop(_x, _y, _SIZE2, 0.075f + (_valueInv * 0.05f), _angleOffset: 0);

        for (int i = 0; i < 3; i++)
        {
            float _ANGLE_OFF = 0.33f * i;
            DrawHoop(_x, _y, _size * 1.5f, 0.3f, _ANGLE_OFF, _ANGLE_OFF + .1666666f, _angleOffset: Anim.Runtime(-0.1f));
        }

        // raised
        DrawHoop(_x, _y + _Y_OFFSET, _size, 0.3f, _angleOffset: 0);

        for (int i = 0; i < 4; i++)
        {
            float _ANGLE_OFF = 0.25f * i;
            DrawHoop(_x, _y + _Y_OFFSET, _size * 0.75f, 0.3f, _ANGLE_OFF, _ANGLE_OFF + .125f, _angleOffset: Anim.Runtime(0.25f, _timeOffset * 0.2f));
        }

        HUD.Draw_LABEL_LINE_X("pt :: " + _dataIndex, _x, _y, _size * 2f, _size * 0.1f, P.Get(3, 0f), _COL, _COL);

        float _statPad  = _size * 0.2f;
        float _statPad2 = _statPad * 2;
        float _stat_W   = _size * 2;
        float _stat_H   = _size * 4;
        float _stat_X   = _size + _statPad;
        float _stat_Y   = -_stat_H - (_statPad * 2);

        GL.PushMatrix();
        GL_DRAW.TransformMatrix(_x, _y);
        GL_DRAW.Draw_RECT(_stat_X, _stat_Y, _stat_W, _stat_H, _COL);
        float[] _values = VALUES.RandomValues_NOISE_TIME(5, _offsetA: _timeOffset, _offsetB: _timeOffset * 1.4f);
        sprawls[_dataIndex].Draw(_stat_X + _statPad, _stat_Y + (_stat_H * 0.75f), _stat_W - _statPad2, _stat_H * 0.2f, _COL);
        HUD.Draw_HISTOGRAM_BAR_X(_stat_X + _statPad, _stat_Y + _statPad, _stat_W - _statPad2, _stat_H * 0.5f, _COL, _COL, 0.75f, false, _values);
        HUD.Draw_HISTOGRAM_BAR_X(_stat_X + _statPad, _stat_Y - (_statPad - (_stat_H * 0.75f)), _stat_W - _statPad2, _stat_H * -0.2f, P.Get(3, 0), P.Get(2), 0.75f, false, _values);
        GL.PopMatrix();
    }