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; }
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; }
protected override void DisposeSignalHooks() { base.DisposeSignalHooks(); __popupHideSubscriber.Disconnect(SceneControl, "popup_hide"); __popupHideSubscriber.Dispose(); __popupHideSubscriber = null; }
protected override void SetupSignalHooks() { base.SetupSignalHooks(); __popupHideSubscriber = new GodotSignalSubscriber0(); __popupHideSubscriber.Connect(SceneControl, "popup_hide"); __popupHideSubscriber.Signal += __popupHideHook; }
public override void Initialize() { ReloadConfig(); _rootViewportSizeChangedSubscriber = new GodotSignalSubscriber0(); _rootViewportSizeChangedSubscriber.Connect(_sceneTreeHolder.SceneTree.Root, "size_changed"); _rootViewportSizeChangedSubscriber.Signal += () => { // TODO: Uh maybe send oldSize correctly here. OnWindowResized?.Invoke(new WindowResizedEventArgs(Vector2i.Zero, ScreenSize)); }; }