VISU - PHP Game Framework

DebugConsole
in package

Table of Contents

Constants

EVENT_CONSOLE_COMMAND  = 'console.command'
The event that is dispatched when a console command is executed
INPUT_CONTEXT  = 'visu/dev/console'
The input context for the console

Properties

$charInputListenerId  : int|null
The char signal listener function id
$debugTextRenderer  : DebugOverlayTextRenderer
Debug font renderer
$dispatcher  : Dispatcher
$enabled  : bool
Is the console currently enabled?
$input  : Input
$inputLine  : string
The string that is currently beeing written to
$inputLineHistory  : array<string|int, string>
The input line history
$inputLineHistoryIndex  : int
The current history index
$inputLineHistoryLimit  : int
The input line history limit
$inputLineHistoryRenderLimit  : int
The maximum number of lines to be rendered
$quadVA  : QuadVertexArray
Quad we render as a background
$shaderProgram  : ShaderProgram
The debug font shader program.

Methods

__construct()  : mixed
Constructor
attachPass()  : void
Handles rendering of the scene, here you can attach additional render passes, modify the render pipeline or customize rendering related data.
clearHistory()  : void
Clears the console history
handleKeyboardCharSignal()  : void
Char input handler
handleKeyboardInputSignal()  : void
Keyboard event handler
writeLine()  : void
Writes a line to the console This will simply append it to the input line history

Constants

EVENT_CONSOLE_COMMAND

The event that is dispatched when a console command is executed

public mixed EVENT_CONSOLE_COMMAND = 'console.command'

INPUT_CONTEXT

The input context for the console

private mixed INPUT_CONTEXT = 'visu/dev/console'

Properties

$charInputListenerId

The char signal listener function id

private int|null $charInputListenerId = null

$enabled

Is the console currently enabled?

private bool $enabled = false

$inputLine

The string that is currently beeing written to

private string $inputLine = ""

$inputLineHistory

The input line history

private array<string|int, string> $inputLineHistory = []

$inputLineHistoryIndex

The current history index

private int $inputLineHistoryIndex = 0

$inputLineHistoryLimit

The input line history limit

private int $inputLineHistoryLimit = 100

$inputLineHistoryRenderLimit

The maximum number of lines to be rendered

private int $inputLineHistoryRenderLimit = 10

Methods

clearHistory()

Clears the console history

public clearHistory() : void

writeLine()

Writes a line to the console This will simply append it to the input line history

public writeLine(string $line) : void
Parameters
$line : string

        
On this page

Search results