mirror of
https://github.com/br0xen/termbox-screen.git
synced 2024-11-22 05:33:13 +00:00
Add Manual termbox Close function
This commit is contained in:
parent
e9dc04fa31
commit
a69fcaa438
@ -137,7 +137,7 @@ func (m *Manager) Loop() error {
|
|||||||
}
|
}
|
||||||
m.running = false
|
m.running = false
|
||||||
close(m.events)
|
close(m.events)
|
||||||
termbox.Close()
|
m.Close()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,6 +149,10 @@ func (m *Manager) SendEvent(t termbox.Event) {
|
|||||||
m.events <- t
|
m.events <- t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *Manager) Close() {
|
||||||
|
termbox.Close()
|
||||||
|
}
|
||||||
|
|
||||||
func (m *Manager) pollUserEvents() {
|
func (m *Manager) pollUserEvents() {
|
||||||
for m.running {
|
for m.running {
|
||||||
m.SendEvent(termbox.PollEvent())
|
m.SendEvent(termbox.PollEvent())
|
||||||
|
Loading…
Reference in New Issue
Block a user