public void SetScreen(Screen screen) { if (m_process != null) { m_process.SetScreen(screen); } }
public Screen() { LSystem.AUTO_REPAINT = true; Screen.StaticCurrentSceen = this; this.runnables = new List<Runnable>(1); this.handler = LSystem.screenProcess; this.width = LSystem.screenRect.width; this.height = LSystem.screenRect.height; this.halfWidth = width / 2; this.halfHeight = height / 2; this.fristOrder = DRAW_USER_PAINT(); this.secondOrder = DRAW_SPRITE_PAINT(); this.lastOrder = DRAW_DESKTOP_PAINT(); this.fristPaintFlag = true; this.secondPaintFlag = true; this.lastPaintFlag = true; }
public virtual void AddScreen(Screen screen) { if (handler != null) { handler.AddScreen(screen); } }
public Replace_Thread(Screen s) { this.screen = s; }
public virtual void ReplaceScreen(Screen screen, MoveMethod m) { if (screen != null && screen != this) { screen.SetOnLoadState(false); SetLock(true); screen.SetLock(true); this.replaceMethod = m; this.replaceDstScreen = screen; screen.SetRepaintMode(SCREEN_CANVAS_REPAINT); switch (m) { case MoveMethod.FROM_LEFT: dstPos.SetLocation(-GetWidth(), 0); isScreenFrom = true; break; case MoveMethod.FROM_RIGHT: dstPos.SetLocation(GetWidth(), 0); isScreenFrom = true; break; case MoveMethod.FROM_UP: dstPos.SetLocation(0, -GetHeight()); isScreenFrom = true; break; case MoveMethod.FROM_DOWN: dstPos.SetLocation(0, GetHeight()); isScreenFrom = true; break; case MoveMethod.FROM_UPPER_LEFT: dstPos.SetLocation(-GetWidth(), -GetHeight()); isScreenFrom = true; break; case MoveMethod.FROM_UPPER_RIGHT: dstPos.SetLocation(GetWidth(), -GetHeight()); isScreenFrom = true; break; case MoveMethod.FROM_LOWER_LEFT: dstPos.SetLocation(-GetWidth(), GetHeight()); isScreenFrom = true; break; case MoveMethod.FROM_LOWER_RIGHT: dstPos.SetLocation(GetWidth(), GetHeight()); isScreenFrom = true; break; default: dstPos.SetLocation(0, 0); isScreenFrom = false; break; } Replace_Thread loading = new Replace_Thread(screen); CallEvent(loading); replaceLoading = true; } }
public PaintOrder(byte t, Screen s) { this.type = t; this.screen = s; }
public virtual void SetScreen(Screen screen) { if (handler != null) { this.handler.SetScreen(screen); } }
private void SetScreen(Screen @screen, bool @put) { lock (this) { if (screen == null) { this.isInstance = false; throw new RuntimeException( "Cannot create a [Screen] instance !"); } InitDestory(); if (!LSystem.isLogo) { if (currentControl != null) { SetTransition(screen.OnTransition()); } else { LTransition transition = screen.OnTransition(); if (transition == null) { switch (MathUtils.Random(0, 3)) { case 0: transition = LTransition.NewFadeIn(); break; case 1: transition = LTransition.NewArc(); break; case 2: transition = LTransition .NewSplitRandom(LColor.black); break; case 3: transition = LTransition .NewCrossRandom(LColor.black); break; } } SetTransition(transition); } } screen.SetOnLoadState(false); if (currentControl == null) { currentControl = screen; } else { lock (currentControl) { currentControl.Destroy(); currentControl = screen; } } this.isInstance = true; if (screen is EmulatorListener) { SetEmulatorListener((EmulatorListener)screen); } else { SetEmulatorListener(null); } StartTransition(); screen.OnCreate(LSystem.screenRect.width, LSystem.screenRect.height); if (!running || GLEx.Device == null || loading_Control != null) { screen.SetClose(false); screen.OnLoad(); screen.SetOnLoadState(true); screen.OnLoaded(); EndTransition(); } else { Thread load = null; try { load = new _LoadingScreen(this, screen); load.Start(); } catch (System.Exception ex) { throw new RuntimeException(currentControl.GetName() + " onLoad:" + ex.Message); } finally { load = null; } } if (screen != null) { if (screen is LFlickerListener) { if (currentInput != null) { currentInput.Flicker = (LFlickerListener)screen; } } } if (put) { screens.AddLast(screen); } loading_Control = null; Thread.Yield(); } }
public void AddScreen(Screen screen) { if (screen == null) { throw new RuntimeException("Cannot create a [IScreen] instance !"); } screens.AddLast(screen); }
public void SetCurrentScreen(Screen screen) { if (screen != null) { this.isInstance = false; if (currentControl != null) { currentControl.Destroy(); } this.currentControl = screen; currentControl.SetLock(false); currentControl.SetLocation(0, 0); currentControl.SetClose(false); currentControl.SetOnLoadState(true); if (screen.GetBackground() != null) { currentControl.SetRepaintMode(Screen.SCREEN_BITMAP_REPAINT); } this.isInstance = true; if (screen is EmulatorListener) { SetEmulatorListener((EmulatorListener)screen); } else { SetEmulatorListener(null); } screens.AddLast(screen); } }
public void SetScreen(Screen screen) { if (GLEx.Device == null) { loading_Control = screen; loading_complete = true; } else { SetScreen(screen, true); } }
public void OnDestroy() { EndTransition(); if (GLEx.Self != null) { GLEx.Self.Dispose(); } scene = null; screens.Clear(); if (isInstance) { isInstance = false; loads.Clear(); unloads.Clear(); drawings.Clear(); if (currentControl != null) { currentControl.Destroy(); currentControl = null; } LSystem.isLogo = false; LTextures.DisposeAll(); XNACircle.Free(); InitDestory(); } }
public _LoadingScreen(LProcess p, Screen s) { this.process = p; this.screen = s; }
private void SetScreen(Screen screen, bool put) { if (currentControl != null && currentControl.IsOnLoadComplete()) { return; } lock (this) { if (screen == null) { this.isInstance = false; throw new RuntimeException( "Cannot create a [Screen] instance !"); } GLLoader.Destory(); if (!LSystem.isLogo) { if (currentControl != null) { SetTransition(screen.OnTransition()); } else { LTransition transition = screen.OnTransition(); if (transition == null) { switch (MathUtils.Random(0, 3)) { case 0: transition = LTransition.NewFadeIn(); break; case 1: transition = LTransition.NewArc(); break; case 2: transition = LTransition .NewSplitRandom(LColor.black); break; case 3: transition = LTransition .NewCrossRandom(LColor.black); break; } } SetTransition(transition); } } screen.SetOnLoadState(false); if (currentControl == null) { currentControl = screen; } else { lock (currentControl) { currentControl.Destroy(); currentControl = screen; } } this.isInstance = true; if (screen is EmulatorListener) { SetEmulatorListener((EmulatorListener)screen); } else { SetEmulatorListener(null); } screen.OnCreate(LSystem.screenRect.width, LSystem.screenRect.height); LSystem.CallScreenRunnable(new _LoadingScreen(this, screen)); if (put) { screens.AddLast(screen); } loading_Control = null; } }
public _LoadingScreen(LProcess p, Screen s) : base("ProcessThread") { this.process = p; this.screen = s; }
public Screen() { LSystem.AUTO_REPAINT = true; Screen.StaticCurrentSceen = this; this.log = LogFactory.GetInstance(GetType()); this.runnables = new List<Runnable>(1); this.handler = LSystem.screenProcess; this.width = LSystem.screenRect.width; this.height = LSystem.screenRect.height; this.halfWidth = width / 2; this.halfHeight = height / 2; this.fristOrder = DRAW_USER; this.secondOrder = DRAW_SPRITE; this.lastOrder = DRAW_DESKTOP; this.fristPaintFlag = true; this.secondPaintFlag = true; this.lastPaintFlag = true; this.SetFPS(GetMaxFPS()); }