1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 21:52:55 +08:00

Use dev build of framework, make some fixes

This commit is contained in:
tangalbert919 2019-01-06 21:53:54 -06:00
parent 48686bdb30
commit fc6f484244
12 changed files with 24 additions and 24 deletions

View File

@ -55,7 +55,7 @@ namespace osu.Game.Tests.Visual
linkColour = colours.Blue; linkColour = colours.Blue;
var chatManager = new ChannelManager(); var chatManager = new ChannelManager();
BindableCollection<Channel> availableChannels = (BindableCollection<Channel>)chatManager.AvailableChannels; BindableList<Channel> availableChannels = (BindableList<Channel>)chatManager.AvailableChannels;
availableChannels.Add(new Channel { Name = "#english"}); availableChannels.Add(new Channel { Name = "#english"});
availableChannels.Add(new Channel { Name = "#japanese" }); availableChannels.Add(new Channel { Name = "#japanese" });
Dependencies.Cache(chatManager); Dependencies.Cache(chatManager);

View File

@ -73,8 +73,8 @@ namespace osu.Game.Tests.Visual
{ {
public event Action RoomsUpdated; public event Action RoomsUpdated;
public readonly BindableCollection<Room> Rooms = new BindableCollection<Room>(); public readonly BindableList<Room> Rooms = new BindableList<Room>();
IBindableCollection<Room> IRoomManager.Rooms => Rooms; IBindableList<Room> IRoomManager.Rooms => Rooms;
public void CreateRoom(Room room, Action<Room> onSuccess = null, Action<string> onError = null) => Rooms.Add(room); public void CreateRoom(Room room, Action<Room> onSuccess = null, Action<string> onError = null) => Rooms.Add(room);

View File

@ -138,7 +138,7 @@ namespace osu.Game.Tests.Visual
public event Action RoomsUpdated; public event Action RoomsUpdated;
public IBindableCollection<Room> Rooms { get; } = null; public IBindableList<Room> Rooms { get; } = null;
public void CreateRoom(Room room, Action<Room> onSuccess = null, Action<string> onError = null) public void CreateRoom(Room room, Action<Room> onSuccess = null, Action<string> onError = null)
{ {

View File

@ -29,8 +29,8 @@ namespace osu.Game.Online.Chat
@"#lobby" @"#lobby"
}; };
private readonly BindableCollection<Channel> availableChannels = new BindableCollection<Channel>(); private readonly BindableList<Channel> availableChannels = new BindableList<Channel>();
private readonly BindableCollection<Channel> joinedChannels = new BindableCollection<Channel>(); private readonly BindableList<Channel> joinedChannels = new BindableList<Channel>();
/// <summary> /// <summary>
/// The currently opened channel /// The currently opened channel
@ -40,12 +40,12 @@ namespace osu.Game.Online.Chat
/// <summary> /// <summary>
/// The Channels the player has joined /// The Channels the player has joined
/// </summary> /// </summary>
public IBindableCollection<Channel> JoinedChannels => joinedChannels; public IBindableList<Channel> JoinedChannels => joinedChannels;
/// <summary> /// <summary>
/// The channels available for the player to join /// The channels available for the player to join
/// </summary> /// </summary>
public IBindableCollection<Channel> AvailableChannels => availableChannels; public IBindableList<Channel> AvailableChannels => availableChannels;
private IAPIProvider api; private IAPIProvider api;

View File

@ -37,10 +37,10 @@ namespace osu.Game.Online.Multiplayer
public RulesetInfo Ruleset { get; set; } public RulesetInfo Ruleset { get; set; }
[JsonIgnore] [JsonIgnore]
public readonly BindableCollection<Mod> AllowedMods = new BindableCollection<Mod>(); public readonly BindableList<Mod> AllowedMods = new BindableList<Mod>();
[JsonIgnore] [JsonIgnore]
public readonly BindableCollection<Mod> RequiredMods = new BindableCollection<Mod>(); public readonly BindableList<Mod> RequiredMods = new BindableList<Mod>();
[JsonProperty("beatmap")] [JsonProperty("beatmap")]
private APIBeatmap apiBeatmap { get; set; } private APIBeatmap apiBeatmap { get; set; }

View File

@ -24,7 +24,7 @@ namespace osu.Game.Online.Multiplayer
public Bindable<User> Host { get; private set; } = new Bindable<User>(); public Bindable<User> Host { get; private set; } = new Bindable<User>();
[JsonProperty("playlist")] [JsonProperty("playlist")]
public BindableCollection<PlaylistItem> Playlist { get; set; } = new BindableCollection<PlaylistItem>(); public BindableList<PlaylistItem> Playlist { get; set; } = new BindableList<PlaylistItem>();
[JsonProperty("channel_id")] [JsonProperty("channel_id")]
public Bindable<int> ChannelId { get; private set; } = new Bindable<int>(); public Bindable<int> ChannelId { get; private set; } = new Bindable<int>();

View File

@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
private FillFlowContainer letterboxSettings; private FillFlowContainer letterboxSettings;
private Bindable<bool> letterboxing; //private Bindable<bool> letterboxing;
private Bindable<Size> sizeFullscreen; private Bindable<Size> sizeFullscreen;
private OsuGameBase game; private OsuGameBase game;
@ -32,7 +32,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
{ {
this.game = game; this.game = game;
letterboxing = config.GetBindable<bool>(FrameworkSetting.Letterboxing); //letterboxing = config.GetBindable<bool>(FrameworkSetting.Letterboxing);
sizeFullscreen = config.GetBindable<Size>(FrameworkSetting.SizeFullscreen); sizeFullscreen = config.GetBindable<Size>(FrameworkSetting.SizeFullscreen);
Container resolutionSettingsContainer; Container resolutionSettingsContainer;
@ -52,7 +52,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
new SettingsCheckbox new SettingsCheckbox
{ {
LabelText = "Letterboxing", LabelText = "Letterboxing",
Bindable = letterboxing, //Bindable = letterboxing,
}, },
letterboxSettings = new FillFlowContainer letterboxSettings = new FillFlowContainer
{ {
@ -68,13 +68,13 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
new SettingsSlider<double> new SettingsSlider<double>
{ {
LabelText = "Horizontal position", LabelText = "Horizontal position",
Bindable = config.GetBindable<double>(FrameworkSetting.LetterboxPositionX), //Bindable = config.GetBindable<double>(FrameworkSetting.LetterboxPositionX),
KeyboardStep = 0.01f KeyboardStep = 0.01f
}, },
new SettingsSlider<double> new SettingsSlider<double>
{ {
LabelText = "Vertical position", LabelText = "Vertical position",
Bindable = config.GetBindable<double>(FrameworkSetting.LetterboxPositionY), //Bindable = config.GetBindable<double>(FrameworkSetting.LetterboxPositionY),
KeyboardStep = 0.01f KeyboardStep = 0.01f
}, },
} }
@ -105,14 +105,14 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
}, true); }, true);
} }
letterboxing.BindValueChanged(isVisible => /*letterboxing.BindValueChanged(isVisible =>
{ {
letterboxSettings.ClearTransforms(); letterboxSettings.ClearTransforms();
letterboxSettings.AutoSizeAxes = isVisible ? Axes.Y : Axes.None; letterboxSettings.AutoSizeAxes = isVisible ? Axes.Y : Axes.None;
if (!isVisible) if (!isVisible)
letterboxSettings.ResizeHeightTo(0, transition_duration, Easing.OutQuint); letterboxSettings.ResizeHeightTo(0, transition_duration, Easing.OutQuint);
}, true); }, true);*/
} }
private IReadOnlyList<Size> getResolutions() private IReadOnlyList<Size> getResolutions()

View File

@ -18,7 +18,7 @@ namespace osu.Game.Screens.Multi
/// <summary> /// <summary>
/// All the active <see cref="Room"/>s. /// All the active <see cref="Room"/>s.
/// </summary> /// </summary>
IBindableCollection<Room> Rooms { get; } IBindableList<Room> Rooms { get; }
/// <summary> /// <summary>
/// Creates a new <see cref="Room"/>. /// Creates a new <see cref="Room"/>.

View File

@ -22,7 +22,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
private readonly Bindable<Room> selectedRoom = new Bindable<Room>(); private readonly Bindable<Room> selectedRoom = new Bindable<Room>();
public IBindable<Room> SelectedRoom => selectedRoom; public IBindable<Room> SelectedRoom => selectedRoom;
private readonly IBindableCollection<Room> rooms = new BindableCollection<Room>(); private readonly IBindableList<Room> rooms = new BindableList<Room>();
private readonly FillFlowContainer<DrawableRoom> roomFlow; private readonly FillFlowContainer<DrawableRoom> roomFlow;
public IReadOnlyList<DrawableRoom> Rooms => roomFlow; public IReadOnlyList<DrawableRoom> Rooms => roomFlow;

View File

@ -86,7 +86,7 @@ namespace osu.Game.Screens.Multi
public readonly Bindable<User> Host = new Bindable<User>(); public readonly Bindable<User> Host = new Bindable<User>();
public readonly Bindable<RoomStatus> Status = new Bindable<RoomStatus>(); public readonly Bindable<RoomStatus> Status = new Bindable<RoomStatus>();
public readonly Bindable<GameType> Type = new Bindable<GameType>(); public readonly Bindable<GameType> Type = new Bindable<GameType>();
public readonly BindableCollection<PlaylistItem> Playlist = new BindableCollection<PlaylistItem>(); public readonly BindableList<PlaylistItem> Playlist = new BindableList<PlaylistItem>();
public readonly Bindable<IEnumerable<User>> Participants = new Bindable<IEnumerable<User>>(); public readonly Bindable<IEnumerable<User>> Participants = new Bindable<IEnumerable<User>>();
public readonly Bindable<int> ParticipantCount = new Bindable<int>(); public readonly Bindable<int> ParticipantCount = new Bindable<int>();
public readonly Bindable<int?> MaxParticipants = new Bindable<int?>(); public readonly Bindable<int?> MaxParticipants = new Bindable<int?>();

View File

@ -21,8 +21,8 @@ namespace osu.Game.Screens.Multi
{ {
public event Action RoomsUpdated; public event Action RoomsUpdated;
private readonly BindableCollection<Room> rooms = new BindableCollection<Room>(); private readonly BindableList<Room> rooms = new BindableList<Room>();
public IBindableCollection<Room> Rooms => rooms; public IBindableList<Room> Rooms => rooms;
private Room currentRoom; private Room currentRoom;

View File

@ -18,7 +18,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="ppy.osu.Framework" Version="2018.1226.0" /> <PackageReference Include="ppy.osu.Framework" Version="0.0.7879" />
<PackageReference Include="SharpCompress" Version="0.22.0" /> <PackageReference Include="SharpCompress" Version="0.22.0" />
<PackageReference Include="NUnit" Version="3.11.0" /> <PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="SharpRaven" Version="2.4.0" /> <PackageReference Include="SharpRaven" Version="2.4.0" />