MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / PanelLayoutLoad

Function PanelLayoutLoad

internal/scripting/panel_func.go:17–23  ·  view source on GitHub ↗

PanelLayoutLoad loads a panel layout from the datafiles panel-layouts directory. name is relative to panel-layouts/ and has no extension. Example: PanelLayoutLoad("character/status") Returns a ScriptPanelLayout on success, or throws a JavaScript error on failure.

(name string)

Source from the content-addressed store, hash-verified

15// Example: PanelLayoutLoad("character/status")
16// Returns a ScriptPanelLayout on success, or throws a JavaScript error on failure.
17func PanelLayoutLoad(name string) *ScriptPanelLayout {
18 layout, err := templates.LoadPanelLayout(name)
19 if err != nil {
20 panic(err.Error())
21 }
22 return &ScriptPanelLayout{layout: layout}
23}
24
25// PanelLayoutNew creates a panel layout entirely in script, without a YAML file.
26// opts is an optional JS object with any of: border, charset, gap, margin.

Callers

nothing calls this directly

Calls 1

LoadPanelLayoutFunction · 0.92

Tested by

no test coverage detected