private SettingsSubsection createSectionFor(InputHandler handler) { SettingsSubsection section; switch (handler) { // ReSharper disable once SuspiciousTypeConversion.Global (net standard fuckery) case ITabletHandler th: section = new TabletSettings(th); break; case MouseHandler mh: section = new MouseSettings(mh); break; // whitelist the handlers which should be displayed to avoid any weird cases of users touching settings they shouldn't. case JoystickHandler jh: section = new JoystickSettings(jh); break; case MidiHandler _: section = new HandlerSection(handler); break; default: return(null); } return(section); }
public GameCardSettings() : base(SettingsCategory.TVC, ExpansionMain.ModuleName) { Joystick3 = new JoystickSettings("Joystick3"); Joystick4 = new JoystickSettings("Joystick4"); SetDefaultValues(); }
private void WindowStatus_Load(object sender, EventArgs e) { indexSettings = new IndexSettings(panel_IndexSettings); indexStats = new IndexStats(indexSettings, panel_IndexStats, btn_EditMode); joystickSettings = new JoystickSettings(); //add all available com port elements to com port combobox cmb_comport.Items.AddRange(SerialConnection.GetPortList()); try { cmb_comport.SelectedIndex = 1; } catch { } //load index 1 (COM5) as default //temp, initialize status[0] st.status[0] = 1; // Load all settings graphicsCreator = new GraphicsCreator(pan_graphicsCreator); graphicToolbox = new GraphicToolbox(pan_graphicsCreator, pan_graphicToolbox, rightclickMenu); ProgramSaverLoader.Load(); // Start the st_register send timer tim_SendCommandsDelay.Tick += ST_Register.SendCommands; //load local IP address into communication tabs ethernet server settings txt_comm_serverip.Text = GetLocalIPAddress(); txt_comm_serverport.Text = "80"; }
private void InitSettings() { if (Resources.Load <JoystickSettings>("SoftToysFightingAssets/Scripts/Joystick/") == null) { JoystickSettings joystickSettings = CreateInstance <JoystickSettings>(); //AssetDatabase.CreateAsset(joystickSettings, "Assets/SoftToysFightingAssets/Scripts/Joystick/Resources/JoystickSettings.asset"); } }
public void SetSettings(JoystickSettings in_settings) { m_settings = in_settings; // get driver class List <Joystick> available_joysticks = Joystick.GetJoysticks(); JoystickDevice = available_joysticks.Find( delegate(Joystick joystick) { return(joystick.Description == m_settings.ControllerName); }); }