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:
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user