You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
400 B
19 lines
400 B
package cview |
|
|
|
import ( |
|
"github.com/gdamore/tcell/v2" |
|
) |
|
|
|
// newTestApp returns a new application connected to a simulation screen. |
|
func newTestApp(root Primitive) (*Application, error) { |
|
// Initialize simulation screen |
|
sc := tcell.NewSimulationScreen("UTF-8") |
|
sc.SetSize(80, 24) |
|
|
|
// Initialize application |
|
app := NewApplication() |
|
app.SetScreen(sc) |
|
app.SetRoot(root, true) |
|
|
|
return app, nil |
|
}
|
|
|