C# Class TowerAnimator.ColorPalette

Mostra file Open project: uiacm/tower_creator

Public Methods

Method Description
ColorPalette ( int squarePixelWidth, int numColumns ) : System
GetColor ( ) : Color

Gets the color of the currently hovered cell.

GetColor ( int row, int col ) : Color
GetImage ( ) : Image
SetColor ( Color c ) : void

Sets the color of the currently hovered cell.

SetColor ( int row, int col, Color c ) : void
SetHover ( int x, int y ) : void

This function assumes the canvas has not been scaled on screen, or that (x, y) has been appropriately scaled.

UnHover ( ) : void

Private Methods

Method Description
GenerateCanvas ( ) : void
GenerateSwatches ( ) : void

Method Details

ColorPalette() public method

public ColorPalette ( int squarePixelWidth, int numColumns ) : System
squarePixelWidth int
numColumns int
return System

GetColor() public method

Gets the color of the currently hovered cell.
public GetColor ( ) : Color
return Color

GetColor() public method

public GetColor ( int row, int col ) : Color
row int
col int
return Color

GetImage() public method

public GetImage ( ) : Image
return Image

SetColor() public method

Sets the color of the currently hovered cell.
public SetColor ( Color c ) : void
c Color
return void

SetColor() public method

public SetColor ( int row, int col, Color c ) : void
row int
col int
c Color
return void

SetHover() public method

This function assumes the canvas has not been scaled on screen, or that (x, y) has been appropriately scaled.
public SetHover ( int x, int y ) : void
x int Mouse location x.
y int Mouse location y.
return void

UnHover() public method

public UnHover ( ) : void
return void