public ToolsWindow(Cursor cursor) : base() { messages = GuiData.Messages; SetPositionTL(3.5f, 63.8f); HasCloseButton = true; moveObject = AddToggleButton(); moveObject.Text = "Move"; moveObject.SetOverlayTextures( FlatRedBallServices.Load<Texture2D>("Content/icons/Tools/move.tga", AppState.Self.PermanentContentManager), null); attachObject = AddToggleButton(); attachObject.Text = "Attach"; moveObject.AddToRadioGroup(attachObject); attachObject.SetOverlayTextures( FlatRedBallServices.Load<Texture2D>("Content/icons/attach.tga", AppState.Self.PermanentContentManager), null); detachObject = AddButton(); detachObject.Text = "Detach"; detachObject.Enabled = false; detachObject.SetOverlayTextures( FlatRedBallServices.Load<Texture2D>("Content/icons/detach.tga", AppState.Self.PermanentContentManager), null); detachObject.Click += new GuiMessage(messages.DetachObjectClick); copyEmitter = AddButton(); copyEmitter.Text = "Copy"; copyEmitter.SetOverlayTextures( FlatRedBallServices.Load<Texture2D>("Content/icons/duplicate.tga", AppState.Self.PermanentContentManager), null); copyEmitter.Click += new GuiMessage(CopyEmitterClick); copyEmitter.Enabled = false ; scaleEmitterTime = AddButton(); scaleEmitterTime.Text = "Scale Emitter Speed"; scaleEmitterTime.SetOverlayTextures(15, 2); scaleEmitterTime.Click += new GuiMessage(ScaleEmitterTimeClick); scaleEmitterTime.Enabled = false; #region DownZFreeRotateButton this.mDownZFreeRotateButton = base.AddToggleButton(); mDownZFreeRotateButton.SetOverlayTextures( FlatRedBallServices.Load<Texture2D>(@"Content\DownZ.png", FlatRedBallServices.GlobalContentManager), FlatRedBallServices.Load<Texture2D>(@"Content\FreeRotation.png", FlatRedBallServices.GlobalContentManager)); #endregion }
public ToolsWindow(Cursor cursor) : base() { messages = GuiData.Messages; SetPositionTL(3.5f, 63.8f); HasCloseButton = true; moveObject = AddToggleButton(); moveObject.Text = "Move"; moveObject.SetOverlayTextures( FlatRedBallServices.Load <Texture2D>("Content/icons/Tools/move.tga", AppState.Self.PermanentContentManager), null); attachObject = AddToggleButton(); attachObject.Text = "Attach"; moveObject.AddToRadioGroup(attachObject); attachObject.SetOverlayTextures( FlatRedBallServices.Load <Texture2D>("Content/icons/attach.tga", AppState.Self.PermanentContentManager), null); detachObject = AddButton(); detachObject.Text = "Detach"; detachObject.Enabled = false; detachObject.SetOverlayTextures( FlatRedBallServices.Load <Texture2D>("Content/icons/detach.tga", AppState.Self.PermanentContentManager), null); detachObject.Click += new GuiMessage(messages.DetachObjectClick); copyEmitter = AddButton(); copyEmitter.Text = "Copy"; copyEmitter.SetOverlayTextures( FlatRedBallServices.Load <Texture2D>("Content/icons/duplicate.tga", AppState.Self.PermanentContentManager), null); copyEmitter.Click += new GuiMessage(CopyEmitterClick); copyEmitter.Enabled = false; scaleEmitterTime = AddButton(); scaleEmitterTime.Text = "Scale Emitter Speed"; scaleEmitterTime.SetOverlayTextures(15, 2); scaleEmitterTime.Click += new GuiMessage(ScaleEmitterTimeClick); scaleEmitterTime.Enabled = false; #region DownZFreeRotateButton this.mDownZFreeRotateButton = base.AddToggleButton(); mDownZFreeRotateButton.SetOverlayTextures( FlatRedBallServices.Load <Texture2D>(@"Content\DownZ.png", FlatRedBallServices.GlobalContentManager), FlatRedBallServices.Load <Texture2D>(@"Content\FreeRotation.png", FlatRedBallServices.GlobalContentManager)); #endregion }
public SESpriteGridManager() { camera = GameData.Camera; cursor = GameData.Cursor; currentSprites = GameData.EditorLogic.CurrentSprites; messages = GuiData.messages; mSpriteGridBorder = new SpriteGridBorder(cursor, camera); UndoManager.SetAfterUpdateDelegate(typeof(SpriteGrid), "XLeftBound", RepopulateSpriteGrid); UndoManager.SetAfterUpdateDelegate(typeof(SpriteGrid), "XRightBound", RepopulateSpriteGrid); UndoManager.SetAfterUpdateDelegate(typeof(SpriteGrid), "YTopBound", RepopulateSpriteGrid); UndoManager.SetAfterUpdateDelegate(typeof(SpriteGrid), "YBottomBound", RepopulateSpriteGrid); UndoManager.SetAfterUpdateDelegate(typeof(SpriteGrid), "ZCloseBound", RepopulateSpriteGrid); UndoManager.SetAfterUpdateDelegate(typeof(SpriteGrid), "ZFarBound", RepopulateSpriteGrid); tla = new List <TextureLocation <Texture2D> >(); }
public EmitterListBoxWindow(GuiMessages messages) : base(GuiManager.Cursor) { #region this Properties GuiManager.AddWindow(this); SetPositionTL(95.3f, 17.6167374f); ScaleX = 15; ScaleY = 12; MinimumScaleX = 12.5f; MinimumScaleY = 7; HasCloseButton = true; mMoveBar = true; mName = "Emitters"; Resizable = true; Resizing += PositionAndScaleChildrenWindows; #endregion mListDisplayWindow = new ListDisplayWindow(mCursor); this.AddWindow(mListDisplayWindow); mListDisplayWindow.DrawOuterWindow = false; mListDisplayWindow.ListBox.Highlight += new GuiMessage(messages.EmitterArrayListBoxClick); mListDisplayWindow.AllowCopy = true; mListDisplayWindow.AfterItemsPasted += new GuiMessage(mListDisplayWindow_AfterItemsPasted); mListDisplayWindow.ListBox.FocusUpdate += FocusUpdate; mListDisplayWindow.AllowReordering = true; addEmitter = new Button(mCursor); AddWindow(addEmitter); addEmitter.Text = "Add Emitter"; addEmitter.Click += new GuiMessage(addEmitterClick); deleteEmitter = new Button(mCursor); AddWindow(deleteEmitter); deleteEmitter.Text = "Delete Emitter"; deleteEmitter.Click += new GuiMessage(DeleteEmitterClick); PositionAndScaleChildrenWindows(null); }
public EmitterListBoxWindow(GuiMessages messages) : base(GuiManager.Cursor) { #region this Properties GuiManager.AddWindow(this); SetPositionTL(95.3f, 17.6167374f); ScaleX = 15; ScaleY = 12; MinimumScaleX = 12.5f; MinimumScaleY = 7; HasCloseButton = true; mMoveBar = true; mName = "Emitters"; Resizable = true; Resizing += PositionAndScaleChildrenWindows; #endregion mListDisplayWindow = new ListDisplayWindow(mCursor); this.AddWindow(mListDisplayWindow); mListDisplayWindow.DrawOuterWindow = false; mListDisplayWindow.ListBox.Highlight += new GuiMessage(messages.EmitterArrayListBoxClick); mListDisplayWindow.AllowCopy = true; mListDisplayWindow.AfterItemsPasted += new GuiMessage(mListDisplayWindow_AfterItemsPasted); mListDisplayWindow.ListBox.FocusUpdate += FocusUpdate; mListDisplayWindow.AllowReordering = true; addEmitter = new Button(mCursor); AddWindow(addEmitter); addEmitter.Text = "Add Emitter"; addEmitter.Click += new GuiMessage(addEmitterClick); deleteEmitter = new Button(mCursor); AddWindow(deleteEmitter); deleteEmitter.Text = "Delete Emitter"; deleteEmitter.Click += new GuiMessage(DeleteEmitterClick); PositionAndScaleChildrenWindows(null); }