pub fn run(mut self)
	{
		self.width = self.rustbox.width();
		self.height = self.rustbox.height();
		self.draw_all();
		loop
		{
			match self.rustbox.poll_event(true)
			{
				Ok(Event::KeyEventRaw(_, key, charval)) =>
				{
					match char::from_u32(charval)
					{
						Some(character) => {
							self.key_event(key, character);
							self.draw_after_keypress();
						},
						None => {}
					};
					if self.running == false
					{
						break;
					}
				},
				Ok(Event::ResizeEvent(width, height)) =>
				{
					self.resize_event(width as usize, height as usize);
					self.draw_all();
				},
				Err(_) => {},
				_ => {
					if self.skipped_draw
					{
						self.redo_skipped_draw();
					}
				}
			}
		}
	}
//poll events, repaint after resize or key press
poll events, repaint after resize or key press
poll events repaint after resize or key press
pub fn run(mut self)
	{
		self.width = self.rustbox.width();
		self.height = self.rustbox.height();
		self.draw_all();
		loop
		{
			match self.rustbox.poll_event(true)
			{
				Ok(Event::KeyEventRaw(_, key, charval)) =>
				{
					match char::from_u32(charval)
					{
						Some(character) => {
							self.key_event(key, character);
							self.draw_after_keypress();
						},
						None => {}
					};
					if self.running == false
					{
						break;
					}
				},
				Ok(Event::ResizeEvent(width, height)) =>
				{
					self.resize_event(width as usize, height as usize);
					self.draw_all();
				},
				Err(_) => {},
				_ => {
					if self.skipped_draw
					{
						self.redo_skipped_draw();
					}
				}
			}
		}
	}
pub fn run ( mut self ) { self . width = self . rustbox . width ( ) ; self . height = self . rustbox . height ( ) ; self . draw_all ( ) ; loop { match self . rustbox . poll_event ( true ) { Ok ( Event :: KeyEventRaw ( _ , key , charval ) ) => { match char :: from_u32 ( charval ) { Some ( character ) => { self . key_event ( key , character ) ; self . draw_after_keypress ( ) ; } , None => { } } ; if self . running == false { break ; } } , Ok ( Event :: ResizeEvent ( width , height ) ) => { self . resize_event ( width as usize , height as usize ) ; self . draw_all ( ) ; } , Err ( _ ) => { } , _ => { if self . skipped_draw { self . redo_skipped_draw ( ) ; } } } } }
poll events, repaint after resize or key press
poll events repaint after resize or key press
mut self
mut self