Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back button #244

Merged
merged 13 commits into from
Feb 2, 2017
Merged

Back button #244

merged 13 commits into from
Feb 2, 2017

Conversation

yugecin
Copy link
Contributor

@yugecin yugecin commented Feb 1, 2017

I like the default back button in osu!, so I made it for opsu! :)

At BackButton.java:83 I check if the back button is skinned by looking at the size of the image, as the commented line above it doesn't seem to work like I thought it would, not sure why.

@itdelatrisu
Copy link
Owner

Looks great! :) Thanks again!

Could you pull the latest opsu! commits into this?

Comments:

  • The reason the commented line doesn't work is because MENU_BACK isn't set to be preloaded, and nothing loads the image before you call hasGameSkinImage(). You should just set the preload flag in GameImage.java: (note - I added this constructor a few commits down from where you branched)
MENU_BACK ("menu-back", "menu-back-%d", "png", false, true),
  • The chevron in osu! pulses differently from the logo -- it's an in-out movement instead of exactly "pulsing" on the beat. I think this would look closer, feel free to adjust it though:
float t = (beatProgress < 0.5f) ?
	AnimationEquation.OUT_BACK.calc(beatProgress * 2f) :
	1f - AnimationEquation.LINEAR.calc((beatProgress - 0.5f) * 2f);
int chevronSize = (int) (chevronBaseSize - (isHovered ? 6f : 3f) * t);

@yugecin
Copy link
Contributor Author

yugecin commented Feb 2, 2017

Should be ready to go :)
Didn't notice the chevron, I changed it to IN_QUAD & OUT_BACK

@itdelatrisu itdelatrisu merged commit 1614e9a into itdelatrisu:master Feb 2, 2017
itdelatrisu added a commit that referenced this pull request Feb 2, 2017
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
@itdelatrisu
Copy link
Owner

Tweaked it a bit more, still not accurate but I tried.

@yugecin yugecin deleted the backbutton branch February 2, 2017 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants