// Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; using osu.Framework.Graphics; using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.UserInterface; using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Settings { public class SettingsDropdown : SettingsItem { private Dropdown dropdown; private IEnumerable> items = new KeyValuePair[] { }; public IEnumerable> Items { get { return items; } set { items = value; if (dropdown != null) dropdown.Items = value; } } protected override Drawable CreateControl() => dropdown = new OsuDropdown { Margin = new MarginPadding { Top = 5 }, RelativeSizeAxes = Axes.X, Items = Items, }; } }