main menu layout changes

Slighty changed black bars height
Put now playing text near the controls
Changed amount of beatmaps available sentence
This commit is contained in:
yugecin 2018-06-25 23:28:30 +02:00
parent c356d75def
commit 11fd501a1e
No known key found for this signature in database
GPG Key ID: 2C5AC035A7068E44
3 changed files with 15 additions and 12 deletions

View File

@ -240,10 +240,11 @@ public class MainMenu extends BaseOpsuState {
// top/bottom horizontal bars
float oldAlpha = Colors.BLACK_ALPHA.a;
Colors.BLACK_ALPHA.a = 0.2f;
Colors.BLACK_ALPHA.a = 0.4f;
g.setColor(Colors.BLACK_ALPHA);
g.fillRect(0, 0, width, height / 9f);
g.fillRect(0, height * 8 / 9f, width, height / 9f);
final float barheight = height * 0.1125f;
g.fillRect(0, 0, width, barheight);
g.fillRect(0, height - barheight, width, barheight);
Colors.BLACK_ALPHA.a = oldAlpha;
// draw star fountain
@ -274,7 +275,8 @@ public class MainMenu extends BaseOpsuState {
}
float ghostScale = logo.getLastScale() / scale * 1.05f;
Image ghostLogo = GameImage.MENU_LOGO.getImage().getScaledCopy(ghostScale);
ghostLogo.drawCentered(logo.getX(), logo.getY(), Colors.GHOST_LOGO);
ghostLogo.setAlpha(0.25f);
ghostLogo.drawCentered(logo.getX(), logo.getY(), color);
// draw music buttons
if (MusicController.isPlaying())
@ -325,8 +327,12 @@ public class MainMenu extends BaseOpsuState {
float marginX = width * 0.015f, topMarginY = height * 0.01f, bottomMarginY = height * 0.015f;
g.setFont(Fonts.MEDIUM);
float lineHeight = Fonts.MEDIUM.getLineHeight() * 0.925f;
g.drawString(String.format("Loaded %d songs and %d beatmaps.",
BeatmapSetList.get().getMapSetCount(), BeatmapSetList.get().getMapCount()), marginX, topMarginY);
final String beatmapText = String.format(
"You have %d beatmaps (%d songs) available!",
BeatmapSetList.get().getMapCount(),
BeatmapSetList.get().getMapSetCount()
);
g.drawString(beatmapText, marginX, topMarginY);
if (MusicController.isTrackLoading()) {
g.drawString("Track loading...", marginX, topMarginY + lineHeight);
} else if (MusicController.trackExists()) {

View File

@ -561,10 +561,8 @@ public class SongMenu extends ComplexOpsuState {
footerLogoButton.draw(Color.white, 1f - expand);
Image ghostLogo = GameImage.MENU_LOGO.getImage();
ghostLogo = ghostLogo.getScaledCopy((1f + expand) * footerLogoSize / ghostLogo.getWidth());
float oldGhostAlpha = Colors.GHOST_LOGO.a;
Colors.GHOST_LOGO.a *= (1f - position);
ghostLogo.drawCentered(footerLogoButton.getX(), footerLogoButton.getY(), Colors.GHOST_LOGO);
Colors.GHOST_LOGO.a = oldGhostAlpha;
ghostLogo.setAlpha(0.25f * (1f - position));
ghostLogo.drawCentered(footerLogoButton.getX(), footerLogoButton.getY());
}
// header

View File

@ -53,8 +53,7 @@ public class Colors {
BUB_WHITE = new Color(220, 220, 220),
BUB_PURPLE = new Color(94, 46, 149),
BUB_RED = new Color(141, 49, 16),
BUB_ORANGE = new Color(138, 72, 51),
GHOST_LOGO = new Color(1.0f, 1.0f, 1.0f, 0.25f);
BUB_ORANGE = new Color(138, 72, 51);
// This class should not be instantiated.
private Colors() {}