Java Code Examples for com.watabou.noosa.ui.Component#height()

The following examples show how to use com.watabou.noosa.ui.Component#height() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScrollPane.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 5 votes vote down vote up
public ScrollPane( Component content ) {
	super();
	
	this.content = content;
	addToBack( content );
	
	width = content.width();
	height = content.height();
	
	content.camera = new Camera( 0, 0, 1, 1, PixelScene.defaultZoom );
	Camera.add( content.camera );
}
 
Example 2
Source File: ScrollPane.java    From unleashed-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
public ScrollPane( Component content ) {
	super();
	
	this.content = content;
	addToBack( content );
	
	width = content.width();
	height = content.height();
	
	content.camera = new Camera( 0, 0, 1, 1, PixelScene.defaultZoom );
	Camera.add( content.camera );
}
 
Example 3
Source File: ScrollPane.java    From pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
public ScrollPane( Component content ) {
	super();
	
	this.content = content;
	addToBack( content );
	
	width = content.width();
	height = content.height();
	
	content.camera = new Camera( 0, 0, 1, 1, PixelScene.defaultZoom );
	Camera.add( content.camera );
}
 
Example 4
Source File: ScrollPane.java    From shattered-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
public ScrollPane( Component content ) {
	super();

	this.content = content;
	addToBack( content );

	width = content.width();
	height = content.height();

	content.camera = new Camera( 0, 0, 1, 1, PixelScene.defaultZoom );
	Camera.add( content.camera );
}
 
Example 5
Source File: HBox.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
private float yAlign(Component c) {
    switch (vAlign) {
        case Top:
            return top();
        case Bottom:
            return bottom() - c.height();
        case Center:
            return top() + (height() - c.height())/2;
    }
    return y;
}
 
Example 6
Source File: ScrollPane.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
public ScrollPane( Component content ) {
	super();

	this.content = content;
	addToBack( content );
	
	width = content.width();
	height = content.height();
	
	content.camera = new Camera( 0, 0, 1, 1, PixelScene.defaultZoom );
	Camera.add( content.camera );
}
 
Example 7
Source File: ScrollPane.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 5 votes vote down vote up
public ScrollPane( Component content ) {
	super();

	this.content = content;
	addToBack( content );

	width = content.width();
	height = content.height();

	content.camera = new Camera( 0, 0, 1, 1, PixelScene.defaultZoom );
	Camera.add( content.camera );
}