draw the logo in the bottom right corner of the songmenu
This commit is contained in:
parent
22d3ee1b32
commit
8c172dc15f
|
@ -126,8 +126,6 @@ public class MainMenu extends BasicGameState {
|
|||
private Input input;
|
||||
private final int state;
|
||||
|
||||
private final Color logoGhostColor = new Color(1.0f, 1.0f, 1.0f, 0.15f);
|
||||
|
||||
public MainMenu(int state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
@ -286,7 +284,7 @@ public class MainMenu extends BasicGameState {
|
|||
Image logoCopy = GameImage.MENU_LOGO.getImage().getScaledCopy(logo.getCurrentScale() / (float) scale * 1.05f);
|
||||
scaleposmodx = logoCopy.getWidth() / 2;
|
||||
scaleposmody = logoCopy.getHeight() / 2;
|
||||
logoCopy.draw(logo.getX() - scaleposmodx, logo.getY() - scaleposmody, logoGhostColor);
|
||||
logoCopy.draw(logo.getX() - scaleposmodx, logo.getY() - scaleposmody, Colors.GHOST_LOGO);
|
||||
} else {
|
||||
logo.draw();
|
||||
}
|
||||
|
|
|
@ -259,6 +259,9 @@ public class SongMenu extends BasicGameState {
|
|||
/** Header and footer end and start y coordinates, respectively. */
|
||||
private float headerY, footerY;
|
||||
|
||||
/** Height of the footer */
|
||||
private float footerHeight;
|
||||
|
||||
/** Time, in milliseconds, for fading the search bar. */
|
||||
private int searchTransitionTimer = SEARCH_TRANSITION_TIME;
|
||||
|
||||
|
@ -334,6 +337,7 @@ public class SongMenu extends BasicGameState {
|
|||
Fonts.BOLD.getLineHeight() + Fonts.DEFAULT.getLineHeight() +
|
||||
Fonts.SMALL.getLineHeight();
|
||||
footerY = height - GameImage.SELECTION_MODS.getImage().getHeight();
|
||||
footerHeight = height - footerY;
|
||||
|
||||
// initialize sorts
|
||||
for (BeatmapSortOrder sort : BeatmapSortOrder.values())
|
||||
|
@ -506,6 +510,24 @@ public class SongMenu extends BasicGameState {
|
|||
g.drawLine(0, footerY, width, footerY);
|
||||
g.resetLineWidth();
|
||||
|
||||
// opsu logo in bottom bar
|
||||
Image logo = GameImage.MENU_LOGO.getImage();
|
||||
float logoSize = footerHeight * 2f;
|
||||
logo = logo.getScaledCopy(logoSize / logo.getWidth());
|
||||
Double position = MusicController.getBeatProgress();
|
||||
float x = width - footerHeight * 0.60f;
|
||||
float y = height - footerHeight * 0.40f;
|
||||
if (position != null) {
|
||||
Image ghostLogo = logo.getScaledCopy((float) (1 - (0 - position) * 0.075));
|
||||
logo = logo.getScaledCopy((float) (1 - (position) * 0.075));
|
||||
logoSize = logo.getWidth();
|
||||
logo.draw(x - logoSize / 2, y - logoSize / 2);
|
||||
logoSize = ghostLogo.getWidth();
|
||||
ghostLogo.draw(x - logoSize / 2, y - logoSize / 2, Colors.GHOST_LOGO);
|
||||
} else {
|
||||
logo.draw(x - logoSize / 2, y - logoSize / 2);
|
||||
}
|
||||
|
||||
// header
|
||||
if (focusNode != null) {
|
||||
// music/loader icon
|
||||
|
|
|
@ -45,7 +45,9 @@ public class Colors {
|
|||
BLUE_SCOREBOARD = new Color(133, 208, 212),
|
||||
BLACK_BG_NORMAL = new Color(0, 0, 0, 0.25f),
|
||||
BLACK_BG_HOVER = new Color(0, 0, 0, 0.5f),
|
||||
BLACK_BG_FOCUS = new Color(0, 0, 0, 0.75f);
|
||||
BLACK_BG_FOCUS = new Color(0, 0, 0, 0.75f),
|
||||
GHOST_LOGO = new Color(1.0f, 1.0f, 1.0f, 0.15f);
|
||||
|
||||
|
||||
// This class should not be instantiated.
|
||||
private Colors() {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user