V 2.48 - BETA Build 83

- updated Actionmap Groups for Layout Dialog taken from LayoutGroups.json from <User>Documents\SCJMapper\[PTU] folder
pull/104/head v2.48beta
bm98 4 years ago
parent 08def02ada
commit 37bafccc66

@ -87,6 +87,18 @@ namespace SCJMapper_V2
return Path.Combine( UserDir, mapName + ".xml" );
}
/// <summary>
/// Returns the Layout Groups Json file name + path into our user dir
/// </summary>
/// <returns>A fully qualified filename</returns>
static public string LayoutJsonFileName( )
{
log.Debug( "LayoutJsonFileName - Entry" );
return Path.Combine( UserDir, "LayoutGroups.json" );
}
/// <summary>
/// Returns the mapping file name + path into our user dir
/// </summary>

@ -11,6 +11,9 @@ namespace SCJMapper_V2.Layout
/// </summary>
class ActionGroups
{
// logger
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
/// <summary>
/// All actionmap groups
/// </summary>
@ -24,7 +27,7 @@ namespace SCJMapper_V2.Layout
Player,
EVA,
Vehicle,
VehicleWeapons,
//VehicleWeapons, // removed in 3.10.0
Lights,
Interaction,
Spectator,
@ -39,33 +42,57 @@ namespace SCJMapper_V2.Layout
static ActionGroups()
{
m_actionDict = new Dictionary<EGroup, List<string>>( );
// Define which maps belongs to which group
var x = new List<string>( ) { "spaceship_general", "spaceship_view", "spaceship_movement", "spaceship_docking", "spaceship_power", "IFCS_controls" };
m_actionDict.Add( EGroup.SpaceFlight, x );
x = new List<string>( ) { "spaceship_targeting", "spaceship_target_hailing", "spaceship_scanning", "spaceship_ping", "spaceship_radar" };
m_actionDict.Add( EGroup.SpaceTargeting, x );
x = new List<string>( ) { "spaceship_mining" };
m_actionDict.Add( EGroup.SpaceMining, x );
x = new List<string>( ) { "spaceship_turret", "spaceship_weapons", "spaceship_missiles", "spaceship_auto_weapons" };
m_actionDict.Add( EGroup.SpaceWeapons, x );
x = new List<string>( ) { "spaceship_defensive" };
m_actionDict.Add( EGroup.SpaceDefensive, x );
x = new List<string>( ) { "lights_controller" };
m_actionDict.Add( EGroup.Lights, x );
x = new List<string>( ) { "default", "prone", "player", "player_choice", "player_emotes", "player_input_optical_tracking" };
m_actionDict.Add( EGroup.Player, x );
x = new List<string>( ) { "zero_gravity_eva" };
m_actionDict.Add( EGroup.EVA, x );
x = new List<string>( ) { "vehicle_general", "vehicle_driver" };
m_actionDict.Add( EGroup.Vehicle, x );
x = new List<string>( ) { "vehicle_gunner" };
m_actionDict.Add( EGroup.VehicleWeapons, x );
x = new List<string>( ) { "spaceship_hud", "ui_textfield", "ui_notification" };
m_actionDict.Add( EGroup.Interaction, x );
x = new List<string>( ) { "spectator", "flycam", "view_director_mode" };
m_actionDict.Add( EGroup.Spectator, x );
x = new List<string>( ) { };
m_actionDict.Add( EGroup.Others, x );
// Try to read the user file
var lg = LayoutGroupsJson.FromJson( TheUser.LayoutJsonFileName( ) );
if ( lg != null ) {
log.Info( "Layout-ActionGroups: use user provided file" );
// read from the user file
m_actionDict.Add( EGroup.SpaceFlight, lg.SpaceFlight );
m_actionDict.Add( EGroup.SpaceTargeting, lg.SpaceTargeting );
m_actionDict.Add( EGroup.SpaceMining, lg.SpaceMining );
m_actionDict.Add( EGroup.SpaceWeapons, lg.SpaceWeapons );
m_actionDict.Add( EGroup.SpaceDefensive, lg.SpaceDefensive );
m_actionDict.Add( EGroup.Lights, lg.Lights );
m_actionDict.Add( EGroup.Player, lg.Player );
m_actionDict.Add( EGroup.EVA, lg.EVA );
m_actionDict.Add( EGroup.Vehicle, lg.Vehicle );
//m_actionDict.Add( EGroup.VehicleWeapons, lg.VehicleWeapons ); // removed in 3.10.0
m_actionDict.Add( EGroup.Interaction, lg.Interaction );
m_actionDict.Add( EGroup.Spectator, lg.Spectator );
m_actionDict.Add( EGroup.Others, lg.Others );
}
else {
log.Info( "Layout-ActionGroups: user provided file not available, use internal backup mapping" );
// use the built in backup assignment (as of 3.10.0/1
// Define which maps belongs to which group
var x = new List<string>( ) { "spaceship_general", "spaceship_view", "spaceship_movement", "spaceship_docking", "spaceship_power", "IFCS_controls" };
m_actionDict.Add( EGroup.SpaceFlight, x );
x = new List<string>( ) { "spaceship_targeting", "spaceship_target_hailing", "spaceship_scanning", "spaceship_ping", "spaceship_radar", "spaceship_targeting_advanced" };
m_actionDict.Add( EGroup.SpaceTargeting, x );
x = new List<string>( ) { "spaceship_mining" };
m_actionDict.Add( EGroup.SpaceMining, x );
x = new List<string>( ) { "turret_main", "spaceship_weapons", "spaceship_missiles", "spaceship_auto_weapons" };
m_actionDict.Add( EGroup.SpaceWeapons, x );
x = new List<string>( ) { "spaceship_defensive" };
m_actionDict.Add( EGroup.SpaceDefensive, x );
x = new List<string>( ) { "lights_controller" };
m_actionDict.Add( EGroup.Lights, x );
x = new List<string>( ) { "default", "prone", "player", "player_choice", "player_emotes", "player_input_optical_tracking" };
m_actionDict.Add( EGroup.Player, x );
x = new List<string>( ) { "zero_gravity_eva" };
m_actionDict.Add( EGroup.EVA, x );
x = new List<string>( ) { "vehicle_general", "vehicle_driver" };
m_actionDict.Add( EGroup.Vehicle, x );
//x = new List<string>( ) { "vehicle_gunner" }; // removed in 3.10.0
//m_actionDict.Add( EGroup.VehicleWeapons, x ); // removed in 3.10.0
x = new List<string>( ) { "spaceship_hud", "ui_textfield", "ui_notification" };
m_actionDict.Add( EGroup.Interaction, x );
x = new List<string>( ) { "spectator", "flycam", "view_director_mode" };
m_actionDict.Add( EGroup.Spectator, x );
x = new List<string>( ) { "server_renderer" };
m_actionDict.Add( EGroup.Others, x );
}
}
/// <summary>

@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;
namespace SCJMapper_V2.Layout
{
// The Json file for LayoutGroups
/*
{
"_comment" : "Layout Groups File (leave group names alone, change only the contained groups)",
"SpaceFlight" :[ "spaceship_general", "spaceship_view", "spaceship_movement", "spaceship_docking", "spaceship_power", "IFCS_controls"],
"SpaceDefensive" :[ "spaceship_defensive" ],
"SpaceTargeting" :[ "spaceship_targeting", "spaceship_target_hailing", "spaceship_scanning", "spaceship_ping", "spaceship_radar", "spaceship_targeting_advanced" ],
"SpaceWeapons" :[ "turret_main", "spaceship_weapons", "spaceship_missiles", "spaceship_auto_weapons" ],
"SpaceMining" :[ "spaceship_mining" ],
"Player" :[ "default", "prone", "player", "player_choice", "player_emotes", "player_input_optical_tracking" ],
"EVA" :[ "zero_gravity_eva" ],
"Vehicle" :[ "vehicle_general", "vehicle_driver" ],
"Lights" :[ "lights_controller" ],
"Interaction" :[ "spaceship_hud", "ui_textfield", "ui_notification" ],
"Spectator" :[ "spectator", "flycam", "view_director_mode" ],
"Others" :[ "server_renderer" ]
}
*/
/// <summary>
/// The LaoutGroups File
/// </summary>
[DataContract]
class LayoutGroups
{
[DataMember( IsRequired = false )]
public string _comment { get; set; }
[DataMember( IsRequired = true )]
public List<string> SpaceFlight { get; set; } = new List<string>( );
[DataMember( IsRequired = true )]
public List<string> SpaceDefensive { get; set; } = new List<string>( );
[DataMember( IsRequired = true )]
public List<string> SpaceTargeting { get; set; } = new List<string>( );
[DataMember( IsRequired = true )]
public List<string> SpaceWeapons { get; set; } = new List<string>( );
[DataMember( IsRequired = true )]
public List<string> SpaceMining { get; set; } = new List<string>( );
[DataMember( IsRequired = true )]
public List<string> Player { get; set; } = new List<string>( );
[DataMember( IsRequired = true )]
public List<string> EVA { get; set; } = new List<string>( );
[DataMember( IsRequired = true )]
public List<string> Vehicle { get; set; } = new List<string>( );
[DataMember( IsRequired = true )]
public List<string> Lights { get; set; } = new List<string>( );
[DataMember( IsRequired = true )]
public List<string> Interaction { get; set; } = new List<string>( );
[DataMember( IsRequired = true )]
public List<string> Spectator { get; set; } = new List<string>( );
[DataMember( IsRequired = true )]
public List<string> Others { get; set; } = new List<string>( );
// non Json
}
}

@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Json;
using System.Text;
using System.Threading.Tasks;
namespace SCJMapper_V2.Layout
{
class LayoutGroupsJson
{
// logger
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
/// <summary>
/// Reads from a LayoutGroups file
/// </summary>
/// <param name="jFilename">The Json Filename</param>
/// <returns>A LayoutGroups obj or null for errors</returns>
public static LayoutGroups FromJson( string jFilename )
{
LayoutGroups c = null;
if ( File.Exists( jFilename ) ) {
using ( var ts = File.OpenRead( jFilename ) ) {
c = FromJson( ts );
}
}
else {
log.Debug( $"LayoutGroups.FromJson: Userfile does not exist ({jFilename})" );
}
return c;
}
/// <summary>
/// Reads from a LayoutGroups stream
/// </summary>
/// <param name="jStream">An open stream at position</param>
/// <returns>A LayoutGroups obj or null for errors</returns>
public static LayoutGroups FromJson( Stream jStream )
{
try {
var jsonSerializer = new DataContractJsonSerializer( typeof( LayoutGroups ) );
object objResponse = jsonSerializer.ReadObject( jStream );
var jsonResults = objResponse as LayoutGroups;
return jsonResults;
}
catch ( Exception e ) {
log.Debug( $"LayoutGroups.FromJson: Serializer Exception ({e.Message})" );
return null;
}
}
}
}

@ -122,7 +122,7 @@ namespace SCJMapper_V2.Layout
{ EGroup.Player, ConvertFromString(AppSettings.Instance.GroupColor_05) },
{ EGroup.EVA, ConvertFromString(AppSettings.Instance.GroupColor_06) },
{ EGroup.Vehicle, ConvertFromString(AppSettings.Instance.GroupColor_07) },
{ EGroup.VehicleWeapons, ConvertFromString(AppSettings.Instance.GroupColor_08) },
// { EGroup.VehicleWeapons, ConvertFromString(AppSettings.Instance.GroupColor_08) }, // removed in 3.10.0
{ EGroup.Lights, ConvertFromString(AppSettings.Instance.GroupColor_09) },
{ EGroup.Interaction, ConvertFromString(AppSettings.Instance.GroupColor_10) },
{ EGroup.Spectator, ConvertFromString(AppSettings.Instance.GroupColor_11) },
@ -145,7 +145,7 @@ namespace SCJMapper_V2.Layout
AppSettings.Instance.GroupColor_05 = ConvertToString( m_amColors[EGroup.Player] );
AppSettings.Instance.GroupColor_06 = ConvertToString( m_amColors[EGroup.EVA] );
AppSettings.Instance.GroupColor_07 = ConvertToString( m_amColors[EGroup.Vehicle] );
AppSettings.Instance.GroupColor_08 = ConvertToString( m_amColors[EGroup.VehicleWeapons] );
// AppSettings.Instance.GroupColor_08 = ConvertToString( m_amColors[EGroup.VehicleWeapons] );// removed in 3.10.0
AppSettings.Instance.GroupColor_09 = ConvertToString( m_amColors[EGroup.Lights] );
AppSettings.Instance.GroupColor_10 = ConvertToString( m_amColors[EGroup.Interaction] );
AppSettings.Instance.GroupColor_11 = ConvertToString( m_amColors[EGroup.Spectator] );

@ -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.47.0.82" )]
[assembly: AssemblyFileVersion( "2.47.0.82" )]
[assembly: AssemblyVersion( "2.48.0.83" )]
[assembly: AssemblyFileVersion( "2.48.0.83" )]

@ -1,12 +1,12 @@
SC Joystick Mapper V 2.47 - Build 82 BETA
(c) Cassini, StandardToaster - 12-Apr-2020
SC Joystick Mapper V 2.48 - Build 83 BETA
(c) Cassini, StandardToaster - 18-Aug-2020
Contains 14 files + graphics:
SCJMapper.exe The program (V2.46)
SCJMapper.exe The program (V2.48)
- The following files and folders MUST be in the same folder as the Exe file
SCJMapper.exe.config Program config (V2.47)
SCJMapper.exe.config Program config (V2.48)
de\SCJMapper.resources.dll German language (V2.45)
fr\SCJMapper.resources.dll French language (V2.45)
Storage\*.scj Folder for collected assets (V2.35)
@ -20,9 +20,9 @@ x64\libzstd.dll Native dll for ZstdNet (v2.33)
x86\libzstd.dll Native dll for ZstdNet (v2.33)
log4net.dll Managed Logging Assembly
log4net.config.OFF Config file for logging
then look for trace.log in the same folder
rename without .OFF, restart and then look for trace.log in the same folder
SCJMapper_QGuide V2.35beta.pdf Quick Guide (v2.35)
SCJMapper_QGuide V2.47beta.pdf Quick Guide (v2.47)
ReadMe.txt This file
graphics folder Skybox Images (V2.32) - graphics folder MUST be in the same folder as the Exe file
@ -50,6 +50,8 @@ Scanned for viruses before packing...
cassini@burri-web.org
Changelog:
V 2.48 - BETA Build 83
- updated Actionmap Groups for Layout Dialog taken from LayoutGroups.json from <User>Documents\SCJMapper\[PTU] folder
V 2.47 - BETA Build 82
- add Mode to create SCJoyServer Command items from action tree
- add Saving ActionTree to a json file in <User>\Documents\SCJM\file.scjn.json for other tools (easier than XML)

@ -27,8 +27,8 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>82</ApplicationRevision>
<ApplicationVersion>2.47.0.82</ApplicationVersion>
<ApplicationRevision>83</ApplicationRevision>
<ApplicationVersion>2.48.0.83</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
@ -168,6 +168,8 @@
<Compile Include="Layout\ActionItem.cs" />
<Compile Include="Layout\ActionItemList.cs" />
<Compile Include="Layout\DbgActionItemList.cs" />
<Compile Include="Layout\LayoutGroups.cs" />
<Compile Include="Layout\LayoutGroupsJson.cs" />
<Compile Include="Layout\MapProps.cs" />
<Compile Include="Layout\ControllerJson.cs" />
<Compile Include="Layout\DeviceFile.cs" />

@ -0,0 +1,62 @@
{
"_comment": "Layout Groups File as of Alpha 3.10.0 (leave group names alone, change only the contained groups)",
"SpaceFlight": [
"spaceship_general",
"spaceship_view",
"spaceship_movement",
"spaceship_docking",
"spaceship_power",
"IFCS_controls"
],
"SpaceDefensive": [
"spaceship_defensive"
],
"SpaceTargeting": [
"spaceship_targeting",
"spaceship_target_hailing",
"spaceship_scanning",
"spaceship_ping",
"spaceship_radar",
"spaceship_targeting_advanced"
],
"SpaceWeapons": [
"turret_main",
"spaceship_weapons",
"spaceship_missiles",
"spaceship_auto_weapons"
],
"SpaceMining": [
"spaceship_mining"
],
"Player": [
"default",
"prone",
"player",
"player_choice",
"player_emotes",
"player_input_optical_tracking"
],
"EVA": [
"zero_gravity_eva"
],
"Vehicle": [
"vehicle_general",
"vehicle_driver"
],
"Lights": [
"lights_controller"
],
"Interaction": [
"spaceship_hud",
"ui_textfield",
"ui_notification"
],
"Spectator": [
"spectator",
"flycam",
"view_director_mode"
],
"Others": [
"server_renderer"
]
}
Loading…
Cancel
Save