Ejemplo n.º 1
0
        protected virtual void SetupSignalHooks()
        {
            __mouseEnteredSubscriber = new GodotSignalSubscriber0();
            __mouseEnteredSubscriber.Connect(SceneControl, "mouse_entered");
            __mouseEnteredSubscriber.Signal += __mouseEnteredHook;

            __mouseExitedSubscriber = new GodotSignalSubscriber0();
            __mouseExitedSubscriber.Connect(SceneControl, "mouse_exited");
            __mouseExitedSubscriber.Signal += __mouseExitedHook;

            __guiInputSubscriber = new GodotSignalSubscriber1();
            __guiInputSubscriber.Connect(SceneControl, "gui_input");
            __guiInputSubscriber.Signal += __guiInputHook;

            __focusEnteredSubscriber = new GodotSignalSubscriber0();
            __focusEnteredSubscriber.Connect(SceneControl, "focus_entered");
            __focusEnteredSubscriber.Signal += __focusEnteredHook;

            __focusExitedSubscriber = new GodotSignalSubscriber0();
            __focusExitedSubscriber.Connect(SceneControl, "focus_exited");
            __focusExitedSubscriber.Signal += __focusExitedHook;

            __treeExitedSubscriber = new GodotSignalSubscriber0();
            __treeExitedSubscriber.Connect(SceneControl, "tree_exited");
            __treeExitedSubscriber.Signal += __treeExitedHook;

            __resizedSubscriber = new GodotSignalSubscriber0();
            __resizedSubscriber.Connect(SceneControl, "resized");
            __resizedSubscriber.Signal += __resizedHook;
        }
Ejemplo n.º 2
0
        protected virtual void DisposeSignalHooks()
        {
            __mouseEnteredSubscriber.Disconnect(SceneControl, "mouse_entered");
            __mouseEnteredSubscriber.Dispose();
            __mouseEnteredSubscriber = null;

            __mouseExitedSubscriber.Disconnect(SceneControl, "mouse_exited");
            __mouseExitedSubscriber.Dispose();
            __mouseExitedSubscriber = null;

            __guiInputSubscriber.Disconnect(SceneControl, "gui_input");
            __guiInputSubscriber.Dispose();
            __guiInputSubscriber = null;

            __focusEnteredSubscriber.Disconnect(SceneControl, "focus_entered");
            __focusEnteredSubscriber.Dispose();
            __focusEnteredSubscriber = null;

            __focusExitedSubscriber.Disconnect(SceneControl, "focus_exited");
            __focusExitedSubscriber.Dispose();
            __focusExitedSubscriber = null;

            __treeExitedSubscriber.Disconnect(SceneControl, "tree_exited");
            __treeExitedSubscriber.Dispose();
            __treeExitedSubscriber = null;
        }