Bastien Sevajol hace 3 años
padre
commit
74c4d50bea
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5 2
      src/main.rs

+ 5 - 2
src/main.rs Ver fichero

@@ -108,7 +108,8 @@ impl event::EventHandler for MainState {
108 108
 
109 109
         for scene_item in self.scene_items.iter() {
110 110
             let sprite_info = SpriteInfo::from_type(&scene_item.current_sprite_type);
111
-            let sprite_batch_part = sprite_batch_part_from_sprite_info(&sprite_info, self.i).dest(scene_item.position.clone());
111
+            let sprite_batch_part = sprite_batch_part_from_sprite_info(&sprite_info, self.i)
112
+                .dest(scene_item.position.clone());
112 113
             self.scene_items_sprite_batch.add(sprite_batch_part);
113 114
         }
114 115
         graphics::draw(
@@ -134,7 +135,9 @@ pub fn main() -> GameResult {
134 135
         path::PathBuf::from("./resources")
135 136
     };
136 137
 
137
-    let cb = ggez::ContextBuilder::new("oc", "bux").add_resource_path(resource_dir);
138
+    let cb = ggez::ContextBuilder::new("oc", "bux")
139
+        .add_resource_path(resource_dir)
140
+        .window_mode(ggez::conf::WindowMode::default().dimensions(800.0, 600.0));
138 141
     let (ctx, event_loop) = &mut cb.build()?;
139 142
 
140 143
     let state = &mut MainState::new(ctx)?;