ggez / ggez.github.io

ggez website
http://ggez.rs/
3 stars 4 forks source link

Update the formatting of example? #8

Open ozkriff opened 6 years ago

ozkriff commented 6 years ago

Site's version uses an old indenting style with visual indentation, not the new blocky one:

https://github.com/ggez/ggez/blob/b51c4ff85/examples/super_simple.rs#L27-L38

Maybe it's even better to move out a point to a variable so the call fit one line?

    fn draw(&mut self, ctx: &mut Context) -> GameResult<()> {
        graphics::clear(ctx);
        let point = Point2::new(self.pos_x, 380.0);
        graphics::circle(ctx, DrawMode::Fill, point, 100.0, 2.0)?;
        graphics::present(ctx);
        Ok(())
    }
ozkriff commented 6 years ago

Hmm, it's already written as one line in master: https://github.com/ggez/ggez.github.io/blob/master/src/index.liquid#L43

I don't know how deployment works here.