Fix and rename PollEvents
This commit is contained in:
		
							parent
							
								
									df65ecda09
								
							
						
					
					
						commit
						27bbe8c0de
					
				@ -1,6 +1,7 @@
 | 
			
		||||
## 18/11/29
 | 
			
		||||
 | 
			
		||||
- Move Tabpane from termui/extra to termui and rename it to TabPane
 | 
			
		||||
- Rename PollEvent to PollEvents
 | 
			
		||||
 | 
			
		||||
## 18/11/28
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										10
									
								
								events.go
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								events.go
									
									
									
									
									
								
							@ -54,13 +54,13 @@ type Resize struct {
 | 
			
		||||
	Height int
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var pollingChannels [](chan Event)
 | 
			
		||||
 | 
			
		||||
// PollEvent gets events from termbox, converts them, then sends them to each of its channels.
 | 
			
		||||
func PollEvent() <-chan Event {
 | 
			
		||||
// PollEvents gets events from termbox, converts them, then sends them to each of its channels.
 | 
			
		||||
func PollEvents() <-chan Event {
 | 
			
		||||
	ch := make(chan Event)
 | 
			
		||||
	go func() {
 | 
			
		||||
		ch <- convertTermboxEvent(tb.PollEvent())
 | 
			
		||||
		for {
 | 
			
		||||
			ch <- convertTermboxEvent(tb.PollEvent())
 | 
			
		||||
		}
 | 
			
		||||
	}()
 | 
			
		||||
	return ch
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user