mirror of
https://github.com/osukey/osukey.git
synced 2025-05-26 07:57:32 +09:00
Fix additional bugs, tweak L+F
This commit is contained in:
parent
8d4a211419
commit
6da092ab30
@ -56,13 +56,13 @@ namespace osu.Game.Database
|
|||||||
var beatmapSet = new BeatmapSetInfo
|
var beatmapSet = new BeatmapSetInfo
|
||||||
{
|
{
|
||||||
BeatmapSetID = metadata.BeatmapSetID,
|
BeatmapSetID = metadata.BeatmapSetID,
|
||||||
|
Beatmaps = new List<BeatmapInfo>(),
|
||||||
Path = path,
|
Path = path,
|
||||||
Hash = hash,
|
Hash = hash,
|
||||||
};
|
};
|
||||||
|
connection.Insert(metadata);
|
||||||
beatmapSet.Metadata = metadata;
|
beatmapSet.Metadata = metadata;
|
||||||
connection.Insert(beatmapSet);
|
connection.Insert(beatmapSet);
|
||||||
connection.Insert(metadata);
|
|
||||||
var maps = new List<BeatmapInfo>();
|
|
||||||
using (var reader = ArchiveReader.GetReader(storage, path))
|
using (var reader = ArchiveReader.GetReader(storage, path))
|
||||||
{
|
{
|
||||||
string[] mapNames = reader.ReadBeatmaps();
|
string[] mapNames = reader.ReadBeatmaps();
|
||||||
@ -73,9 +73,10 @@ namespace osu.Game.Database
|
|||||||
var decoder = BeatmapDecoder.GetDecoder(stream);
|
var decoder = BeatmapDecoder.GetDecoder(stream);
|
||||||
Beatmap beatmap = decoder.Decode(stream);
|
Beatmap beatmap = decoder.Decode(stream);
|
||||||
beatmap.BeatmapInfo.Path = name;
|
beatmap.BeatmapInfo.Path = name;
|
||||||
|
beatmap.BeatmapInfo.BeatmapSetID = beatmapSet.BeatmapSetID;
|
||||||
// TODO: Diff beatmap metadata with set metadata and leave it here if necessary
|
// TODO: Diff beatmap metadata with set metadata and leave it here if necessary
|
||||||
beatmap.BeatmapInfo.Metadata = null;
|
beatmap.BeatmapInfo.Metadata = null;
|
||||||
maps.Add(beatmap.BeatmapInfo);
|
beatmapSet.Beatmaps.Add(beatmap.BeatmapInfo);
|
||||||
connection.Insert(beatmap.BeatmapInfo);
|
connection.Insert(beatmap.BeatmapInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public int BeatmapID { get; set; }
|
public int BeatmapID { get; set; }
|
||||||
[ForeignKey(typeof(BeatmapSetInfo)), NotNull]
|
[ForeignKey(typeof(BeatmapSetInfo))]
|
||||||
public int BeatmapSetID { get; set; }
|
public int BeatmapSetID { get; set; }
|
||||||
[ManyToOne]
|
[ManyToOne]
|
||||||
public BeatmapSetInfo BeatmapSet { get; set; }
|
public BeatmapSetInfo BeatmapSet { get; set; }
|
||||||
|
@ -24,6 +24,7 @@ namespace osu.Game.GameModes.Play
|
|||||||
public event Action<BeatmapSetInfo> SetSelected;
|
public event Action<BeatmapSetInfo> SetSelected;
|
||||||
public event Action<BeatmapSetInfo, BeatmapInfo> BeatmapSelected;
|
public event Action<BeatmapSetInfo, BeatmapInfo> BeatmapSelected;
|
||||||
public BeatmapSetInfo BeatmapSet;
|
public BeatmapSetInfo BeatmapSet;
|
||||||
|
private BeatmapSetBox setBox;
|
||||||
private FlowContainer topContainer;
|
private FlowContainer topContainer;
|
||||||
private FlowContainer difficulties;
|
private FlowContainer difficulties;
|
||||||
private bool collapsed;
|
private bool collapsed;
|
||||||
@ -48,6 +49,11 @@ namespace osu.Game.GameModes.Play
|
|||||||
topContainer.Remove(difficulties);
|
topContainer.Remove(difficulties);
|
||||||
else
|
else
|
||||||
topContainer.Add(difficulties);
|
topContainer.Add(difficulties);
|
||||||
|
setBox.BorderColour = new Color4(
|
||||||
|
setBox.BorderColour.R,
|
||||||
|
setBox.BorderColour.G,
|
||||||
|
setBox.BorderColour.B,
|
||||||
|
collapsed ? 0 : 255);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +70,7 @@ namespace osu.Game.GameModes.Play
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Size = new Vector2(1, 0),
|
Size = new Vector2(1, 0),
|
||||||
Direction = FlowDirection.VerticalOnly,
|
Direction = FlowDirection.VerticalOnly,
|
||||||
Children = new[] { new BeatmapSetBox(beatmapSet) }
|
Children = new[] { setBox = new BeatmapSetBox(beatmapSet) }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
difficulties = new FlowContainer // Deliberately not added to children
|
difficulties = new FlowContainer // Deliberately not added to children
|
||||||
@ -96,6 +102,10 @@ namespace osu.Game.GameModes.Play
|
|||||||
this.beatmapSet = beatmapSet;
|
this.beatmapSet = beatmapSet;
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Size = new Vector2(1, 0);
|
Size = new Vector2(1, 0);
|
||||||
|
Masking = true;
|
||||||
|
CornerRadius = 5;
|
||||||
|
BorderThickness = 2;
|
||||||
|
BorderColour = new Color4(221, 255, 255, 0);
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
|
@ -56,30 +56,41 @@ namespace osu.Game.GameModes.Play
|
|||||||
|
|
||||||
public PlaySongSelect()
|
public PlaySongSelect()
|
||||||
{
|
{
|
||||||
const float backgroundWidth = 0.6f;
|
const float scrollWidth = 500;
|
||||||
const float backgroundSlant = 25;
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Size = new Vector2(1),
|
||||||
|
Padding = new MarginPadding { Right = scrollWidth - 100 },
|
||||||
|
Children = new[]
|
||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Size = new Vector2(backgroundWidth, 0.5f),
|
Size = new Vector2(1, 0.5f),
|
||||||
Colour = new Color4(0, 0, 0, 0.5f),
|
Colour = new Color4(0, 0, 0, 0.5f),
|
||||||
|
Shear = new Vector2(0.15f, 0),
|
||||||
},
|
},
|
||||||
new Box
|
new Box
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
RelativePositionAxes = Axes.Y,
|
|
||||||
Size = new Vector2(backgroundWidth, 0.5f),
|
|
||||||
Position = new Vector2(0, 0.5f),
|
|
||||||
Colour = new Color4(0, 0, 0, 0.5f),
|
|
||||||
},
|
|
||||||
scrollContainer = new ScrollContainer
|
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
RelativePositionAxes = Axes.Both,
|
RelativePositionAxes = Axes.Both,
|
||||||
Size = new Vector2(0.5f, 1),
|
Size = new Vector2(1, 0.5f),
|
||||||
Position = new Vector2(0.5f, 0),
|
Position = new Vector2(0, 0.5f),
|
||||||
|
Colour = new Color4(0, 0, 0, 0.5f),
|
||||||
|
// TODO: Figure out the inverse shear problem
|
||||||
|
//Shear = new Vector2(-0.15f, 0),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scrollContainer = new ScrollContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Y,
|
||||||
|
Size = new Vector2(scrollWidth, 1),
|
||||||
|
Anchor = Anchor.CentreRight,
|
||||||
|
Origin = Anchor.CentreRight,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
setList = new FlowContainer
|
setList = new FlowContainer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user