- (void)setCustomCursorStyle {
ByteWhiteBoardCursorInfo* laserCursorInfo = [[ByteWhiteBoardCursorInfo alloc] init];
NSString* laserImagePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"Images/cursor_laser.png"];
UIImage* image = [UIImage imageWithContentsOfFile:laserImagePath];
laserCursorInfo.width = image.size.width/2;
laserCursorInfo.height = image.size.height/2;
laserCursorInfo.centerX = laserCursorInfo.width/2;
laserCursorInfo.centerY = laserCursorInfo.height/2;
laserCursorInfo.iconPath = laserImagePath;
ByteWhiteBoardCursorInfo* penCursorInfo = [[ByteWhiteBoardCursorInfo alloc] init];
NSString* penImagePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"Images/cursor_pen.png"];
image = [UIImage imageWithContentsOfFile:penImagePath];
penCursorInfo.width = image.size.width/2;
penCursorInfo.height = image.size.height/2;
penCursorInfo.centerX = 0;
penCursorInfo.centerY = penCursorInfo.height;
penCursorInfo.iconPath = penImagePath;
ByteWhiteBoardCursorInfo* normalCursorInfo = [[ByteWhiteBoardCursorInfo alloc] init];
NSString* normalImagePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"Images/cursor_normal.png"];
image = [UIImage imageWithContentsOfFile:normalImagePath];
normalCursorInfo.width = image.size.width/2;
normalCursorInfo.height = image.size.height/2;
normalCursorInfo.centerX = 0;
normalCursorInfo.centerY = 0;
normalCursorInfo.iconPath = normalImagePath;
ByteWhiteBoardCursorInfo* eraserCursorInfo = [[ByteWhiteBoardCursorInfo alloc] init];
NSString* eraserImagePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"Images/cursor_eraser.png"];
image = [UIImage imageWithContentsOfFile:eraserImagePath];
eraserCursorInfo.width = image.size.width/2;
eraserCursorInfo.height = image.size.height/2;
eraserCursorInfo.centerX = eraserCursorInfo.width/2;
eraserCursorInfo.centerY = eraserCursorInfo.height/2;
eraserCursorInfo.iconPath = eraserImagePath;
ByteWhiteBoardCursorInfo* shapeCursorInfo = [[ByteWhiteBoardCursorInfo alloc] init];
NSString* shapeImagePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"Images/cursor_shape.png"];
image = [UIImage imageWithContentsOfFile:shapeImagePath];
shapeCursorInfo.width = image.size.width/2;
shapeCursorInfo.height = image.size.height/2;
shapeCursorInfo.centerX = shapeCursorInfo.width/2;
shapeCursorInfo.centerY = shapeCursorInfo.height/2;
shapeCursorInfo.iconPath = shapeImagePath;
ByteWhiteBoardCursorInfo* textCursorInfo = [[ByteWhiteBoardCursorInfo alloc] init];
NSString* textImagePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"Images/cursor_text.png"];
image = [UIImage imageWithContentsOfFile:textImagePath];
textCursorInfo.width = image.size.width/2;
textCursorInfo.height = image.size.height/2;
textCursorInfo.centerX = textCursorInfo.width/2;
textCursorInfo.centerY = textCursorInfo.height/2;
textCursorInfo.iconPath = textImagePath;
NSDictionary* styleConfig = @{[NSString stringWithFormat:@"%ld", ByteWhiteBoardCursorTypeNormal] : normalCursorInfo,
[NSString stringWithFormat:@"%ld", ByteWhiteBoardCursorTypePen] : penCursorInfo,
[NSString stringWithFormat:@"%ld", ByteWhiteBoardCursorTypeShape] : shapeCursorInfo,
[NSString stringWithFormat:@"%ld", ByteWhiteBoardCursorTypeText] : textCursorInfo,
[NSString stringWithFormat:@"%ld", ByteWhiteBoardCursorTypeErase] : earserCursorInfo,
[NSString stringWithFormat:@"%ld", ByteWhiteBoardCursorTypeLaser] : laserCursorInfo};
[self.board setCursorStyle:styleConfig];