public Game_Config() { activator = null; tiltValue = 0; x1Value = 0; x2Value = 0; y1Value = 0; y2Value = 0; r = 0; g = 0; b = 0; crate = Crate.createCrateWithButtons(); }
public void setupDefaultGameConfigs() { Game_Config def = new Game_Config { game_name = "PM", tiltValue = 69, x1Value = 30, x2Value = 50, y1Value = 38, y2Value = 87, r = 102, g = 77, b = 204, crate = Crate.createCrateWithButtons() }; Game_Config melee = new Game_Config { game_name = "Melee", tiltValue = 74, x1Value = 27, x2Value = 55, y1Value = 27, y2Value = 53, r = 214, g = 104, b = 14, activator = CrateButton.X2, crate = Crate.createCrateWithButtons(), switchActive = true }; Game_Config ultimate = new Game_Config { game_name = "Ultimate", tiltValue = 69, x1Value = 30, x2Value = 50, y1Value = 38, y2Value = 87, r = 255, activator = CrateButton.Y2, crate = Crate.createCrateWithButtons(), switchActive = true }; this.game_Configs = new List <Game_Config>() { def, melee, ultimate }; this.setCurrentGameConfig(def); }
private void ButtonActivator_Click(object sender, RoutedEventArgs e) { ButtonSelector buttonSelector = new ButtonSelector(); buttonSelector.SetFreeButtons(Crate.createCrateWithButtons().used_buttons); if (buttonSelector.ShowDialog() == false) { return; } CrateButton but = buttonSelector.selectedButton; if (but == null) { this.ButtonActivator.Content = "None"; this.current_Game_Config.activator = null; return; } this.ButtonActivator.Content = but.name; this.current_Game_Config.activator = but; }