Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/DTXManiaプロジェクト/コード/ステージ/05.選曲/CActSelect曲リスト.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 529 by kairera0467, Sun Feb 21 13:37:00 2016 UTC revision 530 by kairera0467, Sun Feb 21 14:22:07 2016 UTC
# Line 1315  namespace DTXMania Line 1315  namespace DTXMania
1315                  }                  }
1316                  #endregion                  #endregion
1317                  #region[ タイトル・アーティスト名 ]                  #region[ タイトル・アーティスト名 ]
1318                    //曲名テクスチャ 生成
1319                  if( File.Exists( this.stバー情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "TitleTexture.png" ) && this.tx選択されている曲の曲名 == null )                  if( File.Exists( this.stバー情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "TitleTexture.png" ) && this.tx選択されている曲の曲名 == null )
1320                  {                  {
1321                      this.tx選択されている曲の曲名 = this.tカスタム曲名の生成( n選択曲のパネル番号 );                      this.tx選択されている曲の曲名 = this.tカスタム曲名の生成( n選択曲のパネル番号 );
# Line 1324  namespace DTXMania Line 1325  namespace DTXMania
1325                      if( this.stバー情報[ n選択曲のパネル番号 ].strタイトル文字列 != "" && this.stバー情報[ n選択曲のパネル番号 ].strタイトル文字列 != null && this.tx選択されている曲の曲名 == null )                      if( this.stバー情報[ n選択曲のパネル番号 ].strタイトル文字列 != "" && this.stバー情報[ n選択曲のパネル番号 ].strタイトル文字列 != null && this.tx選択されている曲の曲名 == null )
1326                          this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.stバー情報[ n選択曲のパネル番号 ].strタイトル文字列 );                          this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.stバー情報[ n選択曲のパネル番号 ].strタイトル文字列 );
1327                  }                  }
1328                  if( File.Exists( this.stバー情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "ArtistTexture.png" ) && this.tx選択されている曲のアーティスト名 == null )                  //曲名テクスチャ 描画
1329                            if( this.tx選択されている曲の曲名 != null )
1330                                        this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );
1331    
1332                    //アーティスト名テクスチャ 生成と描画
1333    
1334                    if( File.Exists( this.stバー情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "ArtistTexture.png" ) )
1335                  {                  {
1336                        if( this.tx選択されている曲のアーティスト名 == null )
1337                      this.tx選択されている曲のアーティスト名 = this.tカスタムアーティスト名テクスチャの生成( n選択曲のパネル番号 );                      this.tx選択されている曲のアーティスト名 = this.tカスタムアーティスト名テクスチャの生成( n選択曲のパネル番号 );
1338                      if (this.tx選択されている曲のアーティスト名 != null)  
1339                          this.tx選択されている曲のアーティスト名.t2D描画(CDTXMania.app.Device, 552, 470);                      if( this.tx選択されている曲のアーティスト名 != null )
1340                            this.tx選択されている曲のアーティスト名.t2D描画( CDTXMania.app.Device, 552, 470 );
1341                  }                  }
1342                  else                  else if( !File.Exists( this.stバー情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "ArtistTexture.png" ) )
1343                  {                  {
1344                      if( this.stバー情報[ n選択曲のパネル番号 ].strアーティスト名 != "" && this.stバー情報[ n選択曲のパネル番号 ].strアーティスト名 != null && this.tx選択されている曲のアーティスト名 == null )                      if( this.stバー情報[ n選択曲のパネル番号 ].strアーティスト名 != "" && this.stバー情報[ n選択曲のパネル番号 ].strアーティスト名 != null && this.tx選択されている曲のアーティスト名 == null )
1345                          this.tx選択されている曲のアーティスト名 = this.t指定された文字テクスチャを生成する( this.stバー情報[ n選択曲のパネル番号 ].strアーティスト名 );                          this.tx選択されている曲のアーティスト名 = this.t指定された文字テクスチャを生成する( this.stバー情報[ n選択曲のパネル番号 ].strアーティスト名 );
                 }  
1346    
1347                          if( this.tx選択されている曲の曲名 != null )                      if( this.tx選択されている曲のアーティスト名 != null )
1348                                      this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );                      {
1349                  if( this.tx選択されている曲のアーティスト名 != null )                          int nアーティスト名X座標 = 782 - this.tx選択されている曲のアーティスト名.szテクスチャサイズ.Width;
1350                      this.tx選択されている曲のアーティスト名.t2D描画( CDTXMania.app.Device, 770 - this.stバー情報[ n選択曲のパネル番号 ].nアーティスト名テクスチャの長さdot, 470 );                          this.tx選択されている曲のアーティスト名.t2D描画( CDTXMania.app.Device, nアーティスト名X座標, 470 );
1351                        }
1352                    }
1353                  #endregion                  #endregion
1354                                  //-----------------                                  //-----------------
1355                                  #endregion                                  #endregion
# Line 1463  namespace DTXMania Line 1473  namespace DTXMania
1473                  }                  }
1474                  #endregion                  #endregion
1475                  #region[ タイトル・アーティスト名 ]                  #region[ タイトル・アーティスト名 ]
1476                    //曲名テクスチャ 生成
1477                  if( File.Exists( this.stバー情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "TitleTexture.png" ) && this.tx選択されている曲の曲名 == null )                  if( File.Exists( this.stバー情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "TitleTexture.png" ) && this.tx選択されている曲の曲名 == null )
1478                  {                  {
1479                      this.tx選択されている曲の曲名 = this.tカスタム曲名の生成( n選択曲のパネル番号 );                      this.tx選択されている曲の曲名 = this.tカスタム曲名の生成( n選択曲のパネル番号 );
# Line 1472  namespace DTXMania Line 1483  namespace DTXMania
1483                      if( this.stバー情報[ n選択曲のパネル番号 ].strタイトル文字列 != "" && this.stバー情報[ n選択曲のパネル番号 ].strタイトル文字列 != null && this.tx選択されている曲の曲名 == null )                      if( this.stバー情報[ n選択曲のパネル番号 ].strタイトル文字列 != "" && this.stバー情報[ n選択曲のパネル番号 ].strタイトル文字列 != null && this.tx選択されている曲の曲名 == null )
1484                          this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.stバー情報[ n選択曲のパネル番号 ].strタイトル文字列 );                          this.tx選択されている曲の曲名 = this.t指定された文字テクスチャを生成する( this.stバー情報[ n選択曲のパネル番号 ].strタイトル文字列 );
1485                  }                  }
1486                  if( File.Exists( this.stバー情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "ArtistTexture.png" ) && this.tx選択されている曲のアーティスト名 == null )                  //曲名テクスチャ 描画
1487                            if( this.tx選択されている曲の曲名 != null )
1488                                        this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );
1489    
1490                    //アーティスト名テクスチャ 生成と描画
1491    
1492                    if( File.Exists( this.stバー情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "ArtistTexture.png" ) )
1493                  {                  {
1494                        if( this.tx選択されている曲のアーティスト名 == null )
1495                      this.tx選択されている曲のアーティスト名 = this.tカスタムアーティスト名テクスチャの生成( n選択曲のパネル番号 );                      this.tx選択されている曲のアーティスト名 = this.tカスタムアーティスト名テクスチャの生成( n選択曲のパネル番号 );
1496                      if (this.tx選択されている曲のアーティスト名 != null)  
1497                          this.tx選択されている曲のアーティスト名.t2D描画(CDTXMania.app.Device, 552, 470);                      if( this.tx選択されている曲のアーティスト名 != null )
1498                            this.tx選択されている曲のアーティスト名.t2D描画( CDTXMania.app.Device, 552, 470 );
1499                  }                  }
1500                  else                  else if( !File.Exists( this.stバー情報[ n選択曲のパネル番号 ].strDTXフォルダのパス + "ArtistTexture.png" ) )
1501                  {                  {
1502                      if( this.stバー情報[ n選択曲のパネル番号 ].strアーティスト名 != "" && this.stバー情報[ n選択曲のパネル番号 ].strアーティスト名 != null && this.tx選択されている曲のアーティスト名 == null )                      if( this.stバー情報[ n選択曲のパネル番号 ].strアーティスト名 != "" && this.stバー情報[ n選択曲のパネル番号 ].strアーティスト名 != null && this.tx選択されている曲のアーティスト名 == null )
1503                          this.tx選択されている曲のアーティスト名 = this.t指定された文字テクスチャを生成する( this.stバー情報[ n選択曲のパネル番号 ].strアーティスト名 );                          this.tx選択されている曲のアーティスト名 = this.t指定された文字テクスチャを生成する( this.stバー情報[ n選択曲のパネル番号 ].strアーティスト名 );
                 }  
1504    
1505                          if( this.tx選択されている曲の曲名 != null )                      if( this.tx選択されている曲のアーティスト名 != null )
1506                                      this.tx選択されている曲の曲名.t2D描画( CDTXMania.app.Device, 552, 210 );                      {
1507                  if( this.tx選択されている曲のアーティスト名 != null )                          int nアーティスト名X座標 = 782 - this.tx選択されている曲のアーティスト名.szテクスチャサイズ.Width;
1508                      this.tx選択されている曲のアーティスト名.t2D描画( CDTXMania.app.Device, 770 - this.stバー情報[ n選択曲のパネル番号 ].nアーティスト名テクスチャの長さdot, 470 );                          this.tx選択されている曲のアーティスト名.t2D描画( CDTXMania.app.Device, nアーティスト名X座標, 470 );
1509                        }
1510                    }
1511                  #endregion                  #endregion
   
1512                  //-----------------                  //-----------------
1513                                  #endregion                                  #endregion
1514    
# Line 1940  namespace DTXMania Line 1959  namespace DTXMania
1959              //現在は機能しない(面倒なので実装してない)が、そのうち使用する予定。              //現在は機能しない(面倒なので実装してない)が、そのうち使用する予定。
1960              //PrivateFontの試験運転も兼ねて。              //PrivateFontの試験運転も兼ねて。
1961              //CPrivateFastFont              //CPrivateFastFont
1962              prvFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 28, FontStyle.Regular );              prvFont = new CPrivateFastFont( new FontFamily( CDTXMania.ConfigIni.str選曲リストフォント ), 14, FontStyle.Regular );
1963              Bitmap bmp;              Bitmap bmp;
1964                            
1965              bmp = prvFont.DrawPrivateFont( str文字, Color.Black, Color.Transparent );              bmp = prvFont.DrawPrivateFont( str文字, Color.Black, Color.Transparent );
1966    
             SizeF sz曲名;  
   
             #region [ 曲名表示に必要となるサイズを取得する。]  
             //-----------------  
             using( var bmpDummy = new Bitmap(1, 1) )  
             {  
                 var g = Graphics.FromImage( bmpDummy );  
                 g.PageUnit = GraphicsUnit.Pixel;  
                 sz曲名 = g.MeasureString( str文字, this.ft曲リスト用フォント);  
                 g.Dispose();  
                 //this.stバー情報[ nバー番号 ].nタイトル名テクスチャの長さdot = (int)g.MeasureString(str文字, this.ft曲リスト用フォント).Width;  
             }  
             //-----------------  
             #endregion  
             int n最大幅px = 200;  
             int height = 25;  
             int width = (int)((sz曲名.Width + 2) * 0.5f);  
             if (width > (CDTXMania.app.Device.Capabilities.MaxTextureWidth / 2))  
                 width = CDTXMania.app.Device.Capabilities.MaxTextureWidth / 2;  // 右端断ち切れ仕方ないよね  
   
             float f拡大率X = (width <= n最大幅px) ? 0.5f : (((float)n最大幅px / (float)width) * 0.5f); // 長い文字列は横方向に圧縮。  
   
1967              CTexture tx文字テクスチャ = CDTXMania.tテクスチャの生成( bmp, false );              CTexture tx文字テクスチャ = CDTXMania.tテクスチャの生成( bmp, false );
1968    
1969              if( tx文字テクスチャ != null )              if( tx文字テクスチャ != null )
1970                  tx文字テクスチャ.vc拡大縮小倍率 = new Vector3( f拡大率X, 0.5f, 1f );                  tx文字テクスチャ.vc拡大縮小倍率 = new Vector3( 0.75f, 1f, 1f );
1971    
1972                int n最大幅 = 290;
1973                if( tx文字テクスチャ.szテクスチャサイズ.Width > n最大幅 )
1974                {
1975                    tx文字テクスチャ.vc拡大縮小倍率 = new Vector3( ( n最大幅 / ( tx文字テクスチャ.szテクスチャサイズ.Width / 0.75f ) ), 1f, 1f );
1976                }
1977    
             //prvFont.Dispose();  
1978              bmp.Dispose();              bmp.Dispose();
1979    
1980              return tx文字テクスチャ;              return tx文字テクスチャ;

Legend:
Removed from v.529  
changed lines
  Added in v.530

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26