public Window(int width, int height, NinePatch chrome) { Blocker = new TouchArea(0, 0, PixelScene.uiCamera.CameraWidth, PixelScene.uiCamera.CameraHeight); Blocker.ClickAction = BlockerClickAction; Blocker.Camera = PixelScene.uiCamera; Add(Blocker); Chrome = chrome; Width = width; Height = height; chrome.X = -chrome.MarginLeft(); chrome.Y = -chrome.MarginTop(); chrome.Size(width - chrome.X + chrome.MarginRight(), height - chrome.Y + chrome.MarginBottom()); Add(chrome); Camera = new Camera(0, 0, (int)chrome.Width, (int)chrome.Height, PixelScene.defaultZoom); Camera.X = (int)(Game.Width - Camera.CameraWidth * Camera.Zoom) / 2; Camera.Y = (int)(Game.Height - Camera.CameraHeight * Camera.Zoom) / 2; Camera.Scroll.Set(chrome.X, chrome.Y); Camera.Add(Camera); Keys.Event.Add(this); }