Пример #1
0
 void on_double_clicked()
 {
     FUtil.SafeSendEvent(OnDoubleClicked, this, new EventArgs());
 }
Пример #2
0
        // Update is called once per frame
        public void Update()
        {
            ThreadMailbox.ProcessMainThreadMail();   // is this the right spot to do this?

            FPlatform.IncrementFrameCounter();

            if (FPlatform.IsWindowResized())
            {
                FUtil.SafeSendAnyEvent(OnWindowResized);
            }

            // update our wrappers around various different Input modes
            InputExtension.Get.Update();

            // update cockpit tracking and let UI do per-frame rendering computations
            if (options.EnableCockpit)
            {
                ActiveCockpit.Update();
            }

            // hardcoded Q key quits app
            if (Input.GetKeyUp(KeyCode.Q))
            {
                Cursor.lockState = CursorLockMode.None;
                GlobalControl.Quit();
            }

            // run per-frame actions
            Action execActions = null;

            lock (nextFrameActions) {
                execActions = nextFrameActions.GetRunnable();
                nextFrameActions.Clear();
            }
            if (execActions != null)
            {
                execActions();
            }


            // can either use spacecontrols or mouse, but not both at same time
            // [TODO] ask spatial input controller instead, it knows better (?)
            if (FPlatform.IsUsingVR() && SpatialController.CheckForSpatialInputActive())
            {
                Configure_SpaceControllers();
                HandleInput_SpaceControllers();
            }
            else if (FPlatform.IsTouchDevice())
            {
                Configure_TouchInput();
                HandleInput_Touch();
            }
            else
            {
                Configure_MouseOrGamepad();
                HandleInput_MouseOrGamepad();
            }

            // after we have handled input, do per-frame rendering computations
            if (options.EnableCockpit)
            {
                ActiveCockpit.PreRender();
            }
            ToolManager.PreRender();
            Scene.PreRender();
        }
Пример #3
0
        void on_clicked()
        {
            begin_editing();

            FUtil.SafeSendEvent(OnClicked, this, new EventArgs());
        }
Пример #4
0
 void remove_key(double time)
 {
     Keys.Remove(time);
     FUtil.SafeSendEvent(ModifiedEvent, this, null);
 }
Пример #5
0
 void add_or_update_key(Keyframe f)
 {
     Keys[f.Time] = f;
     FUtil.SafeSendEvent(ModifiedEvent, this, null);
 }
Пример #6
0
 public void selected(object sender)
 {
     FUtil.SafeSendEvent(OnSelected, sender, new EventArgs());
 }
Пример #7
0
 protected virtual void OnSceneChanged(SceneObject so, SceneChangeType type)
 {
     FUtil.SafeSendAnyEvent(ChangedEvent, this, so, type);
 }
Пример #8
0
 protected virtual void OnSelectionChanged(EventArgs e)
 {
     FUtil.SafeSendEvent(SelectionChangedEvent, this, e);
 }
Пример #9
0
 private void Context_OnWindowResized()
 {
     DebugUtil.Log(2, "WINDOW RESIZE EVENT");
     FUtil.SafeSendAnyEvent(OnContainerBoundsModified, this);
 }
Пример #10
0
 public void Dismiss()
 {
     FUtil.SafeSendEvent(OnDismissed, this, new EventArgs());
 }