private void AddDependsOn_Click(object sender, RoutedEventArgs e) { ModSelector win = new ModSelector(); if (win.ShowDialog() == true) { if (win.SelectedConfiguration != null) { Configuration.DependsOn.Add(new StringItem(win.SelectedConfiguration.ID)); cbDependsOn.SelectedItem = Configuration.DependsOn[0]; } } }
private void DoOpen() { //Open installed if (InstalledModConfigurations.Current.Configurations.Configurations.Count > 1) { ResetData(); ModSelector win = new ModSelector(); if (win.ShowDialog() == true) { Configuration = win.SelectedConfiguration; } } else { Locations.MessageBoxShow(AMLResources.Properties.Resources.NoModsInstalled, MessageBoxButton.OK, MessageBoxImage.Exclamation); } }
public void Preload(SpriteBatch spriteBatch, GraphicsDeviceManager Graphics) { Background = new Background(spriteBatch, GameData.Instance.CurrentSkin.MenuBackground, Color.White, GameData.globalwidth, GameData.globalheight); int BarWidth = GameData.Instance.CurrentSkin.SongBar.Width; int BarHeight = GameData.Instance.CurrentSkin.SongBar.Height; int index = new Random().Next(0, GameData.MapManager.Maps.Count - 1); int Y = -((BarHeight + 25) * (index - 3)); MapDatas = new List <MapData>(); foreach (Map m in GameData.MapManager.Maps) { MapDatas.Add(new MapData(spriteBatch, (GameData.globalwidth / 2) - (BarWidth / 2), Y, m.Name, m.Creator, false, m.MD5)); Y += BarHeight + 25; } GameData.MusicManager.Change(MapDatas[index].MapMD5); BackButton = new Button(spriteBatch, 25, GameData.globalheight - GameData.Instance.CurrentSkin.Button.Height - 25, GameData.Instance.CurrentSkin.Button, GameData.Instance.CurrentSkin.ButtonHover, "Back"); BackButton.OnClick += (sender, e) => { GameData.Instance.CurrentScreen = Screen.Main; }; PlayButton = new Button(spriteBatch, 25, GameData.globalheight - GameData.Instance.CurrentSkin.Button.Height * 2 - 35, GameData.Instance.CurrentSkin.Button, GameData.Instance.CurrentSkin.ButtonHover, "Play"); PlayButton.OnClick += (sender, e) => { GameData.Instance.CurrentScreen = Screen.Ingame; }; MapInfo = new Text(spriteBatch, GameData.Instance.CurrentSkin.FontSmall, "mapinfo", 25, 25, Color.White); ModCollection = new Text(spriteBatch, GameData.Instance.CurrentSkin.FontSmall, "", GameData.globalwidth, 5, Color.Azure); MSelector = new ModSelector(spriteBatch, GameData.globalwidth, GameData.globalheight); ScreenWidth = GameData.globalwidth; }
void Awake() { S = this; }