EditorCommandPalette

package
v0.0.0-...-d9f4d4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package EditorCommandPalette provides methods for working with EditorCommandPalette object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsEditorCommandPalette() Instance
}

type Instance

type Instance [1]gdclass.EditorCommandPalette

Object that holds all the available Commands and their shortcuts text. These Commands can be accessed through [b]Editor > Command Palette[/b] menu. Command key names use slash delimiters to distinguish sections, for example: [code]"example/command1"[/code] then [code]example[/code] will be the section name. [codeblocks] [gdscript] var command_palette = EditorInterface.get_command_palette() # external_command is a function that will be called with the command is executed. var command_callable = Callable(self, "external_command").bind(arguments) command_palette.add_command("command", "test/command",command_callable) [/gdscript] [csharp] EditorCommandPalette commandPalette = EditorInterface.Singleton.GetCommandPalette(); // ExternalCommand is a function that will be called with the command is executed. Callable commandCallable = new Callable(this, MethodName.ExternalCommand); commandPalette.AddCommand("command", "test/command", commandCallable) [/csharp] [/codeblocks] [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_command_palette].

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AddCommand

func (self Instance) AddCommand(command_name string, key_name string, binded_callable func())

Adds a custom command to EditorCommandPalette. - [param command_name]: [String] (Name of the [b]Command[/b]. This is displayed to the user.) - [param key_name]: [String] (Name of the key for a particular [b]Command[/b]. This is used to uniquely identify the [b]Command[/b].) - [param binded_callable]: [Callable] (Callable of the [b]Command[/b]. This will be executed when the [b]Command[/b] is selected.) - [param shortcut_text]: [String] (Shortcut text of the [b]Command[/b] if available.)

func (Instance) AsAcceptDialog

func (self Instance) AsAcceptDialog() AcceptDialog.Instance

func (Instance) AsConfirmationDialog

func (self Instance) AsConfirmationDialog() ConfirmationDialog.Instance

func (Instance) AsEditorCommandPalette

func (self Instance) AsEditorCommandPalette() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsViewport

func (self Instance) AsViewport() Viewport.Instance

func (Instance) AsWindow

func (self Instance) AsWindow() Window.Instance

func (Instance) RemoveCommand

func (self Instance) RemoveCommand(key_name string)

Removes the custom command from EditorCommandPalette. - [param key_name]: [String] (Name of the key for a particular [b]Command[/b].)

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL