X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=screen%2Fscreen.go;h=f428da873283ae846b501f6d2bafb5c3af41a4a1;hb=9c17baa1e5fb1582c5bbed49280a9ee672142332;hp=1490adf541b222d0025be8b7ac257ed3c8fb15ce;hpb=38376bf5db9af25660b8183b2c022d079bb2b5ea;p=pstop.git diff --git a/screen/screen.go b/screen/screen.go index 1490adf..f428da8 100644 --- a/screen/screen.go +++ b/screen/screen.go @@ -78,6 +78,18 @@ func (s *TermboxScreen) PrintAt(x int, y int, text string) { s.Flush() } +// print the characters in bold (for headings) but don't print them outside the screen +func (s *TermboxScreen) BoldPrintAt(x int, y int, text string) { + offset := 0 + for c := range text { + if (x + offset) < s.width { + termbox.SetCell(x+offset, y, rune(text[c]), s.fg | termbox.AttrBold, s.bg) + offset++ + } + } + s.Flush() +} + func (s *TermboxScreen) DisplayHelp() { s.PrintAt(0, 0, lib.MyName()+" version "+version.Version()+" (C) 2014 Simon J Mudd ") @@ -87,12 +99,13 @@ func (s *TermboxScreen) DisplayHelp() { s.PrintAt(0, 5, "Keys:") s.PrintAt(0, 6, "- - reduce the poll interval by 1 second (minimum 1 second)") s.PrintAt(0, 7, "+ - increase the poll interval by 1 second") - s.PrintAt(0, 8, "h - this help screen") + s.PrintAt(0, 8, "h/? - this help screen") s.PrintAt(0, 9, "q - quit") s.PrintAt(0, 10, "t - toggle between showing time since resetting statistics or since P_S data was collected") s.PrintAt(0, 11, "z - reset statistics") - s.PrintAt(0, 12, " - change display modes between: latency, ops, file I/O and lock modes") - s.PrintAt(0, 14, "Press h to return to main screen") + s.PrintAt(0, 12, " or - change display modes between: latency, ops, file I/O, lock and user modes") + s.PrintAt(0, 13, " - change display modes to the previous screen (see above)") + s.PrintAt(0, 15, "Press h to return to main screen") } func (s *TermboxScreen) Close() {