Documentation
¶
Index ¶
- type ConnectionSettings
- type Display
- type Scrollbar
- func (sb *Scrollbar) ChildIndexInTree(treeNode *tview.TreeNode) int
- func (sb *Scrollbar) ChildWithIndexInTree(targetIndex int) *tview.TreeNode
- func (sb *Scrollbar) HandleMouseInput(action tview.MouseAction, event *tcell.EventMouse) (tview.MouseAction, *tcell.EventMouse)
- func (sb *Scrollbar) ScrollTo(index int)
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionSettings ¶
type ConnectionSettings struct { Host string // What host name to use for connecting from the client to the server Port string // What port to use for the connection // Whether logging should be silent (default) or not; if not silent, the terminal client will spam messages // indicating the messages received from the server, and vice-versa SilentLogging bool }
ConnectionSettings represents the set of options to use for both the terminal display client as well as your server in your game. The host and port settings should match for the connection to take.
func NewDefaultConnectionSettings ¶
func NewDefaultConnectionSettings() *ConnectionSettings
NewDefaultConnectionSettings returns a new ConnectionSettings object filled out with the default connection setting values.
type Display ¶
type Display struct { Client *p2p.Client ClientSettings *ConnectionSettings App *tview.Application Root *tview.Pages TreeNodeRoot *tview.TreeNode TreeView *tview.TreeView TreeViewScroll *Scrollbar NodePropertyArea *tview.TextArea GamePropertyArea *tview.TextArea SearchBar *tview.InputField SearchBarCloneMode bool SearchBarCloneModeAutocompleteNames []string SelectNextNode bool SelectNextNodeIndex uint64 SceneNodesToTreeNodes map[uint64]*tview.TreeNode // contains filtered or unexported fields }
Display represents the terminal interface that hooks into your game through a TCP connection. By manipulating the Display in your terminal, you can view and modify your connected game scene while it's running. It will also automatically reconnect if the connection is lots.
func NewDisplay ¶
func NewDisplay(settings *ConnectionSettings) *Display
NewDisplay returns a new Display object with the ConnectionSettings provided. If nil is passed, the default connection settings set is used.
type Scrollbar ¶
func NewScrollbar ¶
func (*Scrollbar) ChildIndexInTree ¶
func (*Scrollbar) ChildWithIndexInTree ¶
func (*Scrollbar) HandleMouseInput ¶
func (sb *Scrollbar) HandleMouseInput(action tview.MouseAction, event *tcell.EventMouse) (tview.MouseAction, *tcell.EventMouse)
type Server ¶
type Server struct { P2PServer *p2p.Server DebugDrawHierarchy bool DebugDrawWireframe bool DebugDrawBounds bool // contains filtered or unexported fields }
Server represents the endpoint of your game that the debugging Terminal hooks into. Note that this handles and records various settings to enable debugging simply and easily, so it's best to not instantiate a Server when shipping a release version of your game.
func NewServer ¶
func NewServer(settings *ConnectionSettings) *Server
NewServer returns a new server, using the connection settings provided. If you pass nil, that is valid for a default set of connection settings.