1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Textfile module now supports multiple text files

This commit is contained in:
Chris Cummer
2018-08-30 07:52:59 -07:00
parent ed75f9648a
commit 0e797fea3d
12 changed files with 168 additions and 48 deletions

View File

@@ -29,12 +29,10 @@ func NewBillboardModal(text string, closeFunc func()) *tview.Frame {
}
textView := tview.NewTextView()
textView.SetInputCapture(keyboardIntercept)
textView.SetWrap(true)
textView.SetText(text)
textView.SetBackgroundColor(tview.Styles.ContrastBackgroundColor)
textView.SetInputCapture(keyboardIntercept)
frame := tview.NewFrame(textView)
frame.SetRect(offscreen, offscreen, modalWidth, modalHeight)
@@ -44,7 +42,6 @@ func NewBillboardModal(text string, closeFunc func()) *tview.Frame {
return x, y, width, height
}
frame.SetBackgroundColor(tview.Styles.ContrastBackgroundColor)
frame.SetBorder(true)
frame.SetBorders(1, 1, 0, 0, 1, 1)
frame.SetDrawFunc(drawFunc)

View File

@@ -156,6 +156,7 @@ func SigilStr(len, pos int, view *tview.TextView) string {
func ToInts(slice []interface{}) []int {
results := []int{}
for _, val := range slice {
results = append(results, val.(int))
}
@@ -165,6 +166,7 @@ func ToInts(slice []interface{}) []int {
func ToStrs(slice []interface{}) []string {
results := []string{}
for _, val := range slice {
results = append(results, val.(string))
}