add new actionmaps (multiplayer, singleplayer, player)

add ignore actionmaps checkboxes in Settings
some GUI tweaks for > 4 joysticks
add Upgrade Settings for new versions
pull/20/head
bm98 10 years ago
parent caba37b390
commit d6aea16dd1

@ -11,6 +11,22 @@ namespace SCJMapper_V2
{
FormSettings FS = null;
public AppSettings( )
{
if ( this.FirstRun ) {
// migrate the settings to the new version if the app runs the rist time
try {
this.Upgrade( );
}
catch { }
this.FirstRun = false;
this.Save( );
}
}
/// <summary>
/// Show the Settings Dialog
/// </summary>
public void ShowSettings( )
{
if ( FS == null ) FS = new FormSettings( this );
@ -20,6 +36,15 @@ namespace SCJMapper_V2
#region Setting Properties
// manages Upgrade
[UserScopedSettingAttribute( )]
[DefaultSettingValueAttribute( "True" )]
public Boolean FirstRun
{
get { return ( Boolean )this["FirstRun"]; }
set { this["FirstRun"] = value; }
}
// Control bound settings
[UserScopedSettingAttribute( )]
@ -154,6 +179,14 @@ namespace SCJMapper_V2
set { this["UserSCPathUsed"] = value; }
}
[UserScopedSettingAttribute( )]
[DefaultSettingValueAttribute( ",multiplayer,player,singleplayer," )] // empty Note: comma separated list, must have a comma at the begining and the end (to find 'player' on its own...)
public String IgnoreActionmaps
{
get { return ( String )this["IgnoreActionmaps"]; }
set { this["IgnoreActionmaps"] = value; }
}
#endregion

57
Form1.Designer.cs generated

@ -84,6 +84,7 @@
this.btClearFilter = new System.Windows.Forms.Button();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.btSettings = new System.Windows.Forms.Button();
this.cbxBlendUnmapped = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.btSaveMyMapping = new System.Windows.Forms.Button();
this.btLoadMyMapping = new System.Windows.Forms.Button();
@ -104,7 +105,6 @@
this.loadAndGrabToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.cbxBlendUnmapped = new System.Windows.Forms.CheckBox();
this.UC_JoyPanel = new SCJMapper_V2.UC_JoyPanel();
this.cmCopyPaste.SuspendLayout();
this.panel3.SuspendLayout();
@ -247,15 +247,15 @@
this.panel3.Controls.Add(this.cbJs3);
this.panel3.Controls.Add(this.cbJs2);
this.panel3.Controls.Add(this.cbJs1);
this.panel3.Location = new System.Drawing.Point(3, 284);
this.panel3.Location = new System.Drawing.Point(3, 294);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(289, 134);
this.panel3.Size = new System.Drawing.Size(289, 118);
this.panel3.TabIndex = 18;
//
// label56
//
this.label56.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label56.Location = new System.Drawing.Point(7, 101);
this.label56.Location = new System.Drawing.Point(7, 89);
this.label56.Name = "label56";
this.label56.Size = new System.Drawing.Size(39, 20);
this.label56.TabIndex = 2;
@ -264,7 +264,7 @@
// label55
//
this.label55.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label55.Location = new System.Drawing.Point(7, 74);
this.label55.Location = new System.Drawing.Point(7, 62);
this.label55.Name = "label55";
this.label55.Size = new System.Drawing.Size(39, 20);
this.label55.TabIndex = 2;
@ -282,7 +282,7 @@
// label54
//
this.label54.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label54.Location = new System.Drawing.Point(7, 47);
this.label54.Location = new System.Drawing.Point(7, 35);
this.label54.Name = "label54";
this.label54.Size = new System.Drawing.Size(39, 20);
this.label54.TabIndex = 2;
@ -297,7 +297,7 @@
"Joystick 1",
"Joystick 2",
"Joystick 3"});
this.cbJs3.Location = new System.Drawing.Point(52, 98);
this.cbJs3.Location = new System.Drawing.Point(52, 86);
this.cbJs3.MaxDropDownItems = 4;
this.cbJs3.Name = "cbJs3";
this.cbJs3.Size = new System.Drawing.Size(233, 25);
@ -312,7 +312,7 @@
"Joystick 1",
"Joystick 2",
"Joystick 3"});
this.cbJs2.Location = new System.Drawing.Point(52, 71);
this.cbJs2.Location = new System.Drawing.Point(52, 59);
this.cbJs2.MaxDropDownItems = 4;
this.cbJs2.Name = "cbJs2";
this.cbJs2.Size = new System.Drawing.Size(233, 25);
@ -327,7 +327,7 @@
"Joystick 1",
"Joystick 2",
"Joystick 3"});
this.cbJs1.Location = new System.Drawing.Point(52, 44);
this.cbJs1.Location = new System.Drawing.Point(52, 32);
this.cbJs1.MaxDropDownItems = 4;
this.cbJs1.Name = "cbJs1";
this.cbJs1.Size = new System.Drawing.Size(233, 25);
@ -344,7 +344,7 @@
this.panel2.Controls.Add(this.lblLastJ);
this.panel2.Controls.Add(this.lblAction);
this.panel2.Controls.Add(this.btAssign);
this.panel2.Location = new System.Drawing.Point(3, 424);
this.panel2.Location = new System.Drawing.Point(3, 418);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(289, 103);
this.panel2.TabIndex = 17;
@ -459,22 +459,22 @@
this.tc1.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
this.tc1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tc1.HotTrack = true;
this.tc1.ItemSize = new System.Drawing.Size(62, 22);
this.tc1.ItemSize = new System.Drawing.Size(62, 20);
this.tc1.Location = new System.Drawing.Point(3, 3);
this.tc1.Multiline = true;
this.tc1.Name = "tc1";
this.tc1.SelectedIndex = 0;
this.tc1.Size = new System.Drawing.Size(289, 275);
this.tc1.Size = new System.Drawing.Size(289, 285);
this.tc1.TabIndex = 15;
this.tc1.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.tc1_DrawItem);
//
// tabJS1
//
this.tabJS1.Controls.Add(this.UC_JoyPanel);
this.tabJS1.Location = new System.Drawing.Point(4, 26);
this.tabJS1.Location = new System.Drawing.Point(4, 24);
this.tabJS1.Name = "tabJS1";
this.tabJS1.Padding = new System.Windows.Forms.Padding(3);
this.tabJS1.Size = new System.Drawing.Size(281, 245);
this.tabJS1.Size = new System.Drawing.Size(281, 257);
this.tabJS1.TabIndex = 0;
this.tabJS1.Text = "Joystick 1";
//
@ -678,6 +678,18 @@
this.btSettings.Text = "Settings";
this.btSettings.Click += new System.EventHandler(this.btSettings_Click);
//
// cbxBlendUnmapped
//
this.cbxBlendUnmapped.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.cbxBlendUnmapped.AutoSize = true;
this.cbxBlendUnmapped.Location = new System.Drawing.Point(3, 16);
this.cbxBlendUnmapped.Name = "cbxBlendUnmapped";
this.cbxBlendUnmapped.Size = new System.Drawing.Size(106, 17);
this.cbxBlendUnmapped.TabIndex = 15;
this.cbxBlendUnmapped.Text = "Blend unmapped";
this.cbxBlendUnmapped.UseVisualStyleBackColor = true;
this.cbxBlendUnmapped.CheckedChanged += new System.EventHandler(this.cbxBlendUnmapped_CheckedChanged);
//
// tableLayoutPanel3
//
this.tableLayoutPanel3.ColumnCount = 2;
@ -886,23 +898,12 @@
this.loadToolStripMenuItem.Text = "Load !";
this.loadToolStripMenuItem.Click += new System.EventHandler(this.loadToolStripMenuItem_Click);
//
// cbxBlendUnmapped
//
this.cbxBlendUnmapped.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.cbxBlendUnmapped.AutoSize = true;
this.cbxBlendUnmapped.Location = new System.Drawing.Point(3, 16);
this.cbxBlendUnmapped.Name = "cbxBlendUnmapped";
this.cbxBlendUnmapped.Size = new System.Drawing.Size(106, 17);
this.cbxBlendUnmapped.TabIndex = 15;
this.cbxBlendUnmapped.Text = "Blend unmapped";
this.cbxBlendUnmapped.UseVisualStyleBackColor = true;
this.cbxBlendUnmapped.CheckedChanged += new System.EventHandler(this.cbxBlendUnmapped_CheckedChanged);
//
// UC_JoyPanel
//
this.UC_JoyPanel.Location = new System.Drawing.Point(0, 6);
this.UC_JoyPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.UC_JoyPanel.Location = new System.Drawing.Point(3, 3);
this.UC_JoyPanel.Name = "UC_JoyPanel";
this.UC_JoyPanel.Size = new System.Drawing.Size(278, 234);
this.UC_JoyPanel.Size = new System.Drawing.Size(275, 251);
this.UC_JoyPanel.TabIndex = 0;
//
// MainForm

@ -217,6 +217,7 @@ namespace SCJMapper_V2
// build TreeView and the ActionMaps
m_AT = new ActionTree( cbxBlendUnmapped.Checked );
m_AT.Ctrl = treeView1; // the ActionTree owns the TreeView control
m_AT.IgnoreMaps = m_AppSettings.IgnoreActionmaps;
m_AT.LoadTree( m_AppSettings.DefProfileName, addDefaultBinding ); // Init with default profile filepath
// default JS to Joystick mapping - can be changed and reloaded from XML
@ -696,6 +697,9 @@ namespace SCJMapper_V2
timer1.Enabled = false;
m_AppSettings.ShowSettings( );
foreach ( JoystickCls j in m_JS ) j.ApplySettings(); // update Seetings
m_AT.IgnoreMaps = m_AppSettings.IgnoreActionmaps;
InitActionTree( true );
timer1.Enabled = true;
}

@ -392,7 +392,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAQ
DgAAAk1TRnQBSQFMAgEBBwEAAVABCQFQAQkBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
DgAAAk1TRnQBSQFMAgEBBwEAAYABCQGAAQkBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

@ -30,8 +30,6 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormSettings));
this.btDone = new System.Windows.Forms.Button();
this.txSCPath = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btChooseSCDir = new System.Windows.Forms.Button();
this.cbxUsePath = new System.Windows.Forms.CheckBox();
this.txJS1 = new System.Windows.Forms.TextBox();
@ -51,11 +49,18 @@
this.label10 = new System.Windows.Forms.Label();
this.txJS8 = new System.Windows.Forms.TextBox();
this.fbDlg = new System.Windows.Forms.FolderBrowserDialog();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.chkLbActionMaps = new System.Windows.Forms.CheckedListBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// btDone
//
this.btDone.Location = new System.Drawing.Point(462, 319);
this.btDone.Location = new System.Drawing.Point(760, 340);
this.btDone.Name = "btDone";
this.btDone.Size = new System.Drawing.Size(93, 31);
this.btDone.TabIndex = 1;
@ -65,35 +70,14 @@
//
// txSCPath
//
this.txSCPath.Location = new System.Drawing.Point(36, 280);
this.txSCPath.Location = new System.Drawing.Point(27, 24);
this.txSCPath.Name = "txSCPath";
this.txSCPath.Size = new System.Drawing.Size(479, 22);
this.txSCPath.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(510, 13);
this.label1.TabIndex = 3;
this.label1.Text = "Ignore Buttons - enter button numbers which should be ignored separated by spaces" +
" (e.g. 24 25)";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(12, 264);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(330, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Path to the Star Citizen Installation (e.g. C:\\Games\\StarCitizen)";
//
// btChooseSCDir
//
this.btChooseSCDir.Location = new System.Drawing.Point(521, 280);
this.btChooseSCDir.Location = new System.Drawing.Point(512, 24);
this.btChooseSCDir.Name = "btChooseSCDir";
this.btChooseSCDir.Size = new System.Drawing.Size(33, 22);
this.btChooseSCDir.TabIndex = 4;
@ -104,7 +88,7 @@
// cbxUsePath
//
this.cbxUsePath.AutoSize = true;
this.cbxUsePath.Location = new System.Drawing.Point(15, 283);
this.cbxUsePath.Location = new System.Drawing.Point(6, 27);
this.cbxUsePath.Name = "cbxUsePath";
this.cbxUsePath.Size = new System.Drawing.Size(15, 14);
this.cbxUsePath.TabIndex = 5;
@ -112,7 +96,7 @@
//
// txJS1
//
this.txJS1.Location = new System.Drawing.Point(72, 31);
this.txJS1.Location = new System.Drawing.Point(66, 21);
this.txJS1.Name = "txJS1";
this.txJS1.Size = new System.Drawing.Size(482, 22);
this.txJS1.TabIndex = 6;
@ -122,24 +106,24 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 34);
this.label3.Location = new System.Drawing.Point(6, 24);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(55, 13);
this.label3.Size = new System.Drawing.Size(57, 13);
this.label3.TabIndex = 7;
this.label3.Text = "Joystick 1";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 62);
this.label4.Location = new System.Drawing.Point(6, 52);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(55, 13);
this.label4.Size = new System.Drawing.Size(57, 13);
this.label4.TabIndex = 9;
this.label4.Text = "Joystick 2";
//
// txJS2
//
this.txJS2.Location = new System.Drawing.Point(72, 59);
this.txJS2.Location = new System.Drawing.Point(66, 49);
this.txJS2.Name = "txJS2";
this.txJS2.Size = new System.Drawing.Size(482, 22);
this.txJS2.TabIndex = 8;
@ -149,15 +133,15 @@
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(12, 90);
this.label5.Location = new System.Drawing.Point(6, 80);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(55, 13);
this.label5.Size = new System.Drawing.Size(57, 13);
this.label5.TabIndex = 11;
this.label5.Text = "Joystick 3";
//
// txJS3
//
this.txJS3.Location = new System.Drawing.Point(72, 87);
this.txJS3.Location = new System.Drawing.Point(66, 77);
this.txJS3.Name = "txJS3";
this.txJS3.Size = new System.Drawing.Size(482, 22);
this.txJS3.TabIndex = 10;
@ -167,15 +151,15 @@
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(12, 118);
this.label6.Location = new System.Drawing.Point(6, 108);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(55, 13);
this.label6.Size = new System.Drawing.Size(57, 13);
this.label6.TabIndex = 13;
this.label6.Text = "Joystick 4";
//
// txJS4
//
this.txJS4.Location = new System.Drawing.Point(72, 115);
this.txJS4.Location = new System.Drawing.Point(66, 105);
this.txJS4.Name = "txJS4";
this.txJS4.Size = new System.Drawing.Size(482, 22);
this.txJS4.TabIndex = 12;
@ -185,15 +169,15 @@
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(12, 146);
this.label7.Location = new System.Drawing.Point(6, 136);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(55, 13);
this.label7.Size = new System.Drawing.Size(57, 13);
this.label7.TabIndex = 15;
this.label7.Text = "Joystick 5";
//
// txJS5
//
this.txJS5.Location = new System.Drawing.Point(72, 143);
this.txJS5.Location = new System.Drawing.Point(66, 133);
this.txJS5.Name = "txJS5";
this.txJS5.Size = new System.Drawing.Size(482, 22);
this.txJS5.TabIndex = 14;
@ -203,15 +187,15 @@
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(12, 174);
this.label8.Location = new System.Drawing.Point(6, 164);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(55, 13);
this.label8.Size = new System.Drawing.Size(57, 13);
this.label8.TabIndex = 17;
this.label8.Text = "Joystick 6";
//
// txJS6
//
this.txJS6.Location = new System.Drawing.Point(72, 171);
this.txJS6.Location = new System.Drawing.Point(66, 161);
this.txJS6.Name = "txJS6";
this.txJS6.Size = new System.Drawing.Size(482, 22);
this.txJS6.TabIndex = 16;
@ -221,15 +205,15 @@
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(12, 202);
this.label9.Location = new System.Drawing.Point(6, 192);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(55, 13);
this.label9.Size = new System.Drawing.Size(57, 13);
this.label9.TabIndex = 19;
this.label9.Text = "Joystick 7";
//
// txJS7
//
this.txJS7.Location = new System.Drawing.Point(72, 199);
this.txJS7.Location = new System.Drawing.Point(66, 189);
this.txJS7.Name = "txJS7";
this.txJS7.Size = new System.Drawing.Size(482, 22);
this.txJS7.TabIndex = 18;
@ -239,15 +223,15 @@
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(12, 230);
this.label10.Location = new System.Drawing.Point(6, 220);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(55, 13);
this.label10.Size = new System.Drawing.Size(57, 13);
this.label10.TabIndex = 21;
this.label10.Text = "Joystick 8";
//
// txJS8
//
this.txJS8.Location = new System.Drawing.Point(72, 227);
this.txJS8.Location = new System.Drawing.Point(66, 217);
this.txJS8.Name = "txJS8";
this.txJS8.Size = new System.Drawing.Size(482, 22);
this.txJS8.TabIndex = 20;
@ -259,32 +243,75 @@
this.fbDlg.RootFolder = System.Environment.SpecialFolder.MyComputer;
this.fbDlg.ShowNewFolderButton = false;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txJS7);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.txJS1);
this.groupBox1.Controls.Add(this.txJS8);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.txJS2);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.txJS3);
this.groupBox1.Controls.Add(this.txJS6);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.txJS4);
this.groupBox1.Controls.Add(this.txJS5);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(561, 257);
this.groupBox1.TabIndex = 22;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Ignore Buttons - enter button numbers which should be ignored separated by spaces" +
" (e.g. 24 25)";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.txSCPath);
this.groupBox2.Controls.Add(this.btChooseSCDir);
this.groupBox2.Controls.Add(this.cbxUsePath);
this.groupBox2.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox2.Location = new System.Drawing.Point(12, 275);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(561, 59);
this.groupBox2.TabIndex = 23;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Path to the Star Citizen Installation (e.g. C:\\Games\\StarCitizen)";
//
// groupBox3
//
this.groupBox3.Controls.Add(this.chkLbActionMaps);
this.groupBox3.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox3.Location = new System.Drawing.Point(579, 12);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(274, 322);
this.groupBox3.TabIndex = 24;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Ignore Actionmaps - check the ones to hide";
//
// chkLbActionMaps
//
this.chkLbActionMaps.CheckOnClick = true;
this.chkLbActionMaps.Dock = System.Windows.Forms.DockStyle.Fill;
this.chkLbActionMaps.FormattingEnabled = true;
this.chkLbActionMaps.Location = new System.Drawing.Point(3, 18);
this.chkLbActionMaps.Name = "chkLbActionMaps";
this.chkLbActionMaps.Size = new System.Drawing.Size(268, 301);
this.chkLbActionMaps.TabIndex = 0;
//
// FormSettings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(566, 363);
this.Controls.Add(this.label10);
this.Controls.Add(this.txJS8);
this.Controls.Add(this.label9);
this.Controls.Add(this.txJS7);
this.Controls.Add(this.label8);
this.Controls.Add(this.txJS6);
this.Controls.Add(this.label7);
this.Controls.Add(this.txJS5);
this.Controls.Add(this.label6);
this.Controls.Add(this.txJS4);
this.Controls.Add(this.label5);
this.Controls.Add(this.txJS3);
this.Controls.Add(this.label4);
this.Controls.Add(this.txJS2);
this.Controls.Add(this.label3);
this.Controls.Add(this.txJS1);
this.Controls.Add(this.cbxUsePath);
this.Controls.Add(this.btChooseSCDir);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.txSCPath);
this.ClientSize = new System.Drawing.Size(861, 381);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btDone);
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
@ -294,8 +321,12 @@
this.Text = "Settings";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormSettings_FormClosing);
this.Load += new System.EventHandler(this.FormSettings_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
@ -303,8 +334,6 @@
private System.Windows.Forms.Button btDone;
private System.Windows.Forms.TextBox txSCPath;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btChooseSCDir;
private System.Windows.Forms.CheckBox cbxUsePath;
private System.Windows.Forms.TextBox txJS1;
@ -324,5 +353,9 @@
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txJS8;
private System.Windows.Forms.FolderBrowserDialog fbDlg;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.CheckedListBox chkLbActionMaps;
}
}

@ -26,6 +26,10 @@ namespace SCJMapper_V2
private void FormSettings_Load( object sender, EventArgs e )
{
chkLbActionMaps.Items.Clear( );
for ( int i = 0; i < ActionMapsCls.ActionMaps.Length; i++ ) {
chkLbActionMaps.Items.Add( ActionMapsCls.ActionMaps[i] );
}
LoadSettings( );
}
@ -45,6 +49,13 @@ namespace SCJMapper_V2
txJS6.Text = m_owner.IgnoreJS6;
txJS7.Text = m_owner.IgnoreJS7;
txJS8.Text = m_owner.IgnoreJS8;
// Ignore actionmaps
for ( int i = 0; i < chkLbActionMaps.Items.Count; i++ ) {
if ( m_owner.IgnoreActionmaps.Contains( "," + chkLbActionMaps.Items[i].ToString( ) + "," ) ) {
chkLbActionMaps.SetItemChecked(i, true);
}
}
}
@ -64,6 +75,15 @@ namespace SCJMapper_V2
m_owner.IgnoreJS7 = txJS7.Text;
m_owner.IgnoreJS8 = txJS8.Text;
// Ignore actionmaps
String ignore = ",";
for ( int i = 0; i < chkLbActionMaps.Items.Count; i++ ) {
if ( chkLbActionMaps.GetItemChecked(i) ) {
ignore += chkLbActionMaps.Items[i].ToString( ) + ",";
}
}
m_owner.IgnoreActionmaps = ignore;
m_owner.Save( );
}

@ -22,6 +22,11 @@ namespace SCJMapper_V2
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
// actionmap names to gather (do we need them to be cofigurable ??)
public static String[] ActionMaps = { "multiplayer", "singleplayer", "player", "spaceship_general", "spaceship_view", "spaceship_movement", "spaceship_targeting", "spaceship_weapons", "spaceship_missiles",
"spaceship_defensive", "spaceship_auto_weapons", "spaceship_radar" , "spaceship_hud" , "IFCS_controls" };
public String version { get; set; }
// own additions for JS mapping - should not harm..

@ -42,6 +42,11 @@ namespace SCJMapper_V2
/// </summary>
public Boolean BlendUnmapped { get; set; }
/// <summary>
/// a comma separated list of actionmaps to ignore
/// </summary>
public String IgnoreMaps { get; set; }
private String m_Filter = ""; // the tree content filter
@ -51,6 +56,7 @@ namespace SCJMapper_V2
public ActionTree( Boolean blendUnmapped )
{
BlendUnmapped = blendUnmapped;
IgnoreMaps = ""; // nothing to ignore
}
@ -176,58 +182,61 @@ namespace SCJMapper_V2
while ( !String.IsNullOrEmpty( buf ) ) {
String[] elem = buf.Split( new char[] { ';', ',', ' ' } );
if ( elem.Length > 1 ) {
// must have 2 elements min
Array.Resize( ref cnl, 0 );
acm = new ActionMapCls( ); acm.name = elem[0]; // get actionmap name
// process items
for ( int ei=1; ei < elem.Length; ei += 2 ) { // step 2 - action;defaultBinding come in pairs
if ( !String.IsNullOrEmpty( elem[ei] ) ) {
String action = elem[ei].Substring( 1 );
String defBinding = elem[ei + 1].Substring( 0 );
cn = new TreeNode( action ); cn.Name = elem[ei]; cn.BackColor = Color.White; // name with the key it to find it..
String devID = elem[ei].Substring( 0, 1 );
String device = ActionCls.DeviceFromID( devID );
cn.ImageKey = devID;
cn.BackColor = Color.White; // some stuff does not work properly...
Array.Resize( ref cnl, cnl.Length + 1 ); cnl[cnl.Length - 1] = cn;
ac = new ActionCls( ); ac.key = cn.Name; ac.name = action; ac.device = device; ac.defBinding = defBinding;
acm.Add( ac ); // add to our map
if ( applyDefaults ) {
// right now this application only works with joysticks
if ( JoystickCls.IsJoystick( ac.device ) ) {
int jNum = JoystickCls.JSNum( ac.defBinding );
if ( JoystickCls.IsJSValid( jNum ) ) {
ac.input = ac.defBinding;
cn.Text += " - " + ac.defBinding;
cn.BackColor = MyColors.JColor[jNum - 1]; // color list is 0 based
}
else {
if ( BlendUnmapped ) {
ac.input = JoystickCls.BlendedJsInput;
cn.Text += " - " + JoystickCls.BlendedJsInput;
if ( !IgnoreMaps.Contains( "," + elem[0] + "," ) ) {
// must have 2 elements min
Array.Resize( ref cnl, 0 );
acm = new ActionMapCls( ); acm.name = elem[0]; // get actionmap name
// process items
for ( int ei=1; ei < elem.Length; ei += 2 ) { // step 2 - action;defaultBinding come in pairs
if ( !String.IsNullOrEmpty( elem[ei] ) ) {
String action = elem[ei].Substring( 1 );
String defBinding = elem[ei + 1].Substring( 0 );
cn = new TreeNode( action ); cn.Name = elem[ei]; cn.BackColor = Color.White; // name with the key it to find it..
String devID = elem[ei].Substring( 0, 1 );
String device = ActionCls.DeviceFromID( devID );
cn.ImageKey = devID;
cn.BackColor = Color.White; // some stuff does not work properly...
Array.Resize( ref cnl, cnl.Length + 1 ); cnl[cnl.Length - 1] = cn;
ac = new ActionCls( ); ac.key = cn.Name; ac.name = action; ac.device = device; ac.defBinding = defBinding;
acm.Add( ac ); // add to our map
if ( applyDefaults ) {
// right now this application only works with joysticks
if ( JoystickCls.IsJoystick( ac.device ) ) {
int jNum = JoystickCls.JSNum( ac.defBinding );
if ( JoystickCls.IsJSValid( jNum ) ) {
ac.input = ac.defBinding;
cn.Text += " - " + ac.defBinding;
cn.BackColor = MyColors.JColor[jNum - 1]; // color list is 0 based
}
else {
if ( BlendUnmapped ) {
ac.input = JoystickCls.BlendedJsInput;
cn.Text += " - " + JoystickCls.BlendedJsInput;
}
}
}
}
}
else {
// init empty
if ( JoystickCls.IsJoystick( ac.device ) && BlendUnmapped ) {
ac.input = JoystickCls.BlendedJsInput;
cn.Text += " - " + JoystickCls.BlendedJsInput;
else {
// init empty
if ( JoystickCls.IsJoystick( ac.device ) && BlendUnmapped ) {
ac.input = JoystickCls.BlendedJsInput;
cn.Text += " - " + JoystickCls.BlendedJsInput;
}
}
}
}
}//for
tn = new TreeNode( acm.name, cnl ); tn.Name = acm.name; // name it to find it..
tn.ImageIndex = 0; tn.NodeFont = new Font( m_MasterTree.Font, FontStyle.Bold );
m_MasterTree.BackColor = Color.White; // fix for defect TreeView (cut off bold text)
m_MasterTree.Nodes.Add( tn ); // add to control
if ( topNode == null ) topNode = tn; // once to keep the start of list
ActionMaps.Add( acm ); // add to our map
}//for
tn = new TreeNode( acm.name, cnl ); tn.Name = acm.name; // name it to find it..
tn.ImageIndex = 0; tn.NodeFont = new Font( m_MasterTree.Font, FontStyle.Bold );
m_MasterTree.BackColor = Color.White; // fix for defect TreeView (cut off bold text)
m_MasterTree.Nodes.Add( tn ); // add to control
if ( topNode == null ) topNode = tn; // once to keep the start of list
ActionMaps.Add( acm ); // add to our map
}//not ignored
}// if valid line
buf = sr.ReadLine( );
}//while
@ -320,6 +329,7 @@ namespace SCJMapper_V2
log.Debug( "ReloadCtrl - Entry" );
foreach ( ActionMapCls acm in ActionMaps ) {
if ( IgnoreMaps.Contains( "," + acm.name + "," ) ) break; // next
try {
TreeNode amTn = m_MasterTree.Nodes[acm.name]; // get the map node
// find the item to reload into the treeview

@ -42,10 +42,6 @@ namespace SCJMapper_V2
Dictionary<String, ActionMap> m_aMap = null; // key would be the actionmap name
ActionMap m_currentMap = null;
// actionmap names to gather (do we need them to be cofigurable ??)
private String[] c_exMaps = { "spaceship_general", "spaceship_view", "spaceship_movement", "spaceship_targeting", "spaceship_weapons", "spaceship_missiles",
"spaceship_defensive", "spaceship_auto_weapons", "spaceship_radar" , "spaceship_hud" , "IFCS_controls" , "" , "" , "" };
public DProfileReader( )
{
@ -230,7 +226,7 @@ namespace SCJMapper_V2
if ( m_nodeNameStack.Peek( ).ToLower( ) == "actionmap" ) {
// check for a valid one
String mapName = attr["name"];
String item = Array.Find( c_exMaps, delegate( String sstr ) {
String item = Array.Find( ActionMapsCls.ActionMaps, delegate( String sstr ) {
return sstr == mapName;
} );
if ( !String.IsNullOrEmpty( item ) ) {

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion( "2.1.0.21" )]
[assembly: AssemblyFileVersion( "2.1.0.21" )]
[assembly: AssemblyVersion( "2.2.0.22" )]
[assembly: AssemblyFileVersion( "2.2.0.22" )]

@ -26,8 +26,8 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>21</ApplicationRevision>
<ApplicationVersion>2.1.0.%2a</ApplicationVersion>
<ApplicationRevision>22</ApplicationRevision>
<ApplicationVersion>2.2.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
@ -155,8 +155,6 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="actionList\MappingVars.csv" />
<None Include="actionList\MappingVars.xlsx" />
<None Include="app.config" />
<None Include="log4net.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>

@ -1,10 +0,0 @@
spaceship_general;Kv_toggle_cabin_lights;Kv_toggle_running_lights;Kv_power_cycle_preset_fwd;Kv_power_cycle_preset_back;Xv_eject;;;;;;;;;;;;;;;;;;;;;;;
spaceship_view;Jv_view_yaw_left;Jv_view_yaw_right;Jv_view_yaw;Jv_view_yaw_1p;Kv_view_yaw_absolute;Jv_view_pitch_up;Jv_view_pitch_down;Jv_view_pitch;Jv_view_pitch_1p;Kv_view_pitch_absolute;Kv_view_roll_absolute;Jv_view_cycle_fwd;Kv_view_cycle_internal_fwd;Xv_view_option;Xv_view_mode;Jv_view_zoom_in;Jv_view_zoom_out;Kv_view_dynamic_focus_in;Kv_view_dynamic_focus_out;Jv_view_dynamic_focus_toggle;Kv_view_track_target;;;;;;;
spaceship_movement;Jv_pitch;Jv_yaw_left;Jv_yaw_right;Jv_yaw;Kv_roll_left;Kv_roll_right;Jv_roll;Jv_throttle;Kv_throttle_toggle_minmax;Xv_throttle_zero;Xv_throttle_up;Xv_throttle_down;Xv_brake;Jv_target_match_vel;Xv_ifcs_toggle_vector_decoupling;Kv_strafe_up;Kv_strafe_down;Kv_strafe_left;Kv_strafe_right;Xv_strafe_forward;Xv_strafe_back;Xv_strafe_horizontal;Xv_strafe_vertical;Jv_newtonian_yaw;Jv_newtonian_pitch;Xv_newtonian_brake;Xv_ifcs_toggle_safety;Jv_afterburner
spaceship_targeting;Jv_target_cycle_all_fwd;Jv_target_cycle_all_back;Kv_target_cycle_friendly_fwd;Kv_target_cycle_friendly_back;Xv_target_toggle_pinned_focused;Jv_target_missile_lock_focused;Jv_target_cycle_hostile_fwd;Kv_target_cycle_hostile_back;Jv_target_nearest_hostile;Kv_target_nearest_landzone;Kv_target_pin_reticule;Kv_target_cycle_subsystem_fwd;Kv_target_cycle_subsystem_back;;;;;;;;;;;;;;;
spaceship_weapons;Jv_attack1_group1;Jv_attack1_group2;Jv_attack1_group3;Jv_attack1_group4;;;;;;;;;;;;;;;;;;;;;;;;
spaceship_missiles;Jv_weapon_cycle_missile_fwd;Kv_weapon_cycle_missile_back;Xv_weapon_toggle_arm_missile;Jv_weapon_launch_missile;;;;;;;;;;;;;;;;;;;;;;;;
spaceship_defensive;Jv_weapon_launch_countermeasure;Jv_weapon_cycle_countermeasure_fwd;Kv_shield_raise_level_forward;Kv_shield_raise_level_back;Kv_shield_raise_level_left;Kv_shield_raise_level_right;Kv_shield_reset_level;Kv_shield_power_up;Kv_shield_power_down;Jv_shield_boost_recharge;Jv_shield_cycle_presets_fwd;Jv_shield_cycle_presets_back;;;;;;;;;;;;;;;;
spaceship_auto_weapons;Kv_weapon_toggle_ai;;;;;;;;;;;;;;;;;;;;;;;;;;;
spaceship_radar;Kv_radar_cycle_zoom_fwd;Kv_radar_cycle_focus_fwd;Kv_radar_cycle_focus_back;;;;;;;;;;;;;;;;;;;;;;;;;
spaceship_hud;Kv_hud_cycle_mode_fwd;Kv_hud_cycle_mode_back;Kv_comm_open_chat;Kv_comm_show_chat;Kv_comm_open_precanned;;;;;;;;;;;;;;;;;;;;;;;
1 spaceship_general Kv_toggle_cabin_lights Kv_toggle_running_lights Kv_power_cycle_preset_fwd Kv_power_cycle_preset_back Xv_eject
2 spaceship_view Jv_view_yaw_left Jv_view_yaw_right Jv_view_yaw Jv_view_yaw_1p Kv_view_yaw_absolute Jv_view_pitch_up Jv_view_pitch_down Jv_view_pitch Jv_view_pitch_1p Kv_view_pitch_absolute Kv_view_roll_absolute Jv_view_cycle_fwd Kv_view_cycle_internal_fwd Xv_view_option Xv_view_mode Jv_view_zoom_in Jv_view_zoom_out Kv_view_dynamic_focus_in Kv_view_dynamic_focus_out Jv_view_dynamic_focus_toggle Kv_view_track_target
3 spaceship_movement Jv_pitch Jv_yaw_left Jv_yaw_right Jv_yaw Kv_roll_left Kv_roll_right Jv_roll Jv_throttle Kv_throttle_toggle_minmax Xv_throttle_zero Xv_throttle_up Xv_throttle_down Xv_brake Jv_target_match_vel Xv_ifcs_toggle_vector_decoupling Kv_strafe_up Kv_strafe_down Kv_strafe_left Kv_strafe_right Xv_strafe_forward Xv_strafe_back Xv_strafe_horizontal Xv_strafe_vertical Jv_newtonian_yaw Jv_newtonian_pitch Xv_newtonian_brake Xv_ifcs_toggle_safety Jv_afterburner
4 spaceship_targeting Jv_target_cycle_all_fwd Jv_target_cycle_all_back Kv_target_cycle_friendly_fwd Kv_target_cycle_friendly_back Xv_target_toggle_pinned_focused Jv_target_missile_lock_focused Jv_target_cycle_hostile_fwd Kv_target_cycle_hostile_back Jv_target_nearest_hostile Kv_target_nearest_landzone Kv_target_pin_reticule Kv_target_cycle_subsystem_fwd Kv_target_cycle_subsystem_back
5 spaceship_weapons Jv_attack1_group1 Jv_attack1_group2 Jv_attack1_group3 Jv_attack1_group4
6 spaceship_missiles Jv_weapon_cycle_missile_fwd Kv_weapon_cycle_missile_back Xv_weapon_toggle_arm_missile Jv_weapon_launch_missile
7 spaceship_defensive Jv_weapon_launch_countermeasure Jv_weapon_cycle_countermeasure_fwd Kv_shield_raise_level_forward Kv_shield_raise_level_back Kv_shield_raise_level_left Kv_shield_raise_level_right Kv_shield_reset_level Kv_shield_power_up Kv_shield_power_down Jv_shield_boost_recharge Jv_shield_cycle_presets_fwd Jv_shield_cycle_presets_back
8 spaceship_auto_weapons Kv_weapon_toggle_ai
9 spaceship_radar Kv_radar_cycle_zoom_fwd Kv_radar_cycle_focus_fwd Kv_radar_cycle_focus_back
10 spaceship_hud Kv_hud_cycle_mode_fwd Kv_hud_cycle_mode_back Kv_comm_open_chat Kv_comm_show_chat Kv_comm_open_precanned

Binary file not shown.
Loading…
Cancel
Save