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

Now possible to define the characters for use in paging indicators

This commit is contained in:
Chris Cummer
2018-05-24 09:03:00 -07:00
parent 0cdd859aa7
commit 5f7c3260c1
4 changed files with 17 additions and 43 deletions

View File

@@ -119,6 +119,20 @@ func RowColor(module string, idx int) string {
}
}
func SygilStr(len, pos int, view *tview.TextView) string {
sygils := ""
if len > 0 {
sygils = strings.Repeat(Config.UString("wtf.paging.pageSygil", "*"), pos)
sygils = sygils + Config.UString("wtf.paging.selectedSygil", "_")
sygils = sygils + strings.Repeat(Config.UString("wtf.paging.pageSygil", "*"), len-1-pos)
sygils = "[lightblue]" + fmt.Sprintf(RightAlignFormat(view), sygils) + "[white]"
}
return sygils
}
/* -------------------- Slice Conversion -------------------- */
func ToInts(slice []interface{}) []int {