mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 04:05:35 +08:00
Merge pull request #882 from peppy/update-framework
Update in line with framework
This commit is contained in:
commit
2c438e6a8e
@ -1 +1 @@
|
||||
Subproject commit 0f3db5da09d0e7c4d2ef3057030e018f34ba536e
|
||||
Subproject commit e5f0cf73c1e0bbcbd04194bf175d73af47fc850a
|
@ -37,11 +37,10 @@ namespace osu.Game.Graphics.UserInterface
|
||||
this.inputManager = inputManager;
|
||||
}
|
||||
|
||||
protected override bool OnFocus(InputState state)
|
||||
protected override void OnFocus(InputState state)
|
||||
{
|
||||
var result = base.OnFocus(state);
|
||||
base.OnFocus(state);
|
||||
BorderThickness = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
protected override void OnFocusLost(InputState state)
|
||||
@ -56,6 +55,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
base.OnFocusLost(state);
|
||||
}
|
||||
|
||||
public override bool RequestingFocus => HoldFocus;
|
||||
public override bool RequestsFocus => HoldFocus;
|
||||
}
|
||||
}
|
||||
|
@ -45,11 +45,10 @@ namespace osu.Game.Graphics.UserInterface
|
||||
BorderColour = colour.Yellow;
|
||||
}
|
||||
|
||||
protected override bool OnFocus(InputState state)
|
||||
protected override void OnFocus(InputState state)
|
||||
{
|
||||
BorderThickness = 3;
|
||||
|
||||
return base.OnFocus(state);
|
||||
base.OnFocus(state);
|
||||
}
|
||||
|
||||
protected override void OnFocusLost(InputState state)
|
||||
|
@ -167,11 +167,15 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool OnFocus(InputState state)
|
||||
public override bool AcceptsFocus => true;
|
||||
|
||||
protected override bool OnClick(InputState state) => true;
|
||||
|
||||
protected override void OnFocus(InputState state)
|
||||
{
|
||||
//this is necessary as inputTextBox is masked away and therefore can't get focus :(
|
||||
InputManager.ChangeFocus(inputTextBox);
|
||||
return false;
|
||||
base.OnFocus(state);
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
|
@ -98,7 +98,7 @@ namespace osu.Game.Overlays
|
||||
new ScrollContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ScrollDraggerVisible = false,
|
||||
ScrollbarVisible = false,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new FillFlowContainer
|
||||
@ -187,10 +187,14 @@ namespace osu.Game.Overlays
|
||||
panels.Children = BeatmapSets.Select(b => displayStyle == PanelDisplayStyle.Grid ? (DirectPanel)new DirectGridPanel(b) { Width = 400 } : new DirectListPanel(b));
|
||||
}
|
||||
|
||||
protected override bool OnFocus(InputState state)
|
||||
public override bool AcceptsFocus => true;
|
||||
|
||||
protected override bool OnClick(InputState state) => true;
|
||||
|
||||
protected override void OnFocus(InputState state)
|
||||
{
|
||||
InputManager.ChangeFocus(filter.Search);
|
||||
return false;
|
||||
base.OnFocus(state);
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
|
@ -135,7 +135,7 @@ namespace osu.Game.Overlays.Music
|
||||
|
||||
private bool matching = true;
|
||||
|
||||
public bool MatchingCurrentFilter
|
||||
public bool MatchingFilter
|
||||
{
|
||||
set
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Overlays.Music
|
||||
}
|
||||
}
|
||||
|
||||
public BeatmapSetInfo FirstVisibleSet => items.Children.FirstOrDefault(i => i.MatchingCurrentFilter)?.BeatmapSetInfo;
|
||||
public BeatmapSetInfo FirstVisibleSet => items.Children.FirstOrDefault(i => i.MatchingFilter)?.BeatmapSetInfo;
|
||||
|
||||
private void itemSelected(BeatmapSetInfo b)
|
||||
{
|
||||
@ -75,7 +75,7 @@ namespace osu.Game.Overlays.Music
|
||||
private class ItemSearchContainer : FillFlowContainer<PlaylistItem>, IHasFilterableChildren
|
||||
{
|
||||
public string[] FilterTerms => new string[] { };
|
||||
public bool MatchingCurrentFilter
|
||||
public bool MatchingFilter
|
||||
{
|
||||
set
|
||||
{
|
||||
|
@ -166,10 +166,14 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
if (form != null) inputManager.ChangeFocus(form);
|
||||
}
|
||||
|
||||
protected override bool OnFocus(InputState state)
|
||||
public override bool AcceptsFocus => true;
|
||||
|
||||
protected override bool OnClick(InputState state) => true;
|
||||
|
||||
protected override void OnFocus(InputState state)
|
||||
{
|
||||
if (form != null) inputManager.ChangeFocus(form);
|
||||
return base.OnFocus(state);
|
||||
base.OnFocus(state);
|
||||
}
|
||||
|
||||
private class LoginForm : FillFlowContainer
|
||||
@ -235,10 +239,13 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
};
|
||||
}
|
||||
|
||||
protected override bool OnFocus(InputState state)
|
||||
public override bool AcceptsFocus => true;
|
||||
|
||||
protected override bool OnClick(InputState state) => true;
|
||||
|
||||
protected override void OnFocus(InputState state)
|
||||
{
|
||||
Schedule(() => { inputManager.ChangeFocus(string.IsNullOrEmpty(username.Text) ? username : password); });
|
||||
return base.OnFocus(state);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ namespace osu.Game.Overlays.Settings
|
||||
|
||||
public string[] FilterTerms => new[] { LabelText };
|
||||
|
||||
public bool MatchingCurrentFilter
|
||||
public bool MatchingFilter
|
||||
{
|
||||
set
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Overlays.Settings
|
||||
|
||||
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
|
||||
public string[] FilterTerms => new[] { Header };
|
||||
public bool MatchingCurrentFilter
|
||||
public bool MatchingFilter
|
||||
{
|
||||
set
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Settings
|
||||
|
||||
public IEnumerable<IFilterable> FilterableChildren => Children.OfType<IFilterable>();
|
||||
public string[] FilterTerms => new[] { Header };
|
||||
public bool MatchingCurrentFilter
|
||||
public bool MatchingFilter
|
||||
{
|
||||
set
|
||||
{
|
||||
|
@ -138,10 +138,14 @@ namespace osu.Game.Overlays
|
||||
InputManager.ChangeFocus(null);
|
||||
}
|
||||
|
||||
protected override bool OnFocus(InputState state)
|
||||
public override bool AcceptsFocus => true;
|
||||
|
||||
protected override bool OnClick(InputState state) => true;
|
||||
|
||||
protected override void OnFocus(InputState state)
|
||||
{
|
||||
InputManager.ChangeFocus(searchTextBox);
|
||||
return false;
|
||||
base.OnFocus(state);
|
||||
}
|
||||
|
||||
private class SettingsSectionsContainer : SectionsContainer
|
||||
@ -159,7 +163,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
public SettingsSectionsContainer()
|
||||
{
|
||||
ScrollContainer.ScrollDraggerVisible = false;
|
||||
ScrollContainer.ScrollbarVisible = false;
|
||||
Add(headerBackground = new Box
|
||||
{
|
||||
Colour = Color4.Black,
|
||||
|
@ -74,7 +74,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
scrollContainer = new ScrollContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
ScrollDraggerVisible = false,
|
||||
ScrollbarVisible = false,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
scrollFlow = new FillFlowContainer<LeaderboardScore>
|
||||
|
Loading…
Reference in New Issue
Block a user