Example #1
0
        public void Draw(int textureId, int textureId2)
        {
/*			float []textureCoords = !this.check ? null : new float[] {
 *                                      1.0f, 0.0f,
 *                                      0.0f, 0.0f,
 *                                      1.0f, 1.0f,
 *                                      0.0f, 1.0f,
 *                              };*/
            float ox = this.x + this.width - this.height, oy = this.y, ow = this.height, oh = this.height;

//			CLReDraw.Rect(this.x, this.y, this.width-oh, oh, textureId);
//			CLReDraw.Rect(ox, oy, ow, oh, textureId2, textureCoords);
            if (!added)
            {
                CLReDraw.View(this.label, this.x, this.y, this.width, this.height);
                CLReDraw.View(this.yn, this.x, this.y, this.width, this.height);
//				CLReDraw.View(this.yn, ox, oy, ow, oh);
                this.added = true;
            }
        }
Example #2
0
 public void Draw(int textureId, float [] outBounds = null, bool grayscale = false)
 {
     CLReDraw.Rect(this.x, this.y, this.width, this.height, textureId, grayscale);
     if (!this.added)
     {
         if (outBounds != null)
         {
             float x      = outBounds[0],
                   y      = outBounds[3],
                   width  = outBounds[1] - outBounds[0],
                   height = outBounds[3] - outBounds[2];
             CLReDraw.View(this.outTap, x, y, width, height);
         }
         else
         {
             this.outTap = null;
         }
         CLReDraw.View(this.label, this.x, this.y, this.width, this.height);
         this.added = true;
     }
 }
Example #3
0
        public void Draw(int textureId, float[] outBounds)
        {
            if (this.popping)
            {
                this.popping = false;
                this.Pop();
            }
            if (!this.Show)
            {
                return;
            }
            CLReDraw.Rect(this.x, this.y, this.width, this.height, textureId);
            float dheight = this.height * 0.142857f;             // / 7

            if (!this.added)
            {
                if (outBounds != null)
                {
                    float x      = outBounds[0],
                          y      = outBounds[3],
                          width  = outBounds[1] - outBounds[0],
                          height = outBounds[3] - outBounds[2];
                    CLReDraw.View(this.outTap, x, y, width, height);
                }
                else
                {
                    this.outTap = null;
                }
                CLReDraw.View(this.inTap, this.x, this.y, this.width, this.height);
                CLReDraw.View(this.titleLabel, this.x, this.y - dheight * 0.5f, this.width, dheight);
                this.added = true;
            }
            if (!this.navigating)
            {
                this.drawContent?.Invoke(new float[] { this.x, this.y - dheight * 1.5f, this.width, this.height - dheight * 1.5f }, true);
            }
        }