8000 Remove `fixupTextBox` by stanriders · Pull Request #274 · ppy/osu-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove fixupTextBox #274

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

Merged
merged 2 commits into from
Jun 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions PerformanceCalculatorGUI/Screens/SimulateScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Framework.Logging;
using osu.Framework.Threading;
using osu.Game.Configuration;
Expand Down Expand Up @@ -503,8 +501,6 @@ private void load(OsuColour osuColour)
new Dimension(),
new Dimension(GridSizeMode.AutoSize)
};

fixupTextBox(beatmapIdTextBox);
}
});

Expand Down Expand Up @@ -851,9 +847,6 @@ private void updateAccuracyParams(bool useFullScoreData)
new Dimension(GridSizeMode.AutoSize)
}
};

fixupTextBox(goodsTextBox);
fixupTextBox(mehsTextBox);
}
else
{
Expand All @@ -864,19 +857,9 @@ private void updateAccuracyParams(bool useFullScoreData)
new Dimension(GridSizeMode.Absolute),
new Dimension(GridSizeMode.AutoSize)
};

fixupTextBox(accuracyTextBox);
}
}

private void fixupTextBox(LabelledTextBox textbox)
{
// This is a hack around TextBox's way of updating layout and positioning of text
// It can only be triggered by a couple of input events and there's no way to invalidate it from the outside
// See: https://github.com/ppy/osu-framework/blob/fd5615732033c5ea650aa5cabc8595883a2b63f5/osu.Framework/Graphics/UserInterface/TextBox.cs#L528
textbox.TriggerEvent(new FocusEvent(new InputState(), this));
}

private void resetMods()
{
// This is temporary solution to the UX problem that people would usually want to calculate classic scores, but classic and lazer scores have different max combo
Expand Down Expand Up @@ -1113,11 +1096,7 @@ private void updateMissesTextboxes()
{
missesContainer.Content = new[] { new[] { missesTextBox, largeTickMissesTextBox, sliderTailMissesTextBox } };
missesContainer.ColumnDimensions = [new Dimension(), new Dimension(), new Dimension()];
fixupTextBox(largeTickMissesTextBox);
fixupTextBox(sliderTailMissesTextBox);
}

fixupTextBox(missesTextBox);
}
}
}
Expand Down
Loading
0