fn draw_status_text(&mut self, text: &str, location: StatusBarLocation) {
        let surface = self.font.render(text).blended(self.bar_text_color).unwrap();
        let texture = self.renderer.create_texture_from_surface(&surface).unwrap();
        let margin = 4;
        let (w, h) = {
            let q = texture.query();
            (q.width, q.height)
        };
        let (x, y) = match location {
            StatusBarLocation::FlushLeft => {
                (margin as i32, (self.screen_size.1 - margin - h) as i32)
            }
            StatusBarLocation::FlushRight => {
                ((self.screen_size.0 - margin - w) as i32,
                 (self.screen_size.1 - margin - h) as i32)
            }
        };
        self.renderer.copy(&texture, None, Some(Rect::new(x, y, w, h)));
    }
/// Draws text in the status bar
Draws text in the status bar
Draws text in the status bar
fn draw_status_text(&mut self, text: &str, location: StatusBarLocation) {
        let surface = self.font.render(text).blended(self.bar_text_color).unwrap();
        let texture = self.renderer.create_texture_from_surface(&surface).unwrap();
        let margin = 4;
        let (w, h) = {
            let q = texture.query();
            (q.width, q.height)
        };
        let (x, y) = match location {
            StatusBarLocation::FlushLeft => {
                (margin as i32, (self.screen_size.1 - margin - h) as i32)
            }
            StatusBarLocation::FlushRight => {
                ((self.screen_size.0 - margin - w) as i32,
                 (self.screen_size.1 - margin - h) as i32)
            }
        };
        self.renderer.copy(&texture, None, Some(Rect::new(x, y, w, h)));
    }
fn draw_status_text ( & mut self , text : & str , location : StatusBarLocation ) { let surface = self . font . render ( text ) . blended ( self . bar_text_color ) . unwrap ( ) ; let texture = self . renderer . create_texture_from_surface ( & surface ) . unwrap ( ) ; let margin = 4 ; let ( w , h ) = { let q = texture . query ( ) ; ( q . width , q . height ) } ; let ( x , y ) = match location { StatusBarLocation :: FlushLeft => { ( margin as i32 , ( self . screen_size . 1 - margin - h ) as i32 ) } StatusBarLocation :: FlushRight => { ( ( self . screen_size . 0 - margin - w ) as i32 , ( self . screen_size . 1 - margin - h ) as i32 ) } } ; self . renderer . copy ( & texture , None , Some ( Rect :: new ( x , y , w , h ) ) ) ; }
Draws text in the status bar
Draws text in the status bar
&mut self
text
&str
location
StatusBarLocation