public LevelSelectScreen(StartingScreen ss, Config startupConfig) { InitializeComponent(); this.ss = ss; lvl = new Level(); this.startupConfig = startupConfig; // Dynamicly append the buttons according to the number of levels there are. for (int i = 1; i <= startupConfig.num_levels; i++) { Button b = new Button(); b.Size = new Size(85, 23); b.BackColor = Color.DarkRed; b.ForeColor = Color.Black; b.TextAlign = ContentAlignment.MiddleCenter; b.Text = "Level " + i; b.TabStop = false; b.FlatStyle = FlatStyle.Popup; b.FlatAppearance.BorderSize = 1; b.FlatAppearance.BorderColor = Color.Gold; b.Tag = startupConfig.levels[i - 1].filePathName; b.Click += btn_click; FLLevels.Controls.Add(b); } }
public Settings(StartingScreen ss, Config settingConfig) { InitializeComponent(); this.ss = ss; this.settingConfig = settingConfig; }