public void DrawBack(CTexture ShowTex, double time, double max, double end, bool IsExit)
        {
            if (ShowTex == null)
            {
                return;
            }
            if (time - max >= end)
            {
                time = end + max;
            }

            var SizeXHarf   = ShowTex.szテクスチャサイズ.Width / 2f;
            var SizeY       = ShowTex.szテクスチャサイズ.Height;
            var StartScaleX = 0.5f;
            var ScaleX      = (float)((IsExit ? 1f - StartScaleX : 0f) - ((time >= max ? (time - max) : 0) * ((1f - StartScaleX) / end))) * (IsExit ? 1f : -1f);
            var Value       = (float)((IsExit ? 1f : 0f) - ((time >= max ? (time - max) : 0) * (1f / end))) * (IsExit ? 1f : -1f);

            ShowTex.vc拡大縮小倍率.X = StartScaleX + ScaleX;
            ShowTex.t2D描画(TJAPlayer3.app.Device, -(SizeXHarf * StartScaleX) + (Value * (SizeXHarf * StartScaleX)), 0, new RectangleF(0, 0, SizeXHarf, SizeY));
            ShowTex.t2D描画(TJAPlayer3.app.Device, (SizeXHarf + (SizeXHarf * StartScaleX)) - (Value * (SizeXHarf * StartScaleX)) + ((1f - ShowTex.vc拡大縮小倍率.X) * SizeXHarf), 0, new RectangleF(SizeXHarf, 0, SizeXHarf, SizeY));
        }
Example #2
0
        private static void NullCheckAndRender(CTexture texture)
        {
            if (texture == null)
            {
                return;
            }

            var originalOpacity = texture.Opacity;

            texture.Opacity = 0;
            texture.t2D描画(TJAPlayer3.app.Device, 0, 0);
            texture.Opacity = originalOpacity;
        }
Example #3
0
 public void t文字列描画(int x, int y, string str, bool b強調, float fScale)
 {
     if (!base.b活性化してない && !string.IsNullOrEmpty(str))
     {
         CTexture texture = b強調 ? this.tx強調文字 : this.tx通常文字;
         if (texture != null)
         {
             texture.vc拡大縮小倍率 = new Vector3(fScale, fScale, 1f);
             foreach (char ch in str)
             {
                 foreach (ST文字領域 st文字領域 in this.st文字領域)
                 {
                     if (st文字領域.ch == ch)
                     {
                         texture.t2D描画(CDTXMania.app.Device, x, y, st文字領域.rc);
                         x += (int)((st文字領域.rc.Width - 5) * fScale);
                         break;
                     }
                 }
             }
         }
     }
 }
        /// <param name="x">下中央基準のX</param>
        /// <param name="y">下中央基準のY</param>
        private void tDrawBox(float x, float y, int nPlayer)
        {
            if (TJAPlayer3.Tx.PlayOption_List != null && TJAPlayer3.Tx.PlayOption_Active != null)
            {
                TJAPlayer3.Tx.PlayOption_List.t2D拡大率考慮下中心基準描画(TJAPlayer3.app.Device, x, y, new Rectangle(0, TJAPlayer3.Skin.PlayOption_Box_Section_Y[2], TJAPlayer3.Tx.PlayOption_List.szテクスチャサイズ.Width, TJAPlayer3.Tx.PlayOption_List.szテクスチャサイズ.Height - TJAPlayer3.Skin.PlayOption_Box_Section_Y[2]));                //下部
                y -= TJAPlayer3.Tx.PlayOption_List.szテクスチャサイズ.Height - TJAPlayer3.Skin.PlayOption_Box_Section_Y[2];

                for (int i = 0; i < lci[nPlayer].Count; i++)
                {
                    TJAPlayer3.Tx.PlayOption_List.t2D拡大率考慮下中心基準描画(TJAPlayer3.app.Device, x, y, new Rectangle(0, TJAPlayer3.Skin.PlayOption_Box_Section_Y[1], TJAPlayer3.Tx.PlayOption_List.szテクスチャサイズ.Width, TJAPlayer3.Skin.PlayOption_Box_Section_Y[2] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[1]));                    //リスト本体
                    if (lci[nPlayer].Count - i == NowRow[nPlayer] + 1)
                    {
                        TJAPlayer3.Tx.PlayOption_Active.t2D拡大率考慮下中心基準描画(TJAPlayer3.app.Device, x, y);
                    }

                    this.NameTexture[nPlayer][lci[nPlayer].Count - i - 1].ItemNameTexture.t2D描画(TJAPlayer3.app.Device, x + TJAPlayer3.Skin.PlayOption_Name_XY_Diff[0], y - (TJAPlayer3.Skin.PlayOption_Box_Section_Y[2] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[1]) + TJAPlayer3.Skin.PlayOption_Name_XY_Diff[1]);

                    if (lci[nPlayer][lci[nPlayer].Count - i - 1].str項目名.Equals("ばいそく"))
                    {
                        using (CTexture texture = TJAPlayer3.tテクスチャの生成(this.Font.DrawPrivateFont(((lci[nPlayer][lci[nPlayer].Count - i - 1].GetIndex() + 1) * 0.1).ToString("0.0"), Color.White, Color.Black)))
                        {
                            texture.t2D描画(TJAPlayer3.app.Device, x + TJAPlayer3.Skin.PlayOption_List_XY_Diff[0] - texture.szテクスチャサイズ.Width / 2, y - (TJAPlayer3.Skin.PlayOption_Box_Section_Y[2] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[1]) + TJAPlayer3.Skin.PlayOption_List_XY_Diff[1]);
                        }
                    }
                    else if (lci[nPlayer][lci[nPlayer].Count - i - 1].str項目名.Equals("演奏速度"))
                    {
                        using (CTexture texture = TJAPlayer3.tテクスチャの生成(this.Font.DrawPrivateFont((lci[nPlayer][lci[nPlayer].Count - i - 1].GetIndex() * 0.05).ToString("0.00"), Color.White, Color.Black)))
                        {
                            texture.t2D描画(TJAPlayer3.app.Device, x + TJAPlayer3.Skin.PlayOption_List_XY_Diff[0] - texture.szテクスチャサイズ.Width / 2, y - (TJAPlayer3.Skin.PlayOption_Box_Section_Y[2] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[1]) + TJAPlayer3.Skin.PlayOption_List_XY_Diff[1]);
                        }
                    }
                    else if (lci[nPlayer][lci[nPlayer].Count - i - 1].e種別 == CItemBase.E種別.整数)
                    {
                        using (CTexture texture = TJAPlayer3.tテクスチャの生成(this.Font.DrawPrivateFont((lci[nPlayer][lci[nPlayer].Count - i - 1].GetIndex()).ToString(), Color.White, Color.Black)))
                        {
                            texture.t2D描画(TJAPlayer3.app.Device, x + TJAPlayer3.Skin.PlayOption_List_XY_Diff[0] - texture.szテクスチャサイズ.Width / 2, y - (TJAPlayer3.Skin.PlayOption_Box_Section_Y[2] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[1]) + TJAPlayer3.Skin.PlayOption_List_XY_Diff[1]);
                        }
                    }
                    else if (lci[nPlayer][lci[nPlayer].Count - i - 1].e種別 == CItemBase.E種別.リスト)
                    {
                        this.NameTexture[nPlayer][lci[nPlayer].Count - i - 1].ItemListTexture[lci[nPlayer][lci[nPlayer].Count - i - 1].GetIndex()].t2D描画(TJAPlayer3.app.Device, x + 90 - this.NameTexture[nPlayer][lci[nPlayer].Count - i - 1].ItemListTexture[lci[nPlayer][lci[nPlayer].Count - i - 1].GetIndex()].szテクスチャサイズ.Width / 2, y - (TJAPlayer3.Skin.PlayOption_Box_Section_Y[2] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[1]) + TJAPlayer3.Skin.PlayOption_List_XY_Diff[1]);
                    }

                    y -= TJAPlayer3.Skin.PlayOption_Box_Section_Y[2] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[1];
                }

                TJAPlayer3.Tx.PlayOption_List.t2D拡大率考慮下中心基準描画(TJAPlayer3.app.Device, x, y, new Rectangle(0, TJAPlayer3.Skin.PlayOption_Box_Section_Y[0], TJAPlayer3.Tx.PlayOption_List.szテクスチャサイズ.Width, TJAPlayer3.Skin.PlayOption_Box_Section_Y[1] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[0])); //上部
            }
            else                                                                                                                                                                                                                                                                                      //項目名だけは表示
            {
                y -= 100;
                for (int i = 0; i < lci[nPlayer].Count; i++)
                {
                    this.NameTexture[nPlayer][lci[nPlayer].Count - i - 1].ItemNameTexture.t2D描画(TJAPlayer3.app.Device, x + TJAPlayer3.Skin.PlayOption_Name_XY_Diff[0], y - (TJAPlayer3.Skin.PlayOption_Box_Section_Y[2] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[1]) + TJAPlayer3.Skin.PlayOption_Name_XY_Diff[1]);

                    if (lci[nPlayer][lci[nPlayer].Count - i - 1].str項目名.Equals("ばいそく"))
                    {
                        using (CTexture texture = TJAPlayer3.tテクスチャの生成(this.Font.DrawPrivateFont(((lci[nPlayer][lci[nPlayer].Count - i - 1].GetIndex() + 1) * 0.1).ToString("0.0"), Color.White, Color.Black)))
                        {
                            texture.t2D描画(TJAPlayer3.app.Device, x + TJAPlayer3.Skin.PlayOption_List_XY_Diff[0] - texture.szテクスチャサイズ.Width / 2, y - (TJAPlayer3.Skin.PlayOption_Box_Section_Y[2] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[1]) + TJAPlayer3.Skin.PlayOption_List_XY_Diff[1]);
                        }
                    }
                    else if (lci[nPlayer][lci[nPlayer].Count - i - 1].str項目名.Equals("演奏速度"))
                    {
                        using (CTexture texture = TJAPlayer3.tテクスチャの生成(this.Font.DrawPrivateFont((lci[nPlayer][lci[nPlayer].Count - i - 1].GetIndex() * 0.05).ToString("0.00"), Color.White, Color.Black)))
                        {
                            texture.t2D描画(TJAPlayer3.app.Device, x + TJAPlayer3.Skin.PlayOption_List_XY_Diff[0] - texture.szテクスチャサイズ.Width / 2, y - (TJAPlayer3.Skin.PlayOption_Box_Section_Y[2] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[1]) + TJAPlayer3.Skin.PlayOption_List_XY_Diff[1]);
                        }
                    }
                    else if (lci[nPlayer][lci[nPlayer].Count - i - 1].e種別 == CItemBase.E種別.リスト)
                    {
                        this.NameTexture[nPlayer][lci[nPlayer].Count - i - 1].ItemListTexture[lci[nPlayer][lci[nPlayer].Count - i - 1].GetIndex()].t2D描画(TJAPlayer3.app.Device, x + 90 - this.NameTexture[nPlayer][lci[nPlayer].Count - i - 1].ItemListTexture[lci[nPlayer][lci[nPlayer].Count - i - 1].GetIndex()].szテクスチャサイズ.Width / 2, y - (TJAPlayer3.Skin.PlayOption_Box_Section_Y[2] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[1]) + TJAPlayer3.Skin.PlayOption_List_XY_Diff[1]);
                    }

                    y -= TJAPlayer3.Skin.PlayOption_Box_Section_Y[2] - TJAPlayer3.Skin.PlayOption_Box_Section_Y[1];
                }
            }
        }