Merge remote-tracking branch 'orgin/master' into omaster

Conflicts:
	src/itdelatrisu/opsu/GameImage.java
	src/itdelatrisu/opsu/OsuGroupNode.java
This commit is contained in:
fd
2015-02-17 22:49:19 -05:00
27 changed files with 803 additions and 404 deletions

View File

@@ -82,7 +82,8 @@ public class Utils {
COLOR_GREEN = new Color(137, 201, 79),
COLOR_LIGHT_ORANGE = new Color(255,192,128),
COLOR_LIGHT_GREEN = new Color(128,255,128),
COLOR_LIGHT_BLUE = new Color(128,128,255);
COLOR_LIGHT_BLUE = new Color(128,128,255),
COLOR_GREEN_SEARCH = new Color(173, 255, 47);
/** The default map colors, used when a map does not provide custom colors. */
public static final Color[] DEFAULT_COMBO = {
@@ -212,19 +213,11 @@ public class Utils {
}
// initialize game mods
for (GameMod mod : GameMod.values())
mod.init(width, height);
// initialize sorts
for (SongSort sort : SongSort.values())
sort.init(width, height);
GameMod.init(width, height);
// initialize hit objects
OsuHitObject.init(width, height);
// initialize score data buttons
ScoreData.init(width, height);
// initialize download nodes
DownloadNode.init(width, height);
@@ -297,6 +290,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
@@ -901,4 +922,4 @@ public class Utils {
list.add(str);
return list;
}
}
}