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