mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Improve appearance
This commit is contained in:
parent
5da6f11a14
commit
bd6d3f1473
@ -132,19 +132,35 @@ namespace osu.Game.Tournament.Components
|
||||
|
||||
if (found != null)
|
||||
{
|
||||
BorderThickness = 6;
|
||||
|
||||
switch (found.Team)
|
||||
{
|
||||
case TeamColour.Red:
|
||||
Colour = Color4.Red;
|
||||
BorderColour = Color4.Red;
|
||||
break;
|
||||
case TeamColour.Blue:
|
||||
Colour = Color4.Blue;
|
||||
BorderColour = Color4.Blue;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (found.Type)
|
||||
{
|
||||
case ChoiceType.Pick:
|
||||
Colour = Color4.White;
|
||||
Alpha = 1;
|
||||
break;
|
||||
case ChoiceType.Ban:
|
||||
Colour = Color4.Gray;
|
||||
Alpha = 0.5f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Colour = Color4.White;
|
||||
BorderThickness = 0;
|
||||
Alpha = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ using osu.Game.Tournament.Components;
|
||||
using osu.Game.Tournament.IPC;
|
||||
using osu.Game.Tournament.Screens.Ladder.Components;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Input;
|
||||
|
||||
namespace osu.Game.Tournament.Screens.MapPool
|
||||
@ -75,7 +76,14 @@ namespace osu.Game.Tournament.Screens.MapPool
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Text = "Blue Pick",
|
||||
Action = () => setMode(TeamColour.Blue, ChoiceType.Pick)
|
||||
}
|
||||
},
|
||||
new ControlPanel.Spacer(),
|
||||
new TriangleButton
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Text = "Reset",
|
||||
Action = reset
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -101,12 +109,12 @@ namespace osu.Game.Tournament.Screens.MapPool
|
||||
pickColour = colour;
|
||||
pickType = choiceType;
|
||||
|
||||
var enabled = currentMatch.Value.PicksBans.Count == 0;
|
||||
Color4 setColour(bool active) => active ? Color4.White : Color4.Gray;
|
||||
|
||||
buttonRedBan.Enabled.Value = enabled || pickColour == TeamColour.Red && pickType == ChoiceType.Ban;
|
||||
buttonBlueBan.Enabled.Value = enabled || pickColour == TeamColour.Blue && pickType == ChoiceType.Ban;
|
||||
buttonRedPick.Enabled.Value = enabled || pickColour == TeamColour.Red && pickType == ChoiceType.Pick;
|
||||
buttonBluePick.Enabled.Value = enabled || pickColour == TeamColour.Blue && pickType == ChoiceType.Pick;
|
||||
buttonRedBan.Colour = setColour(pickColour == TeamColour.Red && pickType == ChoiceType.Ban);
|
||||
buttonBlueBan.Colour = setColour(pickColour == TeamColour.Blue && pickType == ChoiceType.Ban);
|
||||
buttonRedPick.Colour = setColour(pickColour == TeamColour.Red && pickType == ChoiceType.Pick);
|
||||
buttonBluePick.Colour = setColour(pickColour == TeamColour.Blue && pickType == ChoiceType.Pick);
|
||||
}
|
||||
|
||||
private void setNextMode()
|
||||
@ -141,6 +149,12 @@ namespace osu.Game.Tournament.Screens.MapPool
|
||||
return base.OnMouseDown(e);
|
||||
}
|
||||
|
||||
private void reset()
|
||||
{
|
||||
currentMatch.Value.PicksBans.Clear();
|
||||
setNextMode();
|
||||
}
|
||||
|
||||
private void addForBeatmap(int beatmapId)
|
||||
{
|
||||
if (currentMatch.Value.Grouping.Value.Beatmaps.All(b => b.BeatmapInfo.OnlineBeatmapID != beatmapId))
|
||||
|
Loading…
Reference in New Issue
Block a user