public void CustomScreen_Place(CustomScreen screen, int x, int y, Graphics gfx)
 {
     screen.Place(gfx, new System.Drawing.Point(x, y));
 }
 public void CustomScreen_Remove(CustomScreen screen, Graphics gfx)
 {
     screen.Remove(gfx);
     AnimatedGraphics g = gfx as AnimatedGraphics;
     if (g != null) {
         g.Reset();
     }
 }
 public void CustomScreen_OnKey_Add(CustomScreen screen, ScriptFunction script)
 {
     screen.KeyPressed += (sender, args) => script.Run((int)args.Button);
 }
 public void CustomScreen_Hide(CustomScreen screen)
 {
     screen.Hide();
 }
 public void Fade(SdlDotNet.Graphics.Surface fromImage, CustomScreen screen)
 {
     FadeAnimation anim = new FadeAnimation(game);
     anim.FromImage = fromImage;
     game.PushScreen(screen);
     game.PushScreen(anim);
 }
 public void CustomScreen_Show(CustomScreen screen)
 {
     Fade(game.TakeScreenshot(), screen);
 }
 public void CustomScreen_SetTimer(CustomScreen screen, int ms, ScriptFunction script)
 {
     screen.SetTimer(ms, (sender, args) => script.Run());
 }