示例#1
0
文件: Desktop.cs 项目: vb0067/LGame
 /// <summary>
 /// 构造一个可用桌面
 /// </summary>
 ///
 /// <param name="input"></param>
 /// <param name="width"></param>
 /// <param name="height"></param>
 public Desktop(LInput input, int width, int height)
 {
     this.clickComponent = new LComponent[1];
     this.contentPane    = new LPanel(0, 0, width, height);
     this.input          = input;
     this.SetDesktop(this.contentPane);
 }
示例#2
0
文件: Desktop.cs 项目: vb0067/LGame
 /// <summary>
 /// 空桌面布局
 /// </summary>
 ///
 private Desktop()
 {
     this.clickComponent = new LComponent[1];
     this.contentPane    = new LPanel(0, 0, 1, 1);
     this.input          = null;
     this.SetDesktop(this.contentPane);
 }
示例#3
0
 public virtual void Dispose()
 {
     this.isClose = true;
     this.desktop.SetComponentStat(this, false);
     if (this.parent != null)
     {
         this.parent.Remove(this);
     }
     this.desktop = Desktop.EMPTY_DESKTOP;
     this.input   = null;
     this.parent  = null;
     if (imageUI != null)
     {
         for (int i = 0; i < imageUI.Length; i++)
         {
             imageUI[i].Destroy();
             imageUI[i] = null;
         }
         this.imageUI = null;
     }
     if (background != null)
     {
         this.background.Destroy();
         this.background = null;
     }
     this.selected = false;
     this.visible  = false;
 }
示例#4
0
 public virtual void SetScreen(SpriteBatchScreen s)
 {
     if (s == _screen)
     {
         return;
     }
     this._screen = s;
     this._input  = s.GetInput();
 }
示例#5
0
        internal void SetDesktop(Desktop desktop_0)
        {
            if (this.desktop == desktop_0)
            {
                return;
            }

            this.desktop = desktop_0;
            this.input   = desktop_0.input;
        }
示例#6
0
		public abstract void HandleInput(LInput input);
示例#7
0
 private Desktop()
 {
     this.contentPane = new LPanel(0, 0, 1, 1);
     this.input       = null;
     this.SetDesktop(this.contentPane);
 }
示例#8
0
 public abstract void HandleInput(LInput input);
示例#9
-1
 public virtual void OnCreate(int width, int height)
 {
     this.mode = SCREEN_CANVAS_REPAINT;
     this.baseInput = this;
     this.width = width;
     this.height = height;
     this.halfWidth = width / 2;
     this.halfHeight = height / 2;
     this.touchX = touchY = lastTouchX = lastTouchY = touchDX = touchDY = 0;
     this.isLoad = isLock = isClose = isTranslate = isGravity = false;
     if (sprites != null)
     {
         sprites.Dispose();
         sprites = null;
     }
     this.sprites = new Sprites(width, height);
     if (desktop != null)
     {
         desktop.Dispose();
         desktop = null;
     }
     this.desktop = new Desktop(baseInput, width, height);
     this.isNext = true;
 }
示例#10
-1
        internal void SetDesktop(Desktop desktop_0)
        {
            if (this.desktop == desktop_0)
            {
                return;
            }

            this.desktop = desktop_0;
            this.input = desktop_0.input;
        }
示例#11
-1
 public virtual void Dispose()
 {
     this.isClose = true;
     this.desktop.SetComponentStat(this, false);
     if (this.parent != null)
     {
         this.parent.Remove(this);
     }
     this.desktop = Desktop.EMPTY_DESKTOP;
     this.input = null;
     this.parent = null;
     if (imageUI != null)
     {
         for (int i = 0; i < imageUI.Length; i++)
         {
             imageUI[i].Destroy();
             imageUI[i] = null;
         }
         this.imageUI = null;
     }
     if (background != null)
     {
         this.background.Destroy();
         this.background = null;
     }
     this.selected = false;
     this.visible = false;
 }
示例#12
-1
		private Desktop() {
			this.contentPane = new LPanel(0, 0, 1, 1);
			this.input = null;
			this.SetDesktop(this.contentPane);
		}
示例#13
-1
		public Desktop(LInput input, int width, int height) {
			this.contentPane = new LPanel(0, 0, width, height);
			this.input = input;
			this.SetDesktop(this.contentPane);
		}