Class SlidingPanelComponent
A component used heavily in the main menu elements. It is designed to create cascading panels that slide in and out smoothly. See the default main menu for examples.
[GlobalClass]
[ScriptPath("res://Core/Modules/GUI/SlidingPanelComponent.cs")]
public class SlidingPanelComponent : Node, IDisposable
- Inheritance
-
GodotObjectNodeSlidingPanelComponent
- Implements
- Inherited Members
-
Node.NotificationEnterTreeNode.NotificationExitTreeNode.NotificationMovedInParentNode.NotificationReadyNode.NotificationPausedNode.NotificationUnpausedNode.NotificationPhysicsProcessNode.NotificationProcessNode.NotificationParentedNode.NotificationUnparentedNode.NotificationSceneInstantiatedNode.NotificationDragBeginNode.NotificationDragEndNode.NotificationPathRenamedNode.NotificationChildOrderChangedNode.NotificationInternalProcessNode.NotificationInternalPhysicsProcessNode.NotificationPostEnterTreeNode.NotificationDisabledNode.NotificationEnabledNode.NotificationNodeRecacheRequestedNode.NotificationEditorPreSaveNode.NotificationEditorPostSaveNode.NotificationWMMouseEnterNode.NotificationWMMouseExitNode.NotificationWMWindowFocusInNode.NotificationWMWindowFocusOutNode.NotificationWMCloseRequestNode.NotificationWMGoBackRequestNode.NotificationWMSizeChangedNode.NotificationWMDpiChangeNode.NotificationVpMouseEnterNode.NotificationVpMouseExitNode.NotificationOsMemoryWarningNode.NotificationTranslationChangedNode.NotificationWMAboutNode.NotificationCrashNode.NotificationOsImeUpdateNode.NotificationApplicationResumedNode.NotificationApplicationPausedNode.NotificationApplicationFocusInNode.NotificationApplicationFocusOutNode.NotificationTextServerChangedNode.GetNode<T>(NodePath)Node.GetNodeOrNull<T>(NodePath)Node.GetOwner<T>()Node.GetOwnerOrNull<T>()Node.GetParent<T>()Node.GetParentOrNull<T>()Node._EnterTree()Node._ExitTree()Node._GetConfigurationWarnings()Node._Input(InputEvent)Node._ShortcutInput(InputEvent)Node._UnhandledKeyInput(InputEvent)Node.PrintOrphanNodes()Node.RemoveChild(Node)Node.HasNode(NodePath)Node.GetNode(NodePath)Node.GetNodeOrNull(NodePath)Node.GetParent()Node.HasNodeAndResource(NodePath)Node.GetNodeAndResource(NodePath)Node.IsInsideTree()Node.IsAncestorOf(Node)Node.IsGreaterThan(Node)Node.GetPath()Node.RemoveFromGroup(StringName)Node.IsInGroup(StringName)Node.GetGroups()Node.PrintTree()Node.PrintTreePretty()Node.GetPhysicsProcessDeltaTime()Node.IsPhysicsProcessing()Node.GetProcessDeltaTime()Node.IsProcessing()Node.IsProcessingInput()Node.IsProcessingShortcutInput()Node.IsProcessingUnhandledInput()Node.IsProcessingUnhandledKeyInput()Node.CanProcess()Node.IsDisplayedFolded()Node.IsProcessingInternal()Node.IsPhysicsProcessingInternal()Node.GetWindow()Node.GetLastExclusiveWindow()Node.GetTree()Node.CreateTween()Node.GetSceneInstanceLoadPlaceholder()Node.IsEditableInstance(Node)Node.GetViewport()Node.QueueFree()Node.RequestReady()Node.IsNodeReady()Node.GetMultiplayerAuthority()Node.IsMultiplayerAuthority()Node.RpcConfig(StringName, Variant)Node.Rpc(StringName, params Variant[])Node.UpdateConfigurationWarnings()Node.CallDeferredThreadGroup(StringName, params Variant[])Node.SetDeferredThreadGroup(StringName, Variant)Node.CallThreadSafe(StringName, params Variant[])Node.SetThreadSafe(StringName, Variant)Node._ImportPathNode.NameNode.UniqueNameInOwnerNode.SceneFilePathNode.OwnerNode.MultiplayerNode.ProcessModeNode.ProcessPriorityNode.ProcessPhysicsPriorityNode.ProcessThreadGroupNode.ProcessThreadGroupOrderNode.ProcessThreadMessagesNode.EditorDescriptionNode.ReadyNode.RenamedNode.TreeEnteredNode.TreeExitingNode.TreeExitedNode.ChildEnteredTreeNode.ChildExitingTreeNode.ChildOrderChangedNode.ReplacingByGodotObject.NotificationPostinitializeGodotObject.NotificationPredeleteGodotObject.NativeInstanceGodotObject.ScriptChangedGodotObject.PropertyListChanged
- Extension Methods
Fields
_easingHide
The ease type to use when hiding
[Export(PropertyHint.None, "")]
private Tween.EaseType _easingHide
Field Value
- Tween.EaseType
_easingShow
The ease type to use when showing
[Export(PropertyHint.None, "")]
private Tween.EaseType _easingShow
Field Value
- Tween.EaseType
_isStable
private bool _isStable
Field Value
_pathSubSlidingRoot
The path where child sliding panels should be added
[Export(PropertyHint.None, "")]
private NodePath _pathSubSlidingRoot
Field Value
- NodePath
_popInDuration
The time this panel takes to slide in
[Export(PropertyHint.None, "")]
private float _popInDuration
Field Value
_popOutDuration
The time this panel takes to slide out
[Export(PropertyHint.None, "")]
private float _popOutDuration
Field Value
_target
[Export(PropertyHint.None, "")]
private Control _target
Field Value
- Control
_transHide
The transition type to use when hiding
[Export(PropertyHint.None, "")]
private Tween.TransitionType _transHide
Field Value
- Tween.TransitionType
_transShow
The transition type to use when showing
[Export(PropertyHint.None, "")]
private Tween.TransitionType _transShow
Field Value
- Tween.TransitionType
Methods
RemoveScene()
An async function that clears this sliding panel. It is async because first it must clear child panels (cascade style) and once they are cleared this one can slide out and them finally return. Await this function to remove the panel and then do something once its gone.
public Task RemoveScene()
Returns
- Task
nothing! It's async
_Ready()
Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their Godot.Node._Ready() callbacks get triggered first, and the parent node will receive the ready notification afterwards.
Corresponds to the Godot.Node.NotificationReady notification in _Notification(int). See also the @onready
annotation for variables.
Usually used for initialization. For even earlier initialization, Godot.GodotObject.GodotObject() may be used. See also Godot.Node._EnterTree().
Note:
Godot.Node._Ready() may be called only once for each node. After removing a node from the scene tree and adding it again, _ready
will not be called a second time. This can be bypassed by requesting another call with Godot.Node.RequestReady(), which may be called anywhere before adding the node again.
public override void _Ready()
_UnhandledInput(InputEvent)
Called when an Godot.InputEvent hasn't been consumed by Godot.Node._Input(Godot.InputEvent) or any GUI Godot.Control item. The input event propagates up through the node tree until a node consumes it.
It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with SetProcessUnhandledInput(bool).
To consume the input event and stop it propagating further to other nodes, Godot.Viewport.SetInputAsHandled() can be called.
For gameplay input, this and Godot.Node._UnhandledKeyInput(Godot.InputEvent) are usually a better fit than Godot.Node._Input(Godot.InputEvent) as they allow the GUI to intercept the events first.
Note: This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
public override void _UnhandledInput(InputEvent @event)
Parameters
event
InputEvent