Skip to content

Latest commit

 

History

History
167 lines (113 loc) · 2.62 KB

File metadata and controls

167 lines (113 loc) · 2.62 KB

Console

Extends: CanvasLayer

Description

Property Descriptions

History

var History: History

Log

var Log: Logger

is_console_shown

var is_console_shown: bool

consume_input

var consume_input: bool

previous_focus_owner

var previous_focus_owner: Control

Text

var Text

Line

var Line

Method Descriptions

get_command_service

func get_command_service(): Command/CommandService

get_action_service

func get_action_service(): Action/ActionService

getCommand (deprecated)

func getCommand(name: String): Command/Command|null

get_command

func get_command(name: String): Command/Command|null

findCommands (deprecated)

func findCommands(name: String): Command/CommandCollection

find_commands

func find_commands(name: String): Command/CommandCollection

addCommand (deprecated)

func addCommand(name: String, target: Reference, target_name: String|null): Command/CommandBuilder

add_command

func add_command(name: String, target: Reference, target_name: String|null): Command/CommandBuilder

Example usage:

Console.add_command('sayHello', self, 'print_hello')\
	.set_description('Prints "Hello %name%!"')\
	.add_argument('name', TYPE_STRING)\
	.register()

removeCommand (deprecated)

func removeCommand(name: String): int

remove_command

func remove_command(name: String): int

write

func write(message: String): void

writeLine (deprecated)

func writeLine(message: String): void

write_line

func write_line(message: String): void

clear

func clear(): void

toggleConsole

func toggleConsole(): Console

toggle_console

func toggle_console(): Console

Signals

  • signal toggled(is_console_shown): @param bool is_console_shown
  • signal command_added(name, target, target_name): @param String name @param Reference target @param String|null target_name
  • signal command_removed(name): @param String name
  • signal command_executed(command): @param Command command
  • signal command_not_found(name): @param String name