Changeset 6099
- Timestamp:
- Jun 9, 2008, 10:44:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/PiecesView.m
r6098 r6099 25 25 #import "PiecesView.h" 26 26 #import "InfoWindowController.h" 27 #import "CTGradient.h" 27 28 28 29 #define MAX_ACROSS 18 … … 33 34 - (void) awakeFromNib 34 35 { 35 NSBezierPath * bp = [NSBezierPath bezierPathWithRect: [self bounds]];36 37 36 //back image 38 37 fBack = [[NSImage alloc] initWithSize: [self bounds].size]; 39 38 40 39 [fBack lockFocus]; 41 [[NSColor colorWithCalibratedWhite: 0.0 alpha: 0.4] set]; 42 [bp fill]; 40 CTGradient * gradient = [CTGradient gradientWithBeginningColor: [NSColor colorWithCalibratedWhite: 0.0 alpha: 0.4] 41 endingColor: [NSColor colorWithCalibratedWhite: 0.25 alpha: 0.4]]; 42 [gradient fillRect: [self bounds] angle: 90.0]; 43 43 [fBack unlockFocus]; 44 44 … … 144 144 } 145 145 146 int i, j, piece, index = -1; 147 float piecePercent; 146 int i, j, index = -1; 148 147 NSRect rect = NSMakeRect(0, 0, fWidth, fWidth); 149 148 … … 163 162 164 163 if (showAvailablity) 165 { 166 piece = pieces[index];167 if (piece < 0)164 {if (index==0) NSLog(@"%d", pieces[index]); 165 int piece = pieces[index]; 166 if (piece == -1) 168 167 { 169 168 if (first || fPieces[index] == -2) … … 213 212 } 214 213 else 215 { 216 piecePercent = piecesPercent[index];214 {if (index==0) NSLog(@"%f", piecesPercent[index]); 215 float piecePercent = piecesPercent[index]; 217 216 if (piecePercent >= 1.0) 218 217 { … … 229 228 else; 230 229 } 231 else if (piecePercent <= 0.0)230 else if (piecePercent == 0.0) 232 231 { 233 232 if (first || fPieces[index] != 0)
Note: See TracChangeset
for help on using the changeset viewer.