mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 04:12:56 +08:00
Always select text when an editor slider-textbox is focused
This commit is contained in:
parent
ebca2e4b4f
commit
dcdb8d13a9
@ -85,11 +85,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
ScheduleAfterChildren(() =>
|
ScheduleAfterChildren(() => xInput.TakeFocus());
|
||||||
{
|
|
||||||
xInput.TakeFocus();
|
|
||||||
xInput.SelectAll();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
|
@ -96,11 +96,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
ScheduleAfterChildren(() =>
|
ScheduleAfterChildren(() => angleInput.TakeFocus());
|
||||||
{
|
|
||||||
angleInput.TakeFocus();
|
|
||||||
angleInput.SelectAll();
|
|
||||||
});
|
|
||||||
angleInput.Current.BindValueChanged(angle => rotationInfo.Value = rotationInfo.Value with { Degrees = angle.NewValue });
|
angleInput.Current.BindValueChanged(angle => rotationInfo.Value = rotationInfo.Value with { Degrees = angle.NewValue });
|
||||||
|
|
||||||
rotationHandler.CanRotateAroundSelectionOrigin.BindValueChanged(e =>
|
rotationHandler.CanRotateAroundSelectionOrigin.BindValueChanged(e =>
|
||||||
|
@ -139,11 +139,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
ScheduleAfterChildren(() =>
|
ScheduleAfterChildren(() => scaleInput.TakeFocus());
|
||||||
{
|
|
||||||
scaleInput.TakeFocus();
|
|
||||||
scaleInput.SelectAll();
|
|
||||||
});
|
|
||||||
scaleInput.Current.BindValueChanged(scale => scaleInfo.Value = scaleInfo.Value with { Scale = scale.NewValue });
|
scaleInput.Current.BindValueChanged(scale => scaleInfo.Value = scaleInfo.Value with { Scale = scale.NewValue });
|
||||||
|
|
||||||
xCheckBox.Current.BindValueChanged(_ =>
|
xCheckBox.Current.BindValueChanged(_ =>
|
||||||
|
@ -74,6 +74,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
textBox = new LabelledTextBox
|
textBox = new LabelledTextBox
|
||||||
{
|
{
|
||||||
Label = labelText,
|
Label = labelText,
|
||||||
|
SelectAllOnFocus = true,
|
||||||
},
|
},
|
||||||
slider = new SettingsSlider<T>
|
slider = new SettingsSlider<T>
|
||||||
{
|
{
|
||||||
@ -92,8 +93,6 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
|||||||
|
|
||||||
public bool TakeFocus() => GetContainingFocusManager()?.ChangeFocus(textBox) == true;
|
public bool TakeFocus() => GetContainingFocusManager()?.ChangeFocus(textBox) == true;
|
||||||
|
|
||||||
public bool SelectAll() => textBox.SelectAll();
|
|
||||||
|
|
||||||
private bool updatingFromTextBox;
|
private bool updatingFromTextBox;
|
||||||
|
|
||||||
private void textChanged(ValueChangedEvent<string> change)
|
private void textChanged(ValueChangedEvent<string> change)
|
||||||
|
Loading…
Reference in New Issue
Block a user