Changeset 988


Ignore:
Timestamp:
Oct 6, 2006, 8:10:15 PM (15 years ago)
Author:
livings124
Message:

In the pieces view, pieces will briefly turn red before becoming green.

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r987 r988  
    393393        height = TAB_ACTIVITY_HEIGHT;
    394394       
    395         [fPiecesView updateView: NO];
     395        [fPiecesView updateView: YES];
    396396    }
    397397    else if ([identifier isEqualToString: TAB_PEERS_IDENT])
  • trunk/macosx/PiecesView.h

    r959 r988  
    3030    int8_t  * fPieces;
    3131   
    32     NSImage * fBack, * fWhitePiece, * fGreenPiece,
     32    NSImage * fBack, * fWhitePiece, * fGreenPiece, * fRedPiece,
    3333            * fBlue1Piece, * fBlue2Piece, * fBlue3Piece;
    3434   
  • trunk/macosx/PiecesView.m

    r980 r988  
    7171        [fGreenPiece unlockFocus];
    7272       
     73        //green box image
     74        fRedPiece = [[NSImage alloc] initWithSize: size];
     75       
     76        [fRedPiece lockFocus];
     77        [[NSColor redColor] set];
     78        [bp fill];
     79        [fRedPiece unlockFocus];
     80       
    7381        //blue 1 box image
    7482        fBlue1Piece = [[NSImage alloc] initWithSize: size];
    7583       
    7684        [fBlue1Piece lockFocus];
    77         [[NSColor colorWithCalibratedRed: 0.777 green: 0.906 blue: 1.0 alpha: 1.0] set];
     85        [[NSColor colorWithCalibratedRed: 0.682 green: 0.839 blue: 1.0 alpha: 1.0] set];
    7886        [bp fill];
    7987        [fBlue1Piece unlockFocus];
     
    8391       
    8492        [fBlue2Piece lockFocus];
    85         [[NSColor colorWithCalibratedRed: 0.682 green: 0.839 blue: 1.0 alpha: 1.0] set];
     93        [[NSColor colorWithCalibratedRed: 0.506 green: 0.745 blue: 1.0 alpha: 1.0] set];
    8694        [bp fill];
    8795        [fBlue2Piece unlockFocus];
     
    9199       
    92100        [fBlue3Piece lockFocus];
    93         [[NSColor colorWithCalibratedRed: 0.506 green: 0.745 blue: 1.0 alpha: 1.0] set];
     101        [[NSColor colorWithCalibratedRed: 0.35 green: 0.65 blue: 1.0 alpha: 1.0] set];
    94102        [bp fill];
    95103        [fBlue3Piece unlockFocus];
     
    105113    [fBack release];
    106114    [fWhitePiece release];
     115    [fRedPiece release];
    107116    [fGreenPiece release];
    108117    [fBlue1Piece release];
     
    182191           
    183192            pieceImage = nil;
    184            
    185193            piece = pieces[index];
    186194            if (piece < 0)
    187195            {
    188                 if (first || fPieces[index] != -1)
     196                if (first || fPieces[index] == -2)
    189197                {
    190198                    fPieces[index] = -1;
    191199                    pieceImage = fGreenPiece;
    192200                }
     201                else if (fPieces[index] != -1)
     202                {
     203                    fPieces[index] = -2;
     204                    pieceImage = fRedPiece;
     205                }
     206                else;
    193207            }
    194208            else if (piece == 0)
Note: See TracChangeset for help on using the changeset viewer.