Ejemplo n.º 1
0
        public void RenderWindow_MouseUp(object sender, MouseEventArgs e)
        {
            //TODO: send x,y to instance collection for picking
            //TODO: if we are still using the preview->project "button" and we are
            //      in preview mode, test for click on it

            //If the scene is a scenario, call MouseMove handler ...and some other stuff
            if (scenes.Count > 0)
            {
                if (scenes[RenderCore.ActiveSceneName] is ScenarioBase)
                {
                    ScenarioBase scenario = scenes[RenderCore.ActiveSceneName] as ScenarioBase;

                    scenario.SelectionEdit_MouseUp(e.X, e.Y);
                    if (scenario.SelectedObject != null)
                    {
                        selectionType = scenario.SelectedObject.TargetType;
                    }
                    else
                    {
                        selectionType = TargetType.None;
                    }

                    scenarioPalettes       = scenario.Palettes;
                    scenarioPaletteEntries = scenario.PaletteEntries;
                    this.scenario          = scenario;
                    this.structureBsp      = scenario.ActiveBspTag;
                }
            }
            if (RenderWindow_MouseUpEvent != null)
            {
                RenderWindow_MouseUpEvent(sender, e);
            }
        }