コード例 #1
0
        protected override void DoPaintEvent(BaseScreen screen)
        {
            base.DoPaintEvent(screen);

            ExtRect crt = ClientRect;
            ExtRect cr  = new ExtRect();

            cr.Left   = crt.Left + 10;
            cr.Right  = crt.Right - 10;
            cr.Top    = crt.Top + 10;
            cr.Bottom = cr.Top + 36 - 1;
            CtlCommon.DrawCtlBorder(screen, cr);
            crt = ExtRect.Create(cr.Left + 2, cr.Top + 2, cr.Left + 2 + 32 - 1, cr.Top + 2 + 32 - 1);
            screen.FillRect(crt, Colors.White);
            GlobalVars.nwrWin.Resources.DrawImage(screen, cr.Left + 2, cr.Top + 3, fCollocutor.Entry.ImageIndex, 255);
            screen.DrawText(crt.Right + 10, cr.Top + (36 - screen.GetTextHeight("A")) / 2, fCollocutor.Name, 0);
        }
コード例 #2
0
        protected override void DoPaintEvent(BaseScreen screen)
        {
            base.DoPaintEvent(screen);

            screen.SetTextColor(Colors.Gold, true);

            ExtRect crt = ClientRect;
            ExtRect cr  = new ExtRect();

            cr.Left   = crt.Left + 10;
            cr.Right  = crt.Right - 10;
            cr.Top    = crt.Top + 10;
            cr.Bottom = cr.Top + 36 - 1;
            CtlCommon.DrawCtlBorder(screen, cr);

            //int ww = (32 * 3) + (10 * 2);
            //cr.inflate(-2, -2);
            int offset = (cr.Width) / 3; //- ww

            int sy = cr.Top + (cr.Height - screen.GetTextHeight("A")) / 2;

            for (int i = 0; i < 3; i++)
            {
                int     runeId = fRunes[i];
                RuneRec rune   = StaticData.dbRunes[runeId];
                //GlobalVars.nwrWin.Resources.drawImage(screen, cr.Left + offset + (i * (32 + 10)), cr.Top + 3, rune.ImageIndex, 255);
                InfoEntry inf = (InfoEntry)GlobalVars.nwrDB.FindEntryBySign(rune.Sign);

                int sx = cr.Left + (offset * i);
                GlobalVars.nwrWin.Resources.DrawImage(screen, sx, cr.Top + 3, rune.ImageIndex, 255);

                sx = sx + 32 + 3;
                screen.DrawText(sx, sy, inf.Name, 0);
            }

            /*rt = new TRect(cr.Left + 2, cr.Top + 2, cr.Left + 2 + 32 - 1, cr.Top + 2 + 32 - 1);
             * screen.fillRect(rt, Colors.White);
             *
             * screen.drawText(rt.Right + 10, cr.Top + (36 - screen.getTextHeight("A")) / 2, this.fCollocutor.getName(), 0);*/
        }