-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Use new footer for daily challenge #29165
base: master
Are you sure you want to change the base?
Conversation
You can't seriously PR this sort of stuff and expect it to be merged... Why isn't this fixed? Do you seriously believe I'd push something this obviously broken live? I'll look into fixing but dear lord. It's a different thing when something's broken on already live UI components, and another when you're pushing UI breakage where there was none before. |
Didn't find a solution at the time, so left it in OP. It uses padding for positioning the deselect button, so you would need to update that every frame somehow. Maybe a better solution is just not to resize the "free mods" button? That's easier to do. |
This was my original proposal which hasn't yet been acted on. |
Where was this and who's supposed to be acting on it? I'd like to move fast on this if possible because dear lord am I sick of the indolence when attempting to push any sort of design change. |
Go for it. I don't think anyone's acting on it. https://discord.com/channels/188630481301012481/188630652340404224/1260510586442354759 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping I could just fix the free mods button thing and move on but the structure on this is pretty tragic to the point wherein I feel like I need to put a stop to this before things escalate too far to badness of a scale which I do not wish to deal with later
public void AppearFromLeft(double delay) | ||
{ | ||
Content.FinishTransforms(); | ||
Content.MoveToX(-300f) | ||
.FadeOut() | ||
.Delay(delay) | ||
.MoveToX(0f, 240, Easing.OutCubic) | ||
.FadeIn(240, Easing.OutCubic); | ||
} | ||
|
||
public void AppearFromBottom() | ||
{ | ||
Content.FinishTransforms(); | ||
Content.MoveToY(100f) | ||
.FadeOut() | ||
.MoveToY(0f, 240, Easing.OutCubic) | ||
.FadeIn(240, Easing.OutCubic); | ||
} | ||
|
||
public void DisappearToRight(bool expire) | ||
{ | ||
Content.FinishTransforms(); | ||
Content.FadeOut(240, Easing.InOutCubic) | ||
.MoveToX(300f, 360, Easing.InOutCubic); | ||
|
||
if (expire) | ||
this.Delay(Content.LatestTransformEndTime - Time.Current).Expire(); | ||
} | ||
|
||
public void DisappearToBottom(bool expire) | ||
{ | ||
Content.FinishTransforms(); | ||
Content.FadeOut(240, Easing.InOutCubic) | ||
.MoveToY(100f, 240, Easing.InOutCubic); | ||
|
||
if (expire) | ||
this.Delay(Content.LatestTransformEndTime - Time.Current).Expire(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have so many questions. Like:
- Why is this here?
- Why are transforms being applied to
Content
? - Why do these have
expire
bool flags? - Why is this button trying to apply transforms to itself rather than the footer animating it?
I guess ScreenFooterButton
also does this, which I argue is just as bad? And the fact that this is starting to spread means that it's even worse?
tagging in @frenzibyte since you authored that other stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll answer these set of questions for ScreenFooterButton
, I don't agree with this existing here.
- In
ScreenFooterButton
context, the button is used exclusively by the footer, so it's either/or whether the animation is defined by the footer or placed in the footer button itself (but it was suggested to put the animation in the button, see Add basic animation to new footer and buttons #28184 (comment)) - Because the
ScreenFooterButton
may be placed in a fill flow, at which point the animation will be interrupted by the flow layout code. Compare this to the existence ofTopLevelContent
inModSelectColumn
to animate it, but I expect you to say it's different because the component is exposing it for the overlay to explicitly apply animation to it, I dunno. - I suppose you're asking this because I can supposedly do
button.Expire()
from the footer and it'll still expire after the animation is applied, but no, because the animation is applied onContent
notthis
. - Add basic animation to new footer and buttons #28184 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok well as long as you can delete this stuff from ShearedButton
I'll look away from ScreenFooterButton
.
// TODO: this should take the screen's colourProvider instead. hardcode plum for now as daily challenge is the only usage shown to users | ||
[Cached] | ||
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Aquamarine); | ||
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Plum); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sort of kicking the can down the road does not inspire confidence, what is the plan with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the ScreenFooter
anywhere other than song select is not something I wanted to happen immediately, I was in the mindset of "we'll cross that bridge when we get to it". But the daily challenge screen came, and I think it's a great idea to try the screen footer there, to resolve the issue of seeing which mods are currently selected, but there are minor concerns like this that I would hope to be left out until follow-up PRs that aim to get the new song select live.
I will try to see if I can address this alongside what I had mentioned in #29165 (comment) already, though.
private void makeLeftButtonAppearFromLeft(ScreenFooterButton button, int index, int count, float startDelay) | ||
=> button.AppearFromLeft(startDelay + (count - index) * delay_per_button); | ||
|
||
private void makeButtonAppearFromBottom(ScreenFooterButton button, int index) | ||
private void makeLeftButtonAppearFromBottom(ScreenFooterButton button, int index) | ||
=> button.AppearFromBottom(index * delay_per_button); | ||
|
||
private void makeButtonDisappearToRight(ScreenFooterButton button, int index, int count, bool expire) | ||
private void makeLeftButtonDisappearToRight(ScreenFooterButton button, int index, int count, bool expire) | ||
=> button.DisappearToRight((count - index) * delay_per_button, expire); | ||
|
||
private void makeButtonDisappearToBottom(ScreenFooterButton button, int index, int count, bool expire) | ||
private void makeLeftButtonDisappearToBottom(ScreenFooterButton button, int index, int count, bool expire) | ||
=> button.DisappearToBottom((count - index) * delay_per_button, expire); | ||
|
||
private void makeRightButtonAppearFromLeft(ShearedButton button, float startDelay) | ||
=> button.AppearFromLeft(startDelay); | ||
|
||
private void makeRightButtonAppearFromBottom(ShearedButton button) | ||
=> button.AppearFromBottom(); | ||
|
||
private void makeRightButtonDisappearToRight(ShearedButton button, bool expire) | ||
=> button.DisappearToRight(expire); | ||
|
||
private void makeRightButtonDisappearToBottom(ShearedButton button, bool expire) | ||
=> button.DisappearToBottom(expire); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh and this is also pretty terrible but i am hoping that if the buttons can stop animating themselves for whatever reason we can just get rid of this entire block
Regarding the deselect button, I agree that it feels weird, but maybe it's just because it's out of place there? |
Disagree. Before you had buttons on the left, non-button content on the right. Your proposal mixes it so it's buttons - not buttons - button again. |
I'd argue it's thematically separated in the edit, general UI left, and mod select specific UI right |
I'd definitely personally agree when taking into account where the user would expect it to be that it's best to have the deselect button on the right, grouped with the rest of the mod-related info/items, as compared to floating somewhere on the left |
Another reply, I'm sorry, but having the button to the bottom right just feels right to me. It's where you'll find the Cancel/OK button on pretty much every OS. Additionally, having the information on the left and the input element on the right is way more common than the other way around. Finally, the button on the bottom right feels properly anchored, whereas the current button is just kind of there, floating in space. For me, the only thing in favour of the current position is that it's close to the Mods button, so you don't have to move the cursor very far to quickly open the Mods menu and deselect everything. |
} | ||
} | ||
|
||
public void SetRightButton(ShearedButton? button) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is absolutely not how I imagined this to be implemented.
The direction this PR is heading with the footer code is quite opposite to what I envisioned. A discussion in discord at least would've been nice before you head with this diff. Main issues to point out:
I'll look into this the upcoming days and put what I have in mind into code. |
Loosely needed for #29163, so there's feedback that the mods are applied.
The mod display overlap is not the best, but neither is having more dead space on the bottom. Added enough padding so that the actual content is still readable.
Restricted to one right button for the footer as it's already wide in the designs, and I believe we only need one. For multiplayer, we can probably use the left buttons for spectate/timer or somewhere else.
Kapture.2024-07-28.at.00.25.39.mp4
Known issues: