Ejemplo n.º 1
0
 void on_double_clicked()
 {
     FUtil.SafeSendEvent(OnDoubleClicked, this, new EventArgs());
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 3
0
        void on_clicked()
        {
            begin_editing();

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