C# Class Nez.UI.Window

A table that can be dragged and resized. The top padding is used as the window's title height. The preferred size of a window is the preferred size of the title text and the children as laid out by the table. After adding children to the window, it can be convenient to call {@link #pack()} to size the window to the size of the children.
Inheritance: Table, IInputListener
Show file Open project: prime31/Nez

Public Methods

Method Description
Window ( string title, Skin skin, string styleName = null ) : System
Window ( string title, WindowStyle style ) : System
draw ( Graphics graphics, float parentAlpha ) : void
getPrefWidth ( ) : float
getStyle ( ) : WindowStyle

Returns the window's style. Modifying the returned style may not have an effect until {@link #setStyle(WindowStyle)} is called

getTitleLabel ( ) : Label
getTitleTable ( ) : Table
hit ( Vector2 point ) : Element
isDragging ( ) : bool
isMovable ( ) : bool
isResizable ( ) : bool
keepWithinStage ( ) : void
setKeepWithinStage ( bool keepWithinStage ) : Window
setMovable ( bool isMovable ) : Window
setResizable ( bool isResizable ) : Window
setResizeBorderSize ( int resizeBorderSize ) : Window
setStyle ( WindowStyle style ) : void

Protected Methods

Method Description
drawBackground ( Graphics graphics, float parentAlpha, float x, float y ) : void
drawStageBackground ( Graphics graphics, float parentAlpha, float x, float y, float width, float height ) : void
positionChanged ( ) : void
sizeChanged ( ) : void

Private Methods

Method Description
IInputListener ( Vector2 mousePos ) : bool
IInputListener ( int mouseWheelDelta ) : bool
IInputListener ( ) : void
IInputListener ( Vector2 mousePos ) : void

Method Details

Window() public method

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

Window() public method

public Window ( string title, WindowStyle style ) : System
title string
style WindowStyle
return System

draw() public method

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

drawBackground() protected method

protected drawBackground ( Graphics graphics, float parentAlpha, float x, float y ) : void
graphics Graphics
parentAlpha float
x float
y float
return void

drawStageBackground() protected method

protected drawStageBackground ( Graphics graphics, float parentAlpha, float x, float y, float width, float height ) : void
graphics Graphics
parentAlpha float
x float
y float
width float
height float
return void

getPrefWidth() public method

public getPrefWidth ( ) : float
return float

getStyle() public method

Returns the window's style. Modifying the returned style may not have an effect until {@link #setStyle(WindowStyle)} is called
public getStyle ( ) : WindowStyle
return WindowStyle

getTitleLabel() public method

public getTitleLabel ( ) : Label
return Label

getTitleTable() public method

public getTitleTable ( ) : Table
return Table

hit() public method

public hit ( Vector2 point ) : Element
point Vector2
return Element

isDragging() public method

public isDragging ( ) : bool
return bool

isMovable() public method

public isMovable ( ) : bool
return bool

isResizable() public method

public isResizable ( ) : bool
return bool

keepWithinStage() public method

public keepWithinStage ( ) : void
return void

positionChanged() protected method

protected positionChanged ( ) : void
return void

setKeepWithinStage() public method

public setKeepWithinStage ( bool keepWithinStage ) : Window
keepWithinStage bool
return Window

setMovable() public method

public setMovable ( bool isMovable ) : Window
isMovable bool
return Window

setResizable() public method

public setResizable ( bool isResizable ) : Window
isResizable bool
return Window

setResizeBorderSize() public method

public setResizeBorderSize ( int resizeBorderSize ) : Window
resizeBorderSize int
return Window

setStyle() public method

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

sizeChanged() protected method

protected sizeChanged ( ) : void
return void