Added a separate Game Mods menu.
- Replaces the mods being shown in the options menu. - Added all the (base) mod icons to the menu, with the unimplemented ones grayed out. - Added a rotation effect to MenuButton, and now multiple effects can be set at once. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -213,8 +213,7 @@ public class Utils {
|
||||
}
|
||||
|
||||
// initialize game mods
|
||||
for (GameMod mod : GameMod.values())
|
||||
mod.init(width, height);
|
||||
GameMod.init(width, height);
|
||||
|
||||
// initialize hit objects
|
||||
OsuHitObject.init(width, height);
|
||||
@@ -281,6 +280,34 @@ public class Utils {
|
||||
anim.draw(x - (anim.getWidth() / 2f), y - (anim.getHeight() / 2f));
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws an image at the given location.
|
||||
* @param img the image to draw
|
||||
* @param x the x coordinate
|
||||
* @param y the y coordinate
|
||||
* @param color the color filter to apply
|
||||
*/
|
||||
public static void draw(Image img, float x, float y, Color color) {
|
||||
if (color == null)
|
||||
img.draw(x, y);
|
||||
else
|
||||
img.draw(x, y, color);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws an animation at the given location.
|
||||
* @param anim the animation to draw
|
||||
* @param x the x coordinate
|
||||
* @param y the y coordinate
|
||||
* @param color the color filter to apply
|
||||
*/
|
||||
public static void draw(Animation anim, float x, float y, Color color) {
|
||||
if (color == null)
|
||||
anim.draw(x, y);
|
||||
else
|
||||
anim.draw(x, y, color);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a bounded value for a base value and displacement.
|
||||
* @param base the initial value
|
||||
|
||||
Reference in New Issue
Block a user