private void ConditionallyInitializePrvFont() { if (prvFont == null) { prvFont = new CPrivateFastFont(CSkin.Path(@"Graphics\ipag.ttf"), 18); } }
public override void OnManagedリソースの作成() // OPTIONと画像以外共通 { if (!base.b活性化してない) { //this.tx背景 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_background.jpg" ), false ); //this.tx上部パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_header panel.png" ) ); //this.tx下部パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_footer panel.png" ) ); //this.txMenuカーソル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenConfig menu cursor.png" ) ); string[] strMenuItem = { "System", "Drums", "Exit" }; txMenuItemLeft = new CTexture[strMenuItem.Length, 2]; using (var prvFont = new CPrivateFastFont(CSkin.Path(@"mplus-1p-heavy.ttf"), 20)) { for (int i = 0; i < strMenuItem.Length; i++) { using (var bmpStr = prvFont.DrawPrivateFont(strMenuItem[i], Color.White, Color.Black)) { txMenuItemLeft[i, 0] = TJAPlayer4.tテクスチャの生成(bmpStr, false); } using (var bmpStr = prvFont.DrawPrivateFont(strMenuItem[i], Color.White, Color.Black, Color.Yellow, Color.OrangeRed)) { txMenuItemLeft[i, 1] = TJAPlayer4.tテクスチャの生成(bmpStr, false); } } } if (this.bメニューにフォーカス中) { this.t説明文パネルに現在選択されているメニューの説明を描画する(); } else { this.t説明文パネルに現在選択されている項目の説明を描画する(); } base.OnManagedリソースの作成(); } }