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)
| 15 | // Example: PanelLayoutLoad("character/status") |
| 16 | // Returns a ScriptPanelLayout on success, or throws a JavaScript error on failure. |
| 17 | func 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. |
nothing calls this directly
no test coverage detected