mirror of https://github.com/ppy/osu
More code tidying.
This commit is contained in:
parent
c4871bbbf3
commit
68857b573d
|
@ -3,9 +3,6 @@
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenTK;
|
|
||||||
using OpenTK.Graphics;
|
|
||||||
using OpenTK.Input;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
|
@ -14,6 +11,9 @@
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Backgrounds;
|
using osu.Game.Graphics.Backgrounds;
|
||||||
|
using OpenTK;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
using OpenTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Dialog
|
namespace osu.Game.Overlays.Dialog
|
||||||
{
|
{
|
||||||
|
@ -32,46 +32,25 @@ public class PopupDialog : FocusedOverlayContainer
|
||||||
|
|
||||||
public FontAwesome Icon
|
public FontAwesome Icon
|
||||||
{
|
{
|
||||||
get
|
get { return iconText.Icon; }
|
||||||
{
|
set { iconText.Icon = value; }
|
||||||
return iconText.Icon;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
iconText.Icon = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string HeaderText
|
public string HeaderText
|
||||||
{
|
{
|
||||||
get
|
get { return header.Text; }
|
||||||
{
|
set { header.Text = value; }
|
||||||
return header.Text;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
header.Text = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string BodyText
|
public string BodyText
|
||||||
{
|
{
|
||||||
get
|
get { return body.Text; }
|
||||||
{
|
set { body.Text = value; }
|
||||||
return body.Text;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
body.Text = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PopupDialogButton[] Buttons
|
public IEnumerable<PopupDialogButton> Buttons
|
||||||
{
|
{
|
||||||
get
|
get { return buttonsContainer.Children; }
|
||||||
{
|
|
||||||
return buttonsContainer.Children.ToArray();
|
|
||||||
}
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
buttonsContainer.Children = value;
|
buttonsContainer.Children = value;
|
||||||
|
@ -89,8 +68,8 @@ public PopupDialogButton[] Buttons
|
||||||
|
|
||||||
private void pressButtonAtIndex(int index)
|
private void pressButtonAtIndex(int index)
|
||||||
{
|
{
|
||||||
if (index < Buttons.Length)
|
if (index < Buttons.Count())
|
||||||
Buttons[index].TriggerClick();
|
Buttons.Skip(index).First().TriggerClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||||
|
|
Loading…
Reference in New Issue