diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-10-24 12:55:45 +0300 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-10-24 12:55:45 +0300 |
commit | 86195d0722d1bf785ed8a0e1566bf2d02034a262 (patch) | |
tree | 61f1781d7da56cb71057bf21eb5a72ced7b6e51d /utils/helper/incremental_print.go | |
parent | a225c6f632c1efb349edf2a86f0fe920a7c2fafe (diff) | |
download | rulmarc-rpg-dev.tar.gz rulmarc-rpg-dev.tar.bz2 rulmarc-rpg-dev.zip |
chore: moved utils aroundrpg-dev
Diffstat (limited to 'utils/helper/incremental_print.go')
-rw-r--r-- | utils/helper/incremental_print.go | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/utils/helper/incremental_print.go b/utils/helper/incremental_print.go deleted file mode 100644 index c94f904..0000000 --- a/utils/helper/incremental_print.go +++ /dev/null @@ -1,19 +0,0 @@ -package helper - -import ( - "time" - - . "github.com/gbin/goncurses" -) - -func IncrementalPrint(scr *Window, text string, from_y int, from_x int, interval_millis int) { - for i:=0; i < len(text); i++ { - ch := string([]rune(text)[i]) - _, mx := scr.MaxYX() - cy := i / mx + from_y - cx := i % mx + 1 - scr.MovePrint(cy, cx, ch) - time.Sleep( time.Duration(1000 / len(text)) * time.Millisecond) - scr.Refresh() - } -} |