private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            m_ViewModel    = (OptionsMenuViewModel)DataContext;
            m_DetailsModel = (WDetailsViewViewModel)SettingsDetails.DataContext;

            m_DetailsModel.ReflectObject(m_ViewModel.Settings);
        }
Example #2
0
        public EventMode(WWorld world)
        {
            World = world;
            EventDetailsViewModel = new WDetailsViewViewModel();
            ActorDetailsViewModel = new WDetailsViewViewModel();
            m_StaffNodeViews      = new List <NetworkView>();

            TransformGizmo = new WTransformGizmo(world);

            ModeControlsDock = CreateUI();

            m_NodeWindow = new EventNodeWindow();
            m_NodeWindow.ActorPropertiesView.DataContext   = ActorDetailsViewModel;
            m_NodeWindow.ActorTabControl.SelectionChanged += OnSelectedActorChanged;
            m_NodeWindow.Closing += M_NodeWindow_Closing;
            m_NodeWindow.EditMenu.Items.Add(new MenuItem()
            {
                Header = "Add Actor", Command = AddStaffCommand
            });

            EditorSelection = new Selection <BindingVector3>(this);
            EditorSelection.OnSelectionChanged += OnSelectionChanged;

            m_SceneCameraOverride = new WCamera();
            m_SceneCameraOverride.bEnableUpdates = false;
            m_SceneCameraOverride.AspectRatio    = 1.28f;
        }
Example #3
0
        public WActorEditor(WWorld world)
        {
            m_world          = world;
            m_transformGizmo = new WTransformGizmo(m_world);

            EditorSelection = new Selection(m_world, this);
            EditorSelection.OnSelectionChanged += OnSelectionChanged;

            DetailsViewModel = new WDetailsViewViewModel();
        }
        public CollisionMode(WWorld world)
        {
            World = world;

            EditorSelection = new Selection <CollisionTriangle>(this);
            EditorSelection.OnSelectionChanged += OnSelectionChanged;

            DetailsViewModel = new WDetailsViewViewModel();

            ModeControlsDock = CreateUI();
        }
Example #5
0
        public ActorMode(WWorld world)
        {
            World          = world;
            TransformGizmo = new WTransformGizmo(world);

            EditorSelection = new Selection <WDOMNode>(this);
            EditorSelection.OnSelectionChanged += OnSelectionChanged;

            DetailsViewModel = new WDetailsViewViewModel();

            ModeControlsDock = CreateUI();
        }
Example #6
0
        public void OnRequestOpenTextEditor()
        {
            if (m_MinitorWindow != null && m_MinitorWindow.IsVisible == true)
            {
                m_MinitorWindow.Focus();
                return;
            }

            if (Messages == null)
            {
                if (!TryLoadMessageArchive())
                {
                    MessageBox.Show($"The file " +
                                    $"\"{ Path.Combine(WSettingsManager.GetSettings().RootDirectoryPath, "files", "res", "Msg", "bmgres.arc") }\" " +
                                    $"could not be found. The text editor cannot be opened.\n\n" +
                                    $"Please check that the Root Directory in your settings includes this file.",
                                    "Archive Not Found", MessageBoxButton.OK, MessageBoxImage.Error);

                    return;
                }
            }

            WindowTitle = "Text Editor - " + Path.Combine(WSettingsManager.GetSettings().RootDirectoryPath, "files", "res", "Msg", "bmgres.arc");

            m_MinitorWindow             = new TextMinitorWindow();
            m_MinitorWindow.DataContext = this;
            m_DetailsModel = (WDetailsViewViewModel)m_MinitorWindow.DetailsPanel.DataContext;

            m_RendererViewModel = new TextboxRendererViewModel();

            SelectedMessage = Messages[0];
            m_MinitorWindow.Show();

            CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(m_MinitorWindow.TextListView.ItemsSource);

            view.Filter = FilterMessages;

            SearchFilter = "";
        }
Example #7
0
 public void InitModule(WDetailsViewViewModel details_view_model)
 {
 }
Example #8
0
 public void InitModule(WDetailsViewViewModel details_view_model)
 {
     details_view_model.TypeCustomizations.Add(typeof(MessageReference).Name, new MessageReferenceTypeCustomization(this));
 }