コード例 #1
0
        /// <summary>
        ///If you simply want one text line, use this. GUCVisualText object will be vis.Texts[0]
        /// </summary>
        public static GUCVisual Create(string text, int x, int y, bool virtuals)
        {
            GUCVisual vis = new GUCVisual();

            vis.CreateText(text, x, y, virtuals);
            return(vis);
        }
コード例 #2
0
 protected GUCVisual(int x, int y, int w, int h, bool virtuals, GUCVisual p)
 {
     parent = p;
     if (virtuals)
     {
         vpos  = new ViewPoint(x, y);
         vsize = new ViewPoint(w, h);
     }
     else
     {
         vpos  = PixelToVirtual(x, y);
         vsize = PixelToVirtual(w, h);
     }
     thisView = zCView.Create(vpos.X, vpos.Y, vpos.X + vsize.X, vpos.Y + vsize.Y);
     shown    = false;
 }
コード例 #3
0
        public GUCVisualText(string text, int x, int y, GUCVisual parent, bool virtuals)
        {
            this.parent = parent;
            if (virtuals)
            {
                vpos = new ViewPoint(x, y);
            }
            else
            {
                vpos = GUCVisual.PixelToVirtual(x, y);
            }
            vpos = new ViewPoint(vpos.X * 0x2000 / parent.VSize.X, vpos.Y * 0x2000 / parent.VSize.Y);
            using (zString z = zString.Create(text))
                zviewText = parent.zView.CreateText(vpos.X, vpos.Y, z);

            shown = true;
        }
コード例 #4
0
        public GUCTextBox(int x, int y, int w, bool fixedBorders)
        {
            pos               = new int[] { x, y };
            width             = w;
            this.fixedBorders = fixedBorders;

            inputVis = new GUCVisual(x, y, w, height);
            inputVis.CreateText("", 0, 0);

            cursorVis = new GUCVisual(x + cursorOffsetX, y + cursorOffsetY, cursorSize, cursorSize);
            cursorVis.SetBackTexture("CURSOR.TGA");

            leftArrow = new GUCVisual(x, y + (height - arrowSize) / 2, arrowSize, arrowSize);
            leftArrow.SetBackTexture("L.TGA");

            rightArrow = new GUCVisual(x + w - arrowSize, y + (height - arrowSize) / 2, arrowSize, arrowSize);
            rightArrow.SetBackTexture("R.TGA");
        }