Permalink
Browse files

support for notice bubble color

  • Loading branch information...
1 parent a5eff1d commit 5b41e579def6514e406a6d480d2a16740c3523e2 Antoine Mercadal committed Mar 8, 2011
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -25,8 +25,9 @@
TNMessageViewAvatarPositionRight = @"TNMessageViewAvatarPositionRight";
TNMessageViewAvatarPositionLeft = @"TNMessageViewAvatarPositionLeft";
-TNMessageViewBubbleColorNormal = @"TNMessageViewBubbleColorNormal";
-TNMessageViewBubbleColorAlt = @"TNMessageViewBubbleColorAlt";
+TNMessageViewBubbleColorNormal = 1;
+TNMessageViewBubbleColorAlt = 2;
+TNMessageViewBubbleColorNotice = 3;
/*! CPView that contains information to display chat information
*/
@@ -123,7 +124,23 @@ TNMessageViewBubbleColorAlt = @"TNMessageViewBubbleColorAlt";
[_imageViewAvatar setImage:_imageDefaultAvatar];
var backgroundImage,
- backgroundFolder = (_bgColor == TNMessageViewBubbleColorNormal) ? @"Bubble" : @"BubbleAlt";
+ backgroundFolder;
+
+ switch (_bgColor)
+ {
+ case TNMessageViewBubbleColorNormal:
+ backgroundFolder = @"Bubble";
+ break;
+
+ case TNMessageViewBubbleColorAlt:
+ backgroundFolder = @"BubbleAlt";
+ break
+
+ case TNMessageViewBubbleColorNotice:
+ backgroundFolder = @"BubbleNotice";
+ break
+ }
+
if (_position == TNMessageViewAvatarPositionLeft)
backgroundImage = [CPColor colorWithPatternImage:[[CPNinePartImage alloc] initWithImageSlices:[
[[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:backgroundFolder + @"/1.png"] size:CPSizeMake(24.0, 14.0)],

0 comments on commit 5b41e57

Please sign in to comment.