private static void P2_SetScreenSize(int w, int h) { LiteStatusDlg.StartDisplay("ゲーム画面の位置とサイズを調整しています..."); foreach (DDSubScreen subScreen in DDSubScreenUtils.SubScreens) { subScreen.WasLoaded = subScreen.IsLoaded(); } bool mdm = DDUtils.GetMouseDispMode(); //DDDerivationUtils.UnloadAll(); // moved -> DDPictureUtils.UnloadAll DDPictureUtils.UnloadAll(); DDSubScreenUtils.UnloadAll(); DDFontUtils.UnloadAll(); //DDSoundUtils.UnloadAll(); // 不要 if (DX.SetGraphMode(w, h, 32) != DX.DX_CHANGESCREEN_OK) { throw new DDError(); } DX.SetDrawScreen(DX.DX_SCREEN_BACK); // DDSubScreenUtils.CurrDrawScreenHandle にするべきだが、このフレームだけの問題なので、無難なところで DX_SCREEN_BACK にしておく。 DX.SetDrawMode(DDConsts.DEFAULT_DX_DRAWMODE); DDUtils.SetMouseDispMode(mdm); DDGround.SystemTasks.Delay(1, DDPictureUtils.TouchGlobally); // ウィンドウ位置調整・初回描画を優先するため、遅延する。 //DDPictureUtils.TouchGlobally(); // old //DDTouch.Touch(); // old DDSubScreenUtils.DrawDummyScreenAll(); LiteStatusDlg.EndDisplayDelay(); }
private static void P2_SetScreenSize(int w, int h) { LiteStatusDlg.StartDisplay("ゲーム画面の位置とサイズを調整しています..."); bool mdm = DDUtils.GetMouseDispMode(); //DDDerivationUtils.UnloadAll(); // moved -> DDPictureUtils.UnloadAll DDPictureUtils.UnloadAll(); DDSubScreenUtils.UnloadAll(); DDFontUtils.UnloadAll(); //DDSoundUtils.UnloadAll(); // 不要 if (DX.SetGraphMode(w, h, 32) != DX.DX_CHANGESCREEN_OK) { throw new DDError(); } DX.SetDrawScreen(DX.DX_SCREEN_BACK); // DDSubScreenUtils.CurrDrawScreenHandle にするべきだが、このフレームだけの問題なので、無難なところで DX_SCREEN_BACK にしておく。 DX.SetDrawMode(DDConsts.DEFAULT_DX_DRAWMODE); DDUtils.SetMouseDispMode(mdm); DDTouch.Touch(); DDSubScreenUtils.DrawDummyScreenAll(); LiteStatusDlg.EndDisplayDelay(); }
private int Handle = -1; // -1 == Unloaded /* * fontThick: 0 ~ 9 (デフォルト値:6) * * 値域の根拠 * マニュアル * --https://dxlib.xsrv.jp/function/dxfunc_graph2.html#R17N10 * * デフォルト値の根拠 * マニュアル * --https://dxlib.xsrv.jp/function/dxfunc_graph2.html#R17N8 * * src * C:\wb2\20191209_src\DxLibMake3_20\DxFont.cpp * CreateFontToHandle_Static() * if( Thick < 0 ) Thick = DEFAULT_FONT_THINCK ; * * C:\wb2\20191209_src\DxLibMake3_20\DxLib.h #define DEFAULT_FONT_THINCK (6) */ public DDFont(string fontName, int fontSize, int fontThick = 6, bool antiAliasing = true, int edgeSize = 0, bool italicFlag = false) { if (string.IsNullOrEmpty(fontName)) { throw new DDError(); } if (fontSize < 1 || SCommon.IMAX < fontSize) { throw new DDError(); } if (fontThick < 0 || 9 < fontThick) { throw new DDError(); } // antiAliasing if (edgeSize < 0 || SCommon.IMAX < edgeSize) { throw new DDError(); } // italicFlag this.FontName = fontName; this.FontSize = fontSize; this.FontThick = fontThick; this.AntiAliasing = antiAliasing; this.EdgeSize = edgeSize; this.ItalicFlag = italicFlag; DDFontUtils.Add(this); }
public static void Touch() { UnloadLocally(); DDCCResource.ClearAll(); DDSubScreenUtils.UnloadAll(subScreen => subScreen != DDGround.MainScreen); DDFontUtils.UnloadAll(); TouchGlobally(); }
private static void Print_Main2(string line, int x, int y, I3Color color, double centeringRate) { // centeringRate: // 0.0 == 右寄せ (最初の文字の左側面が x になる) // 0.5 == 中央寄せ // 1.0 == 左寄せ (最後の文字の右側面が x になる) x -= SCommon.ToInt(DDFontUtils.GetDrawStringWidth(line, _font) * centeringRate); DDFontUtils.DrawString(x, y, line, _font, false, color); }
private static void Print_Main2(string line, int x, int y, I3Color color) { if (P_FontSize == -1) { DX.DrawString(x, y, line, DDUtils.GetColor(color)); } else { DDFontUtils.DrawString(x, y, line, Font, false, color); } }