V 2.10 - Build 43 - Production

- new feature - added Action Tree context menu for Assign, Clear and Blend
- fix - issue for Js Reassignment if more than one was not yet assigned
- improvement - Right click in Action Tree selects the items (no need to select and then right click anymore)
- doc update
pull/104/head v2.10
bm98 10 years ago
parent 179c414816
commit 3272d48513

66
Form1.Designer.cs generated

@ -64,7 +64,6 @@
this.tdiDelBinding = new System.Windows.Forms.ToolStripMenuItem();
this.tc1 = new System.Windows.Forms.TabControl();
this.tabJS1 = new System.Windows.Forms.TabPage();
this.UC_JoyPanel = new SCJMapper_V2.UC_JoyPanel();
this.panel1 = new System.Windows.Forms.Panel();
this.btClip = new System.Windows.Forms.Button();
this.txRebind = new System.Windows.Forms.TextBox();
@ -124,6 +123,11 @@
this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.tdiClearBinding = new System.Windows.Forms.ToolStripMenuItem();
this.tdiBlendBinding = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.UC_JoyPanel = new SCJMapper_V2.UC_JoyPanel();
this.tdiAssignBinding = new System.Windows.Forms.ToolStripMenuItem();
this.cmCopyPaste.SuspendLayout();
this.panel2.SuspendLayout();
this.cmAddDel.SuspendLayout();
@ -383,6 +387,7 @@
//
this.treeView1.ContextMenuStrip = this.cmAddDel;
this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.treeView1.FullRowSelect = true;
this.treeView1.HotTracking = true;
this.treeView1.ImageKey = "Map";
this.treeView1.ImageList = this.IL;
@ -393,27 +398,32 @@
this.treeView1.Size = new System.Drawing.Size(364, 686);
this.treeView1.TabIndex = 16;
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
//
// cmAddDel
//
this.cmAddDel.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tdiAssignBinding,
this.tdiBlendBinding,
this.tdiClearBinding,
this.toolStripSeparator2,
this.tsiAddBinding,
this.tdiDelBinding});
this.cmAddDel.Name = "cmAddDel";
this.cmAddDel.Size = new System.Drawing.Size(159, 48);
this.cmAddDel.Size = new System.Drawing.Size(161, 142);
this.cmAddDel.Opening += new System.ComponentModel.CancelEventHandler(this.cmAddDel_Opening);
//
// tsiAddBinding
//
this.tsiAddBinding.Name = "tsiAddBinding";
this.tsiAddBinding.Size = new System.Drawing.Size(158, 22);
this.tsiAddBinding.Size = new System.Drawing.Size(160, 22);
this.tsiAddBinding.Text = "Add Mapping";
this.tsiAddBinding.Click += new System.EventHandler(this.tsiAddBinding_Click);
//
// tdiDelBinding
//
this.tdiDelBinding.Name = "tdiDelBinding";
this.tdiDelBinding.Size = new System.Drawing.Size(158, 22);
this.tdiDelBinding.Size = new System.Drawing.Size(160, 22);
this.tdiDelBinding.Text = "Delete Mapping";
this.tdiDelBinding.Click += new System.EventHandler(this.tdiDelBinding_Click);
//
@ -443,15 +453,6 @@
this.tabJS1.TabIndex = 0;
this.tabJS1.Text = "Joystick 1";
//
// UC_JoyPanel
//
this.UC_JoyPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.UC_JoyPanel.JsAssignment = 0;
this.UC_JoyPanel.Location = new System.Drawing.Point(3, 3);
this.UC_JoyPanel.Name = "UC_JoyPanel";
this.UC_JoyPanel.Size = new System.Drawing.Size(275, 315);
this.UC_JoyPanel.TabIndex = 0;
//
// panel1
//
this.tlpanel.SetColumnSpan(this.panel1, 3);
@ -1095,6 +1096,41 @@
this.statusStrip1.TabIndex = 26;
this.statusStrip1.Text = "statusStrip1";
//
// tdiClearBinding
//
this.tdiClearBinding.Name = "tdiClearBinding";
this.tdiClearBinding.Size = new System.Drawing.Size(160, 22);
this.tdiClearBinding.Text = "Clear Mapping";
this.tdiClearBinding.Click += new System.EventHandler(this.tdiClearBinding_Click);
//
// tdiBlendBinding
//
this.tdiBlendBinding.Name = "tdiBlendBinding";
this.tdiBlendBinding.Size = new System.Drawing.Size(160, 22);
this.tdiBlendBinding.Text = "Blend Mapping";
this.tdiBlendBinding.Click += new System.EventHandler(this.tdiBlendBinding_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(157, 6);
//
// UC_JoyPanel
//
this.UC_JoyPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.UC_JoyPanel.JsAssignment = 0;
this.UC_JoyPanel.Location = new System.Drawing.Point(3, 3);
this.UC_JoyPanel.Name = "UC_JoyPanel";
this.UC_JoyPanel.Size = new System.Drawing.Size(275, 315);
this.UC_JoyPanel.TabIndex = 0;
//
// tdiAssignBinding
//
this.tdiAssignBinding.Name = "tdiAssignBinding";
this.tdiAssignBinding.Size = new System.Drawing.Size(160, 22);
this.tdiAssignBinding.Text = "Assign Mapping";
this.tdiAssignBinding.Click += new System.EventHandler(this.tdiAssignBinding_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1227,6 +1263,10 @@
private System.Windows.Forms.CheckBox cbxInvStrafeLon;
private System.Windows.Forms.CheckBox cbxInvThrottle;
private System.Windows.Forms.Button btDumpLog;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem tdiBlendBinding;
private System.Windows.Forms.ToolStripMenuItem tdiClearBinding;
private System.Windows.Forms.ToolStripMenuItem tdiAssignBinding;
}
}

@ -192,8 +192,8 @@ namespace SCJMapper_V2
String version = Application.ProductVersion; // get the version information
// BETA VERSION; TODO - comment out if not longer
//lblTitle.Text += " - V " + version.Substring( 0, version.IndexOf( ".", version.IndexOf( "." ) + 1 ) ); // PRODUCTION
lblTitle.Text += " - V " + version + " beta"; // BETA
lblTitle.Text += " - V " + version.Substring( 0, version.IndexOf( ".", version.IndexOf( "." ) + 1 ) ); // PRODUCTION
//lblTitle.Text += " - V " + version + " beta"; // BETA
log.InfoFormat( "Application Version: {0}", version.ToString( ) );
@ -639,6 +639,14 @@ namespace SCJMapper_V2
}
private void treeView1_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e )
{
if ( e.Button == System.Windows.Forms.MouseButtons.Right ) {
treeView1.SelectedNode = e.Node;
}
}
// Show options
private void cbxShowTreeOptions_CheckedChanged( object sender, EventArgs e )
@ -672,7 +680,7 @@ namespace SCJMapper_V2
private void btBlend_Click( object sender, EventArgs e )
{
if ( m_AT.CanBlendBinding ) {
m_AT.UpdateSelectedItem( DeviceCls.BlendedInput, InputMode, false );
m_AT.BlendBinding( );
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
}
else MySounds.PlayCannot( );
@ -681,7 +689,7 @@ namespace SCJMapper_V2
private void btClear_Click( object sender, EventArgs e )
{
if ( m_AT.CanClearBinding ) {
m_AT.UpdateSelectedItem( "", InputMode, false );
m_AT.ClearBinding( );
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
}
else MySounds.PlayCannot( );
@ -855,21 +863,57 @@ namespace SCJMapper_V2
// Node Menu
private void cmAddDel_Opening( object sender, CancelEventArgs e )
{
// note: the right click selected the node
ContextMenuStrip cts = ( sender as ContextMenuStrip );
Boolean any=false;
cts.Items[0].Visible = m_AT.CanAddBinding; any = any || m_AT.CanAddBinding;
cts.Items[1].Visible = m_AT.CanDelBinding; any = any || m_AT.CanDelBinding;
e.Cancel = !any;
Boolean any=false; // above separator
Boolean any2 = false; // below separator
if ( m_AT.CanAssignBinding ) {
cts.Items[0].Text = "Assign: " + JoystickCls.MakeThrottle( lblLastJ.Text, cbxThrottle.Checked );
}
cts.Items[0].Visible = m_AT.CanAssignBinding; any = any || m_AT.CanAssignBinding; // Assign
cts.Items[1].Visible = m_AT.CanBlendBinding; any = any || m_AT.CanBlendBinding; // Blend
cts.Items[2].Visible = m_AT.CanClearBinding; any = any || m_AT.CanClearBinding; // Clear
cts.Items[4].Visible = m_AT.CanAddBinding; any2 = any2 || m_AT.CanAddBinding; // Add
cts.Items[5].Visible = m_AT.CanDelBinding; any2 = any2 || m_AT.CanDelBinding; // Del
cts.Items[3].Visible = any2; // separator
e.Cancel = ! ( any || any2 );
}
private void tdiAssignBinding_Click( object sender, EventArgs e )
{ // same as btAssign_Click
if ( m_AT.UpdateSelectedItem( JoystickCls.MakeThrottle( lblLastJ.Text, cbxThrottle.Checked ), InputMode, true ) ) {
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
}
else MySounds.PlayNotfound( );
}
private void tdiBlendBinding_Click( object sender, EventArgs e )
{
// note: the right click selected the node
m_AT.BlendBinding( );
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
}
private void tdiClearBinding_Click( object sender, EventArgs e )
{
// note: the right click selected the node
m_AT.ClearBinding( );
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
}
private void tsiAddBinding_Click( object sender, EventArgs e )
{
// note: the right click selected the node
m_AT.AddBinding( );
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
}
private void tdiDelBinding_Click( object sender, EventArgs e )
{
// note: the right click selected the node
m_AT.DelBinding( );
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
}
@ -1256,13 +1300,7 @@ namespace SCJMapper_V2
#endregion
}
}

@ -128,7 +128,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABI
DwAAAk1TRnQBSQFMAgEBCAEAAdgBCwHYAQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
DwAAAk1TRnQBSQFMAgEBCAEAAYABDAGAAQwBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

@ -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.10.0.42" )]
[assembly: AssemblyFileVersion( "2.10.0.42" )]
[assembly: AssemblyVersion( "2.10.0.43" )]
[assembly: AssemblyFileVersion( "2.10.0.43" )]

@ -26,7 +26,7 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>42</ApplicationRevision>
<ApplicationRevision>43</ApplicationRevision>
<ApplicationVersion>2.10.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>

@ -100,6 +100,15 @@ namespace SCJMapper_V2
#region Properties
public Boolean CanAssignBinding
{
get
{
if ( Ctrl.SelectedNode == null ) return false;
else return ( Ctrl.SelectedNode.Level == 1 ) || ( Ctrl.SelectedNode.Level == 2 );
}
}
public Boolean CanBlendBinding
{
get
@ -118,6 +127,7 @@ namespace SCJMapper_V2
}
}
public Boolean CanAddBinding
{
get
@ -129,7 +139,8 @@ namespace SCJMapper_V2
public Boolean CanDelBinding
{
get {
get
{
if ( Ctrl.SelectedNode == null ) return false;
else return ( Ctrl.SelectedNode.Level == 2 );
}
@ -138,14 +149,14 @@ namespace SCJMapper_V2
#endregion
/// <summary>
/// Add a new Action Child to the selected Node to apply an addtional mapping
/// Add a new Action Child to the selected node to apply an addtional mapping
/// </summary>
public void AddBinding( )
{
if ( Ctrl.SelectedNode == null ) return;
if ( Ctrl.SelectedNode.Level != 1 ) return; // can only add to level 1 nodes
ActionTreeNode matn = FindMasterAction( ( ActionTreeNode )Ctrl.SelectedNode );
ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode );
ActionCls ac = FindActionObject( matn.Parent.Name, matn.Name ); // the related action
// make new items
ActionTreeInputNode matin = new ActionTreeInputNode( "UNDEF" ); matin.ImageKey = "Add";
@ -154,6 +165,10 @@ namespace SCJMapper_V2
// show stuff
FilterTree( );
FindAndSelectCtrlByName( matn.Name );
// jump to the latest
if ( m_ctrl.SelectedNode.LastNode != null ) {
m_ctrl.SelectedNode = m_ctrl.SelectedNode.LastNode;
}
}
@ -168,8 +183,8 @@ namespace SCJMapper_V2
ActionTreeNode matn = FindMasterAction( ( ActionTreeNode )Ctrl.SelectedNode.Parent ); // the parent treenode
ActionCls ac = FindActionObject( matn.Parent.Name, matn.Name ); // the related action
// delete items
ac.DelCommand( m_ctrl.SelectedNode.Index );
matn.Nodes.RemoveAt( m_ctrl.SelectedNode.Index );
ac.DelCommand( Ctrl.SelectedNode.Index );
matn.Nodes.RemoveAt( Ctrl.SelectedNode.Index );
Dirty = true;
// show stuff
FilterTree( );
@ -177,6 +192,16 @@ namespace SCJMapper_V2
}
public void BlendBinding( )
{
UpdateSelectedItem( DeviceCls.BlendedInput, ActionCls.ActionDevice.AD_Unknown, false );
}
public void ClearBinding( )
{
UpdateSelectedItem( "", ActionCls.ActionDevice.AD_Unknown, false );
}
/// <summary>
/// Assign the GUI Invert Checkboxes for further handling
/// </summary>
@ -222,8 +247,8 @@ namespace SCJMapper_V2
private void UpdateDeviceInformation( )
{
// must get the jsN information used for Options Inverters
for ( int item=0; item<(int)OptionsInvert.Inversions.I_LAST; item++) {
ActionMaps.Options.Inverter( (OptionsInvert.Inversions)item ).GameDevice = GetActionInstance( (OptionsInvert.Inversions)item );
for ( int item=0; item < ( int )OptionsInvert.Inversions.I_LAST; item++ ) {
ActionMaps.Options.Inverter( ( OptionsInvert.Inversions )item ).GameDevice = GetActionInstance( ( OptionsInvert.Inversions )item );
}
}
@ -232,7 +257,7 @@ namespace SCJMapper_V2
/// Dumps the actions to an XML String
/// </summary>
/// <returns>A string containing the XML</returns>
public String toXML()
public String toXML( )
{
if ( ActionMaps != null ) {
// must update the devices and instances for inversion before dumping the XML
@ -1008,7 +1033,8 @@ namespace SCJMapper_V2
public String SelectedAction
{
get {
get
{
if ( Ctrl.SelectedNode == null ) return "";
if ( Ctrl.SelectedNode.Level == 1 ) {
ActionTreeNode matn = FindMasterAction( ( ActionTreeNode )Ctrl.SelectedNode );

@ -11,7 +11,7 @@ namespace SCJMapper_V2
///
/// contains the input command i.e. - js2_button3 OR ! js1_x (MODs applies at the very beginning of the string)
/// </summary>
class ActionTreeInputNode : TreeNode
class ActionTreeInputNode : ActionTreeNode
{
#region Static items
@ -42,10 +42,10 @@ namespace SCJMapper_V2
/// </summary>
/// <param name="nodeText">The node text in 'action - command' notation</param>
/// <returns>the command part or an empty string</returns>
public static String CommandFromNodeText( String nodeText )
public new static String CommandFromNodeText( String nodeText )
{
String cmd;
DecompNodeText( nodeText, out cmd );
ActionTreeInputNode.DecompNodeText( nodeText, out cmd );
return cmd;
}
@ -62,9 +62,10 @@ namespace SCJMapper_V2
// ctor
public ActionTreeInputNode( ActionTreeInputNode srcNode )
: base( )
: base( srcNode )
{
if ( srcNode == null ) return;
/*
this.Name = srcNode.Name;
this.Text = srcNode.Text;
this.BackColor = srcNode.BackColor;
@ -73,12 +74,14 @@ namespace SCJMapper_V2
this.ImageKey = srcNode.ImageKey;
this.Tag = srcNode.Tag;
this.m_command = srcNode.m_command;
*/
}
// ctor
public ActionTreeInputNode( string text )
: base ( text )
{
this.Text = text;
//this.Text = text;
}
// ctor
@ -88,29 +91,29 @@ namespace SCJMapper_V2
}
private String m_command ="";
//private String m_command ="";
public new String Text
{
get { return base.Text; }
set
{
DecompNodeText( value, out m_command );
base.Text = ComposeNodeText( m_command );
ActionTreeInputNode.DecompNodeText( value, out m_command );
base.Text = ActionTreeInputNode.ComposeNodeText( m_command );
}
}
public String Command
public new String Command
{
get { return m_command; }
set
{
m_command = value;
base.Text = ComposeNodeText( m_command );
base.Text = ActionTreeInputNode.ComposeNodeText( m_command );
}
}
/*
public Boolean IsMappedAction
{
get
@ -120,6 +123,6 @@ namespace SCJMapper_V2
|| ( m_command == GamepadCls.BlendedInput ) );
}
}
*/
}
}

@ -56,7 +56,7 @@ namespace SCJMapper_V2
public static String ActionFromNodeText( String nodeText )
{
String action, cmd;
DecompNodeText( nodeText, out action, out cmd );
ActionTreeNode.DecompNodeText( nodeText, out action, out cmd );
return action;
}
@ -69,7 +69,7 @@ namespace SCJMapper_V2
public static String CommandFromNodeText( String nodeText )
{
String action, cmd;
DecompNodeText( nodeText, out action, out cmd );
ActionTreeNode.DecompNodeText( nodeText, out action, out cmd );
return cmd;
}
@ -114,7 +114,7 @@ namespace SCJMapper_V2
private String m_action = "";
private String m_command ="";
protected String m_command ="";
private ActionCls.ActionDevice m_actionDevice = ActionCls.ActionDevice.AD_Unknown;
public new String Text
@ -122,8 +122,8 @@ namespace SCJMapper_V2
get { return base.Text; }
set
{
DecompNodeText( value, out m_action, out m_command );
base.Text = ComposeNodeText( m_action, m_command );
ActionTreeNode.DecompNodeText( value, out m_action, out m_command );
base.Text = ActionTreeNode.ComposeNodeText( m_action, m_command );
}
}
@ -134,7 +134,7 @@ namespace SCJMapper_V2
set
{
m_action = value;
base.Text = ComposeNodeText( m_action, m_command );
base.Text = ActionTreeNode.ComposeNodeText( m_action, m_command );
}
}
@ -144,7 +144,7 @@ namespace SCJMapper_V2
set
{
m_command = value;
base.Text = ComposeNodeText( m_action, m_command );
base.Text = ActionTreeNode.ComposeNodeText( m_action, m_command );
}
}

@ -1,9 +1,9 @@
SC Joystick Mapper V 2.10 - Build 41 BETA
(c) Cassini, StandardToaster - 28-December-2014
SC Joystick Mapper V 2.10 - Build 43
(c) Cassini, StandardToaster - 04-January-2015
Contains 9 files:
SCJMapper.exe The program (V2.10 BETA)
SCJMapper.exe The program (V2.10)
SCJMapper.exe.config Program config (V2.10) - MUST be in the same folder as the Exe file
SharpDX.DirectInput.dll Managed DirectInput Assembly - MUST be in the same folder as the Exe file
SharpDX.dll Managed DirectX Assembly - MUST be in the same folder as the Exe file
@ -13,7 +13,7 @@ Ionic.Zip.Reduced.dll Managed Zip Assembly - MUST be in th
log4net.dll Managed Logging Assembly - MUST be in the same folder as the Exe file
log4net.config.OFF Config file for logging - To use it - rename as log4net.config and run the program
then look for trace.log in the same folder
SCJMapper_QGuide V2.8beta.pdf Quick Guide
SCJMapper_QGuide V2.10.pdf Quick Guide
ReadMe.txt This file
graphics folder Skybox Images - graphics folder MUST be in the same folder as the Exe file
@ -29,6 +29,10 @@ Scanned for viruses before packing...
cassini@burri-web.org
Changelog:
V 2.10 - Build 43 - Production
- new feature - added Action Tree context menu for Assign, Clear and Blend
- fix - issue for Js Reassignment if more than one was not yet assigned
- improvement - Right click in Action Tree selects the items (no need to select and then right click anymore)
V 2.10 - BETA Build 41
- fix - issue with null ptr assignment in Device Tuning (review and fix of AC1.0 changes)
- fix - disabled first joystick tab when gamepad is second or later

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save