コード例 #1
0
ファイル: Screen.cs プロジェクト: hellogithubtesting/LGame
 public virtual void SetBackground(LTexture background)
 {
     if (background != null)
     {
         SetRepaintMode(SCREEN_BITMAP_REPAINT);
         LTexture screen = null;
         if (background.GetWidth() != GetWidth() || background.GetHeight() != GetHeight())
         {
             screen = background.Scale(GetWidth(), GetHeight());
         }
         else
         {
             screen = background;
         }
         LTexture tmp = currentScreen;
         currentScreen = screen;
         if (tmp != null)
         {
             tmp.Destroy();
             tmp = null;
         }
     }
     else
     {
         SetRepaintMode(SCREEN_CANVAS_REPAINT);
     }
 }