private void DoubleClickAnimationSequenceListBox(Window callingWindow)
        {
            object highlightedObject = mAnimationSequenceListBox.GetFirstHighlightedObject();

            if (highlightedObject != null)
            {
                if (highlightedObject is AnimationSequence)
                {
                    // Any logic here?
                }
                else if (highlightedObject is TimedKeyframeList)
                {
                    // Find the object that this references and select it.
                    TimedKeyframeList asTimedKeyframeList = highlightedObject as TimedKeyframeList;

                    INameable target = EditorData.BlockingScene.FindByName(asTimedKeyframeList.TargetName);

                    if (target is Sprite)
                    {
                        EditorData.EditorLogic.SelectObject <Sprite>(target as Sprite, EditorData.EditorLogic.CurrentSprites);
                    }
                    // else other types

                    GuiData.TimeLineWindow.InstructionMode = InstructionMode.Current;

                    EditorData.EditorLogic.CurrentKeyframeList = asTimedKeyframeList.KeyframeList;
                }
            }
        }
        private void UpdateUpDownOnClick(Window callingWindow)
        {
            InstructionBlueprint template = (mListDisplayWindow.GetFirstHighlightedObject() as InstructionBlueprint);

            if (template != null)
            {
                mSetSelectedInstructionTimeUpDown.CurrentValue = (float)template.Time;
            }
        }
Example #3
0
        public void Update()
        {
            #region Update SpriteListBox
            if (SpriteListBox.Visible)
            {
                SpriteListBox.UpdateToList();

                if (SpriteListBox.AreHighlightsMatching(GameData.EditorLogic.CurrentSprites) == false)
                {
                    SpriteListBox.HighlightItem(null, false);
                    foreach (Sprite sprite in GameData.EditorLogic.CurrentSprites)
                    {
                        SpriteListBox.HighlightObject(sprite, true);
                    }
                }
            }
            #endregion

            #region Update ModelListBox

            if (mModelListBox.Visible)
            {
                mModelListBox.UpdateToList();

                if (mModelListBox.AreHighlightsMatching(GameData.EditorLogic.CurrentPositionedModels) == false)
                {
                    mModelListBox.HighlightItem(null, false);
                    foreach (PositionedModel model in GameData.EditorLogic.CurrentPositionedModels)
                    {
                        mModelListBox.HighlightObject(model, true);
                    }
                }
            }
            #endregion

            #region Update TextListBox

            if (mTextListBox.Visible)
            {
                mTextListBox.UpdateToList();

                if (mTextListBox.AreHighlightsMatching(GameData.EditorLogic.CurrentTexts) == false)
                {
                    mTextListBox.HighlightItem(null, false);
                    foreach (Text text in GameData.EditorLogic.CurrentTexts)
                    {
                        mTextListBox.HighlightObject(text, true);
                    }
                }
            }

            #endregion

            #region Update SpriteFrameListBox

            if (SpriteFrameListBox.Visible)
            {
                SpriteFrameListBox.UpdateToList();

                if (SpriteFrameListBox.AreHighlightsMatching(GameData.EditorLogic.CurrentSpriteFrames) == false)
                {
                    SpriteFrameListBox.HighlightItem(null, false);
                    foreach (SpriteFrame spriteFrame in GameData.EditorLogic.CurrentSpriteFrames)
                    {
                        SpriteFrameListBox.HighlightObject(spriteFrame, true);
                    }
                }
            }

            #endregion

            #region Update SpriteGridListBox

            if (SpriteGridListBox.Visible)
            {
                SpriteGridListBox.UpdateToList();

                if (SpriteGridListBox.GetFirstHighlightedObject() != SESpriteGridManager.CurrentSpriteGrid)
                {
                    // Update this if multiple SpriteGrids can ever be selected at once.
                    SpriteGridListBox.HighlightObject(SESpriteGridManager.CurrentSpriteGrid, false);
                }
            }

            #endregion

            #region Update AnimationChainListBox

            if (mAnimationChainListWindow.Visible)
            {
                mAnimationChainListWindow.UpdateToList();
            }

            #endregion
        }
Example #4
0
 static void HighlightNewAssembly(Window callingWindow)
 {
     EditorData.EditorLogic.CurrentAssembly = mAssembliesListDisplayWindow.GetFirstHighlightedObject() as Assembly;
 }
Example #5
0
 public object GetFirstHighlightedObject()
 {
     return(mListDisplayWindow.GetFirstHighlightedObject());
 }
 void ShowAnimationPropertyGrid(Window callingWindow)
 {
     GuiManager.ObjectDisplayManager.GetObjectDisplayerForObject(mAnimationListDisplayWindow.GetFirstHighlightedObject());
 }