mirror of
https://github.com/SpaceManiac/SpacemanDMM.git
synced 2025-12-23 05:36:47 +00:00
Fix minimap rendering of single-image icons
This commit is contained in:
parent
104501a7ae
commit
9d7ba0735d
1 changed files with 3 additions and 0 deletions
|
|
@ -62,6 +62,9 @@ impl IconFile {
|
|||
}
|
||||
|
||||
pub fn rect_of(&self, icon_state: &str, dir: i32) -> Option<Rect> {
|
||||
if self.metadata.states.is_empty() {
|
||||
return Some((0, 0, self.image.width, self.image.height))
|
||||
}
|
||||
let state_index = match self.metadata.state_names.get(icon_state) {
|
||||
Some(&i) => i,
|
||||
None if icon_state == "" => 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue