C# Class Nez.UI.ImageButton

A button with a child {@link Image} to display an image. This is useful when the button must be larger than the image and the image centered on the button. If the image is the size of the button, a {@link Button} without any children can be used, where the {@link Button.ButtonStyle#up}, {@link Button.ButtonStyle#down}, and {@link Button.ButtonStyle#checked} nine patches define the image.
Inheritance: Button
Mostra file Open project: prime31/Nez Class Usage Examples

Public Methods

Method Description
ImageButton ( IDrawable imageUp ) : System
ImageButton ( IDrawable imageUp, IDrawable imageDown ) : System
ImageButton ( IDrawable imageUp, IDrawable imageDown, IDrawable imageOver ) : System
ImageButton ( ImageButtonStyle style ) : System
ImageButton ( Skin skin, string styleName = null ) : System
draw ( Graphics graphics, float parentAlpha ) : void
getImage ( ) : Image
getImageCell ( ) : Cell
getStyle ( ) : ImageButtonStyle
setStyle ( ButtonStyle style ) : void

Private Methods

Method Description
updateImage ( ) : void

Method Details

ImageButton() public method

public ImageButton ( IDrawable imageUp ) : System
imageUp IDrawable
return System

ImageButton() public method

public ImageButton ( IDrawable imageUp, IDrawable imageDown ) : System
imageUp IDrawable
imageDown IDrawable
return System

ImageButton() public method

public ImageButton ( IDrawable imageUp, IDrawable imageDown, IDrawable imageOver ) : System
imageUp IDrawable
imageDown IDrawable
imageOver IDrawable
return System

ImageButton() public method

public ImageButton ( ImageButtonStyle style ) : System
style ImageButtonStyle
return System

ImageButton() public method

public ImageButton ( Skin skin, string styleName = null ) : System
skin Skin
styleName string
return System

draw() public method

public draw ( Graphics graphics, float parentAlpha ) : void
graphics Graphics
parentAlpha float
return void

getImage() public method

public getImage ( ) : Image
return Image

getImageCell() public method

public getImageCell ( ) : Cell
return Cell

getStyle() public method

public getStyle ( ) : ImageButtonStyle
return ImageButtonStyle

setStyle() public method

public setStyle ( ButtonStyle style ) : void
style ButtonStyle
return void