Bastien Sevajol 3 年 前
コミット
74c4d50bea
共有1 個のファイルを変更した5 個の追加2 個の削除を含む
  1. 5 2
      src/main.rs

+ 5 - 2
src/main.rs ファイルの表示

@@ -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)?;