private void t説明文パネルに現在選択されている項目の説明を描画する()
        {
            try
            {
                var image    = new Bitmap(440, 288);                            // 説明文領域サイズの縦横 2 倍。(描画時に 0.5 倍で表示する___のは中止。処理速度向上のため。)
                var graphics = Graphics.FromImage(image);
                graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;

                CItemBase item = this.actList.ib現在の選択項目;
                if ((item.str説明文 != null) && (item.str説明文.Length > 0))
                {
                    graphics.DrawString(item.str説明文, this.ftフォント, Brushes.White, new RectangleF(8f, 0, 630, 430));
                }
                graphics.Dispose();
                if (this.tx説明文パネル != null)
                {
                    this.tx説明文パネル.Dispose();
                }
                this.tx説明文パネル = new CTexture(CDTXMania.app.Device, image, CDTXMania.TextureFormat);
                image.Dispose();
            }
            catch (CTextureCreateFailedException)
            {
                Trace.TraceError("説明文パネルテクスチャの作成に失敗しました。");
                this.tx説明文パネル = null;
            }
        }
示例#2
0
        private void tDrawSelectedItemDescriptionInDescriptionPanel()
        {
            try
            {
                var image    = new Bitmap(440, 0x100);                          // 説明文領域サイズの縦横 2 倍。(描画時に 0.5 倍で表示する。)
                var graphics = Graphics.FromImage(image);
                graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;

                CItemBase item = this.actList.ibCurrentSelection;
                if ((item.str説明文 != null) && (item.str説明文.Length > 0))
                {
                    int num = 0;
                    foreach (string str in item.str説明文.Split(new char[] { '\n' }))
                    {
                        graphics.DrawString(str, this.ftFont, Brushes.White, new PointF(4f, (float)num));
                        num += 30;
                    }
                }
                graphics.Dispose();
                if (this.txDescriptionPanel != null)
                {
                    this.txDescriptionPanel.Dispose();
                }
                this.txDescriptionPanel = new CTexture(CDTXMania.app.Device, image, CDTXMania.TextureFormat);
                this.txDescriptionPanel.vcScaleRatio.X = 0.8f;
                this.txDescriptionPanel.vcScaleRatio.Y = 0.8f;
                image.Dispose();
            }
            catch (CTextureCreateFailedException)
            {
                Trace.TraceError("説明文パネルテクスチャの作成に失敗しました。");
                this.txDescriptionPanel = null;
            }
        }
示例#3
0
        private void tDrawSelectedItemDescriptionInDescriptionPanel()
        {
            try
            {
                var image    = new Bitmap((int)(400), (int)(192));                              // 説明文領域サイズの縦横 2 倍。(描画時に 0.5 倍で表示する___のは中止。処理速度向上のため。)
                var graphics = Graphics.FromImage(image);
                graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;

                CItemBase item = this.actList.ibCurrentSelection;
                if ((item.str説明文 != null) && (item.str説明文.Length > 0))
                {
                    //int num = 0;
                    //foreach( string str in item.str説明文.Split( new char[] { '\n' } ) )
                    //{
                    //    graphics.DrawString( str, this.ftFont, Brushes.White, new PointF( 4f * Scale.X, (float) num * Scale.Y ) );
                    //    num += 30;
                    //}
                    graphics.DrawString(item.str説明文, this.ftFont, Brushes.Black, new RectangleF(4f, (float)0, 230, 430));
                }
                graphics.Dispose();
                if (this.txDescriptionPanel != null)
                {
                    this.txDescriptionPanel.Dispose();
                }
                this.txDescriptionPanel = new CTexture(CDTXMania.app.Device, image, CDTXMania.TextureFormat, false);
                //this.txDescriptionPanel.vcScaleRatio.X = 0.58f;
                //this.txDescriptionPanel.vcScaleRatio.Y = 0.58f;
                image.Dispose();
            }
            catch (CTextureCreateFailedException)
            {
                Trace.TraceError("説明文パネルテクスチャの作成に失敗しました。");
                this.txDescriptionPanel = null;
            }
        }