Esempio n. 1
0
        public void Show()
        {
            if (isShown)
            {
                return;
            }
            if (pView == null)
            {
                pView = zCView.Create(process, 0, 0, sizeX, sizeY);

                zString texStr  = zString.Create(process, texture);
                zString fontStr = zString.Create(process, "Font_Old_20_White_Hi.tga");
                pView.InsertBack(texStr);
                pView.SetFont(fontStr);

                texStr.Dispose();
                fontStr.Dispose();

                pView.PrintTimedCXY(zString.Create(process, text), -1, zColor.Create(process, 255, 255, 255, 255));
                pView.SetPos(posX, posY);
            }


            zCView.GetStartscreen(process).InsertItem(pView, 0);
            InputHooked.receivers.Add(this);
            isShown = true;
        }
Esempio n. 2
0
        public TextArea(int id, String text, String font, Vec2i position, Vec2i size, Texture parent, ColorRGBA color, int resetKey, int startKey, int sendKey)
            : base(id, position)
        {
            this.parent = parent;
            this.font   = font;
            //Creation:
            Process process = Process.ThisProcess();

            thisView = zCView.Create(Process.ThisProcess(), position.X, position.Y, position.X + size.X, position.Y + size.Y);
            thisView.SetFont(font);

            tA = new textArea(process, thisView, size.Y);
            tA.setText(text);
            tA.resetKey        = resetKey;
            tA.startWritingKey = startKey;
            tA.sendKey         = sendKey;

            tA.SendInput += new EventHandler <EventArgs>(tbSended);


            tA.Inputenabled = false;


            setColor(color);
        }
Esempio n. 3
0
        public void setFont(String font)
        {
            if (font == null)
            {
                return;
            }
            String oldfont = this.font;

            this.font = font;

            if (oldfont.Trim().ToUpper() == font.Trim().ToUpper())
            {
                return;
            }



            Process process = Process.ThisProcess();
            zString str     = zString.Create(process, this.font);

            thisView.SetFont(str);
            str.Dispose();

            if (textView != null)
            {
                textView.Timed = 1;
                textView.Timer = 0;
                createText();
                setColor(this.color);
            }
        }
Esempio n. 4
0
        public void setFont(String font)
        {
            if (font == null)
            {
                return;
            }
            String oldfont = this.font;

            this.font = font;

            if (oldfont.Trim().ToUpper() == font.Trim().ToUpper())
            {
                return;
            }

            Process process = Process.ThisProcess();
            zString str     = zString.Create(process, this.font);

            thisView.SetFont(str);
            str.Dispose();
        }