Revision | 58cdb99e1d36df4da1b24e6cc68692f4b8202d90 (tree) |
---|---|
Zeit | 2020-01-07 01:29:01 |
Autor | yyagi <yyagi.dtxmania@gmai...> |
Commiter | yyagi |
#39817 Fixed not to crash when entering Sort menu, after showing non-music-select-screen.
@@ -64,15 +64,16 @@ namespace DTXMania | ||
64 | 64 | stqMenuTitle = new stQuickMenuItem(); |
65 | 65 | stqMenuTitle.cItem = new COptionString(title); |
66 | 66 | stqMenuTitle.cItem.label = title; |
67 | - stqMenuTitle.txName = TextureFactory.tテクスチャの生成(prvFont.DrawPrivateFont(title, Color.White, Color.Black), false); | |
68 | - stqMenuTitle.rectName = prvFont.RectStrings; | |
67 | + //stqMenuTitle.txName = TextureFactory.tテクスチャの生成(prvFont.DrawPrivateFont(title, Color.White, Color.Black), false); | |
68 | + //stqMenuTitle.rectName = prvFont.RectStrings; | |
69 | 69 | lciMenuItems = new stQuickMenuItem[menulist.Count]; |
70 | 70 | for (int i = 0; i < menulist.Count; i++) |
71 | 71 | { |
72 | 72 | stQuickMenuItem stqm = new stQuickMenuItem(); |
73 | 73 | stqm.cItem = menulist[i]; |
74 | - stqm.txName = TextureFactory.tテクスチャの生成(prvFont.DrawPrivateFont(menulist[i].label, Color.White, Color.Black), false); | |
75 | - stqm.rectName = prvFont.RectStrings; | |
74 | + stqm.label = menulist[i].label; | |
75 | + //stqm.txName = TextureFactory.tテクスチャの生成(prvFont.DrawPrivateFont(menulist[i].label, Color.White, Color.Black), false); | |
76 | + //stqm.rectName = prvFont.RectStrings; | |
76 | 77 | lciMenuItems[i] = stqm; |
77 | 78 | } |
78 | 79 |
@@ -205,6 +206,18 @@ namespace DTXMania | ||
205 | 206 | { |
206 | 207 | this.txPopupMenuBackground = TextureFactory.tテクスチャの生成(pathPopupMenuBackground, false); |
207 | 208 | } |
209 | + | |
210 | + if (stqMenuTitle.txName == null) | |
211 | + { | |
212 | + stqMenuTitle.txName = TextureFactory.tテクスチャの生成(prvFont.DrawPrivateFont(stqMenuTitle.cItem.label, Color.White, Color.Black), false); | |
213 | + stqMenuTitle.rectName = prvFont.RectStrings; | |
214 | + } | |
215 | + for (int i = 0; i < lciMenuItems.Length; i++) | |
216 | + { | |
217 | + lciMenuItems[i].txName = TextureFactory.tテクスチャの生成(prvFont.DrawPrivateFont(lciMenuItems[i].label, Color.White, Color.Black), false); | |
218 | + lciMenuItems[i].rectName= prvFont.RectStrings; | |
219 | + } | |
220 | + | |
208 | 221 | base.OnManagedリソースの作成(); |
209 | 222 | } |
210 | 223 | } |
@@ -325,7 +338,10 @@ namespace DTXMania | ||
325 | 338 | #endregion |
326 | 339 | #region [ タイトル描画 ] |
327 | 340 | int x = (int)(240 * Scale.X), y = (int)(16 * Scale.Y); |
328 | - stqMenuTitle.txName.t2D描画(CDTXMania.Instance.Device, x, y); | |
341 | + if (stqMenuTitle.txName != null) | |
342 | + { | |
343 | + stqMenuTitle.txName.t2D描画(CDTXMania.Instance.Device, x, y); | |
344 | + } | |
329 | 345 | #endregion |
330 | 346 | #region [ カーソル描画 ] |
331 | 347 | if (this.txCursor != null) |
@@ -393,6 +409,7 @@ namespace DTXMania | ||
393 | 409 | internal COptionBase cItem; |
394 | 410 | internal CTexture txName; |
395 | 411 | internal Rectangle rectName; |
412 | + internal string label; | |
396 | 413 | } |
397 | 414 | private stQuickMenuItem[] lciMenuItems; |
398 | 415 | CPrivateFastFont prvFont; |