mirror of
https://github.com/gdamore/tcell.git
synced 2025-04-24 13:48:51 +08:00
Include some explanatory text for the cursor demo.
This commit is contained in:
parent
f631374ce3
commit
cb7cb02d04
@ -1,6 +1,7 @@
|
||||
//go:build ignore
|
||||
// +build ignore
|
||||
|
||||
// Copyright 2021 The TCell Authors
|
||||
// Copyright 2022 The TCell Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use file except in compliance with the License.
|
||||
@ -38,6 +39,12 @@ func main() {
|
||||
s.SetStyle(tcell.StyleDefault)
|
||||
s.Clear()
|
||||
|
||||
text := "This demonstrates cursor styles. Press 0 through 6 to change the style."
|
||||
x := 1
|
||||
for _, r := range text {
|
||||
s.SetCell(x, 1, tcell.StyleDefault, r)
|
||||
x++
|
||||
}
|
||||
s.SetCell(2, 2, tcell.StyleDefault, '0')
|
||||
s.SetCursorStyle(tcell.CursorStyleDefault)
|
||||
s.ShowCursor(3, 2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user