update indev version
This commit is contained in:
parent
0bf317dd6d
commit
143ef1e285
7 changed files with 49 additions and 51 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use servicepoint::{Bitmap, CharGrid, CharGridMutExt, TILE_SIZE, WindowMut};
|
||||
use servicepoint::{Bitmap, CharGrid, CharGridMutExt, Grid, GridMut, TILE_SIZE, WindowMut};
|
||||
|
||||
pub type BorderPattern = [bool; TILE_SIZE];
|
||||
|
||||
|
|
@ -6,8 +6,8 @@ pub const OUTER_BORDER: BorderPattern = [false, false, false, true, true, false,
|
|||
pub const INNER_BORDER: BorderPattern = [false, false, false, true, true, false, false, false];
|
||||
|
||||
pub fn draw_border_panel<'c, 'b>(
|
||||
mut chars: WindowMut<'c, char, CharGrid>,
|
||||
mut bitmap: WindowMut<'b, bool, Bitmap>,
|
||||
chars: &'c mut WindowMut<char, CharGrid>,
|
||||
bitmap: &'b mut WindowMut<bool, Bitmap>,
|
||||
label: &str,
|
||||
border_pattern: BorderPattern,
|
||||
) -> (WindowMut<'c, char, CharGrid>, WindowMut<'b, bool, Bitmap>) {
|
||||
|
|
@ -77,17 +77,15 @@ pub fn draw_border_panel<'c, 'b>(
|
|||
}
|
||||
}
|
||||
|
||||
let (chars, _) = chars.split_horizontal_mut(tile_width - 1).unwrap();
|
||||
let (_, chars) = chars.split_horizontal_mut(1).unwrap();
|
||||
let (chars, _) = chars.split_vertical_mut(tile_height - 1).unwrap();
|
||||
let (_, chars) = chars.split_vertical_mut(1).unwrap();
|
||||
|
||||
let (bitmap, _) = bitmap
|
||||
.split_horizontal_mut(pixel_width - TILE_SIZE)
|
||||
let chars = chars
|
||||
.window_mut(1..tile_width - 1, 1..tile_height - 1)
|
||||
.unwrap();
|
||||
let bitmap = bitmap
|
||||
.window_mut(
|
||||
TILE_SIZE..tile_width - TILE_SIZE,
|
||||
TILE_SIZE..tile_height - TILE_SIZE,
|
||||
)
|
||||
.unwrap();
|
||||
let (_, bitmap) = bitmap.split_horizontal_mut(TILE_SIZE).unwrap();
|
||||
let (bitmap, _) = bitmap.split_vertical_mut(pixel_height - TILE_SIZE).unwrap();
|
||||
let (_, bitmap) = bitmap.split_vertical_mut(TILE_SIZE).unwrap();
|
||||
|
||||
(chars, bitmap)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue