Changeset 989 for trunk/macosx/PiecesView.m
- Timestamp:
- Oct 6, 2006, 8:45:59 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/PiecesView.m
r988 r989 63 63 [fWhitePiece unlockFocus]; 64 64 65 // greenbox image66 f GreenPiece = [[NSImage alloc] initWithSize: size];67 68 [f GreenPiece lockFocus];69 [[NSColor colorWithCalibratedRed: 0. 557 green: 0.992 blue: 0.639alpha: 1.0] set];70 [bp fill]; 71 [f GreenPiece unlockFocus];72 73 // greenbox image65 //blue box image 66 fBluePiece = [[NSImage alloc] initWithSize: size]; 67 68 [fBluePiece lockFocus]; 69 [[NSColor colorWithCalibratedRed: 0.35 green: 0.65 blue: 1.0 alpha: 1.0] set]; 70 [bp fill]; 71 [fBluePiece unlockFocus]; 72 73 //red box image 74 74 fRedPiece = [[NSImage alloc] initWithSize: size]; 75 75 … … 79 79 [fRedPiece unlockFocus]; 80 80 81 // blue1 box image82 f Blue1Piece = [[NSImage alloc] initWithSize: size];83 84 [f Blue1Piece lockFocus];85 [[NSColor colorWithCalibratedRed: 0.6 82 green: 0.839 blue: 1.0alpha: 1.0] set];86 [bp fill]; 87 [f Blue1Piece unlockFocus];88 89 // blue2 box image90 f Blue2Piece = [[NSImage alloc] initWithSize: size];91 92 [f Blue2Piece lockFocus];93 [[NSColor colorWithCalibratedRed: 0. 506 green: 0.745 blue: 1.0alpha: 1.0] set];94 [bp fill]; 95 [f Blue2Piece unlockFocus];96 97 // blue3 box image98 f Blue3Piece = [[NSImage alloc] initWithSize: size];99 100 [f Blue3Piece lockFocus];101 [[NSColor colorWithCalibratedRed: 0. 35 green: 0.65 blue: 1.0alpha: 1.0] set];102 [bp fill]; 103 [f Blue3Piece unlockFocus];81 //green 1 box image 82 fGreen1Piece = [[NSImage alloc] initWithSize: size]; 83 84 [fGreen1Piece lockFocus]; 85 [[NSColor colorWithCalibratedRed: 0.6 green: 1.0 blue: 0.8 alpha: 1.0] set]; 86 [bp fill]; 87 [fGreen1Piece unlockFocus]; 88 89 //green 2 box image 90 fGreen2Piece = [[NSImage alloc] initWithSize: size]; 91 92 [fGreen2Piece lockFocus]; 93 [[NSColor colorWithCalibratedRed: 0.4 green: 1.0 blue: 0.6 alpha: 1.0] set]; 94 [bp fill]; 95 [fGreen2Piece unlockFocus]; 96 97 //green 3 box image 98 fGreen3Piece = [[NSImage alloc] initWithSize: size]; 99 100 [fGreen3Piece lockFocus]; 101 [[NSColor colorWithCalibratedRed: 0.0 green: 1.0 blue: 0.4 alpha: 1.0] set]; 102 [bp fill]; 103 [fGreen3Piece unlockFocus]; 104 104 105 105 //actually draw the box … … 114 114 [fWhitePiece release]; 115 115 [fRedPiece release]; 116 [f GreenPiece release];117 [f Blue1Piece release];118 [f Blue2Piece release];119 [f Blue3Piece release];116 [fBluePiece release]; 117 [fGreen1Piece release]; 118 [fGreen2Piece release]; 119 [fGreen3Piece release]; 120 120 121 121 if (fTorrent) … … 197 197 { 198 198 fPieces[index] = -1; 199 pieceImage = f GreenPiece;199 pieceImage = fBluePiece; 200 200 } 201 201 else if (fPieces[index] != -1) … … 219 219 { 220 220 fPieces[index] = 1; 221 pieceImage = f Blue1Piece;221 pieceImage = fGreen1Piece; 222 222 } 223 223 } … … 227 227 { 228 228 fPieces[index] = 2; 229 pieceImage = f Blue2Piece;229 pieceImage = fGreen2Piece; 230 230 } 231 231 } … … 235 235 { 236 236 fPieces[index] = 3; 237 pieceImage = f Blue3Piece;237 pieceImage = fGreen3Piece; 238 238 } 239 239 }
Note: See TracChangeset
for help on using the changeset viewer.