Java Code Examples for org.newdawn.slick.Animation#getWidth()
The following examples show how to use
org.newdawn.slick.Animation#getWidth() .
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: MenuButton.java From opsu-dance with GNU General Public License v3.0 | 5 votes |
/** * Creates a new button from an Animation. * @param anim the animation * @param x the center x coordinate * @param y the center y coordinate */ public MenuButton(Animation anim, float x, float y) { this.anim = anim; this.x = x; this.y = y; this.xRadius = anim.getWidth() / 2f; this.yRadius = anim.getHeight() / 2f; }
Example 2
Source File: MenuButton.java From opsu with GNU General Public License v3.0 | 5 votes |
/** * Creates a new button from an Animation. * @param anim the animation * @param x the center x coordinate * @param y the center y coordinate */ public MenuButton(Animation anim, float x, float y) { this.anim = anim; this.x = x; this.y = y; this.xRadius = anim.getWidth() / 2f; this.yRadius = anim.getHeight() / 2f; }