rust/lib-hedgewars-engine/src/render/atlas.rs
changeset 15286 16bd389fc735
parent 15190 e2adb40c7988
child 15759 c929e25a7da2
equal deleted inserted replaced
15285:6382a14c9e83 15286:16bd389fc735
   248             }
   248             }
   249             self.consume_index()
   249             self.consume_index()
   250         }
   250         }
   251     }
   251     }
   252 
   252 
       
   253     pub fn get_rect(&self, index: SpriteIndex) -> Option<(u32, Rect)> {
       
   254         self.rects.get(index as usize).cloned()
       
   255     }
       
   256 
   253     pub fn used_space(&self) -> String {
   257     pub fn used_space(&self) -> String {
   254         self.atlases
   258         self.atlases
   255             .iter()
   259             .iter()
   256             .enumerate()
   260             .enumerate()
   257             .map(|(i, a)| format!("{}: {:?}", i, a.used_space()))
   261             .map(|(i, a)| format!("{}: {:?}", i, a.used_space()))