// call a function to draw the instructions screen
call a function to draw the instructions screen
call a function to draw the instructions screen
pub fn draw_instructions(&self, args: RenderArgs) {
        let mut gl = GlGraphics::new(OpenGL::V3_2);
        let font = include_bytes!("../assets/FiraSans-Regular.ttf");
        let mut glyphs = GlyphCache::from_bytes(font, (), TextureSettings::new()).unwrap();
        gl.draw(args.viewport(), |c, g| {
            clear(Color::BACKGROUND, g);
            text(
                Color::TEXT,
                (self.window_size.width / 25.0) as u32,
                "WASD or Arrow Keys: Move",
                &mut glyphs,
                c.transform
                    .trans(self.window_size.width / 4.0, self.window_size.height / 2.0),
                g,
            )
        })
        .expect("Failed to make end screen");
        gl.draw(args.viewport(), |c, g| {
            text(
                Color::TEXT,
                (self.window_size.width / 25.0) as u32,
                "Q: Pause",
                &mut glyphs,
                c.transform
                    .trans(self.window_size.width / 4.0, self.window_size.height / 2.35),
                g,
            )
        })
        .expect("Failed to make end screen");
        gl.draw(args.viewport(), |c, g| {
            text(
                Color::TEXT,
                (self.window_size.width / 25.0) as u32,
                "Esc: Quit",
                &mut glyphs,
                c.transform
                    .trans(self.window_size.width / 4.0, self.window_size.height / 1.75),
                g,
            )
        })
        .expect("Failed to make end screen");
    }
pub fn draw_instructions ( & self , args : RenderArgs ) { let mut gl = GlGraphics :: new ( OpenGL :: V3_2 ) ; let font = include_bytes ! ( " " ) ; let mut glyphs = GlyphCache :: from_bytes ( font , ( ) , TextureSettings :: new ( ) ) . unwrap ( ) ; gl . draw ( args . viewport ( ) , | c , g | { clear ( Color :: BACKGROUND , g ) ; text ( Color :: TEXT , ( self . window_size . width / 25.0 ) as u32 , " " , & mut glyphs , c . transform . trans ( self . window_size . width / 4.0 , self . window_size . height / 2.0 ) , g , ) } ) . expect ( " " ) ; gl . draw ( args . viewport ( ) , | c , g | { text ( Color :: TEXT , ( self . window_size . width / 25.0 ) as u32 , " " , & mut glyphs , c . transform . trans ( self . window_size . width / 4.0 , self . window_size . height / 2.35 ) , g , ) } ) . expect ( " " ) ; gl . draw ( args . viewport ( ) , | c , g | { text ( Color :: TEXT , ( self . window_size . width / 25.0 ) as u32 , " " , & mut glyphs , c . transform . trans ( self . window_size . width / 4.0 , self . window_size . height / 1.75 ) , g , ) } ) . expect ( " " ) ; }
call a function to draw the instructions screen
call a function to draw the instructions screen
&self
args
RenderArgs