This commit is contained in:
mika-n 2019-12-26 14:25:31 +02:00
commit ebb0c9c763
13 changed files with 96 additions and 24 deletions

View File

@ -421,7 +421,7 @@ namespace DS4Windows
[DS4Controls.GyroXPos] = "Gyro X+",
[DS4Controls.GyroXNeg] = "Gyro X-",
[DS4Controls.GyroZPos] = "Gyro Z+",
[DS4Controls.GyroZNeg] = "Gyro Z+-",
[DS4Controls.GyroZNeg] = "Gyro Z-",
[DS4Controls.SwipeLeft] = "Swipe Left",
[DS4Controls.SwipeRight] = "Swipe Right",
[DS4Controls.SwipeUp] = "Swipe Up",

View File

@ -25,12 +25,14 @@
<StackPanel Orientation="Horizontal" Margin="{StaticResource spaceMargin}">
<Label Content="Heavy" Width="50" />
<xctk:IntegerUpDown Value="{Binding HeavyRumble}" MinWidth="60" Margin="20,0,0,0" />
<xctk:IntegerUpDown Value="{Binding HeavyRumble}" MinWidth="60" Margin="20,0,0,0"
Minimum="0" Maximum="255" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource spaceMargin}">
<Label Content="Light" Width="50" />
<xctk:IntegerUpDown Value="{Binding LightRumble}" MinWidth="60" Margin="20,0,0,0" />
<xctk:IntegerUpDown Value="{Binding LightRumble}" MinWidth="60" Margin="20,0,0,0"
Minimum="0" Maximum="255" />
</StackPanel>
<StackPanel Orientation="Vertical">
@ -52,12 +54,14 @@
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource spaceMargin}">
<Label Content="Flash Rate"/>
<xctk:IntegerUpDown MinWidth="50" Value="{Binding FlashRate}" />
<xctk:IntegerUpDown MinWidth="50" Value="{Binding FlashRate}"
Minimum="0" Maximum="20" />
</StackPanel>
<StackPanel Orientation="Vertical">
<CheckBox Content="Change Mouse Sensitivity" IsChecked="{Binding UseMouseSens}"
Margin="{StaticResource spaceMargin}" />
<xctk:IntegerUpDown Value="{Binding MouseSens}" MinWidth="50" Height="20" />
<xctk:IntegerUpDown Value="{Binding MouseSens}" MinWidth="50" Height="20"
Minimum="0" Maximum="255" />
</StackPanel>
</StackPanel>
</StackPanel>

View File

@ -488,7 +488,7 @@ namespace DS4WinWPF.DS4Forms
new BindAssociation() { outputType = BindAssociation.OutType.Key, outkey = 0x52 });
rKey.Click += OutputKeyBtn_Click;
associatedBindings.Add(tKey,
new BindAssociation() { outputType = BindAssociation.OutType.Key, outkey = 0x55 });
new BindAssociation() { outputType = BindAssociation.OutType.Key, outkey = 0x54 });
tKey.Click += OutputKeyBtn_Click;
associatedBindings.Add(yKey,
new BindAssociation() { outputType = BindAssociation.OutType.Key, outkey = 0x59 });

View File

@ -1213,6 +1213,7 @@ Properties.Resources.DS4Update, MessageBoxButton.YesNo, MessageBoxImage.Question
private void NotifyIcon_TrayMiddleMouseDown(object sender, RoutedEventArgs e)
{
contextclose = true;
Close();
}
@ -1283,6 +1284,11 @@ Properties.Resources.DS4Update, MessageBoxButton.YesNo, MessageBoxImage.Question
private void Editor_CreatedProfile(ProfileEditor sender, string profile)
{
profileListHolder.AddProfileSort(profile);
int devnum = sender.DeviceNum;
if (devnum >= 0 && devnum+1 <= conLvViewModel.ControllerCol.Count)
{
conLvViewModel.ControllerCol[devnum].ChangeSelectedProfile(profile);
}
}
private void NotifyIcon_TrayMouseDoubleClick(object sender, RoutedEventArgs e)

View File

@ -100,7 +100,7 @@
</Style.Triggers>
</Style>
</Button.Style>
<Rectangle x:Name="lightbarRect" Fill="{Binding MainColorString,FallbackValue=Green}" Width="{Binding Path=Width, ElementName=ds4LightbarColorBtn}"
<Rectangle x:Name="lightbarRect" Fill="{Binding LightbarBrush,FallbackValue=Green}" Width="{Binding Path=Width, ElementName=ds4LightbarColorBtn}"
Height="{Binding Path=Height, ElementName=ds4LightbarColorBtn}">
<Rectangle.OpacityMask>
<ImageBrush ImageSource="/DS4Windows;component/Resources/DS4 lightbar.png" />
@ -620,7 +620,8 @@
<ComboBoxItem Content="Flash at"/>
<ComboBoxItem Content="Pulse at"/>
</ComboBox>
<xctk:IntegerUpDown d:IsHidden="True" Value="{Binding FlashAt}" MinWidth="50" />
<xctk:IntegerUpDown d:IsHidden="True" Value="{Binding FlashAt}" MinWidth="50"
Minimum="0" Maximum="100" Increment="10" />
<Label Content="%" />
<Button x:Name="flashColorBtn" Width="20" Height="20" Background="{Binding FlashColor,FallbackValue=Blue}"
ToolTip="{lex:Loc Resources:FlashAtTip}" Click="FlashColorBtn_Click" />
@ -648,7 +649,7 @@
<Image Source="/DS4Windows;component/Resources/rainbow.png" />
</Button.Content>
</Button>
<xctk:IntegerUpDown MinWidth="30" Height="30" Minimum="0" Maximum="60" Margin="8,0,0,0"
<xctk:IntegerUpDown MinWidth="30" Height="30" Minimum="0" Maximum="60" Increment="1" Margin="8,0,0,0"
Value="{Binding Rainbow,FallbackValue=5}" IsEnabled="{Binding RainbowExists}" />
<Label Content="secs/cycle" Padding="0" Margin="8,0,0,0" VerticalContentAlignment="Center" />
<StackPanel Margin="8,0,0,0">
@ -672,23 +673,23 @@
<StackPanel x:Name="gyroControlsPanel" Visibility="Visible">
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
<Button x:Name="gyroZNBtn" Content="Tilt Up" Width="100"/>
<Button x:Name="gyroZNBtn" Content="Tilt Up" Width="100" Tag="33" Click="TiltControlsButton_Click" />
<Label x:Name="gyroZNLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
<Button x:Name="gyroZPBtn" Content="Tilt Down" Width="100"/>
<Button x:Name="gyroZPBtn" Content="Tilt Down" Width="100" Tag="32" Click="TiltControlsButton_Click" />
<Label x:Name="gyroZPLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
<Button x:Name="gyroXNBtn" Content="Tilt Left" Width="100"/>
<Label x:Name="gyroXNLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
<Button x:Name="gyroXPBtn" Content="Tilt Left" Width="100" Tag="30" Click="TiltControlsButton_Click" />
<Label x:Name="gyroXLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
<Button x:Name="gyroXPBtn" Content="Tilt Right" Width="100"/>
<Label x:Name="gyroXLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
<Button x:Name="gyroXNBtn" Content="Tilt Right" Width="100" Tag="31" Click="TiltControlsButton_Click" />
<Label x:Name="gyroXNLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
@ -769,7 +770,7 @@
<StackPanel Orientation="Horizontal" Margin="{StaticResource spaceMargin}">
<Label Content="Vertical Scale:" />
<xctk:IntegerUpDown d:IsHidden="True" MinWidth="50" Margin="8,0,0,0" Value="{Binding GyroVertScale}"
Minimum="0" Maximum="500" />
Minimum="0" Maximum="400" Increment="10" />
<Label Content="%" />
</StackPanel>
@ -872,7 +873,8 @@
<StackPanel Orientation="Horizontal" Margin="{StaticResource spaceMargin}">
<Label Content="Vertical Scale" />
<xctk:IntegerUpDown d:IsHidden="True" Margin="8,0,0,0" Value="{Binding GyroMouseStickVertScale}" MinWidth="60" />
<xctk:IntegerUpDown d:IsHidden="True" Margin="8,0,0,0" Value="{Binding GyroMouseStickVertScale}" MinWidth="60"
Minimum="0" Maximum="400" Increment="10" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="{StaticResource spaceMargin}">
@ -934,7 +936,8 @@
</StackPanel>
<StackPanel Orientation="Horizontal" Height="40" Margin="0,4,0,0">
<Label Content="Mouse Sensitivity" VerticalAlignment="Center" />
<xctk:IntegerUpDown d:IsHidden="True" MinWidth="50" Height="20" Value="25" Margin="10,0,0,0" />
<xctk:IntegerUpDown d:IsHidden="True" MinWidth="50" Height="20" Value="25"
Minimum="0" Maximum="255" Increment="1" Margin="10,0,0,0" />
</StackPanel>
<CheckBox Content="Mouse Acceleration" IsChecked="{Binding MouseAcceleration}" Margin="0,6,0,0" />
<CheckBox Content="Enable Touchpad Toggle" IsChecked="{Binding EnableTouchpadToggle}" Margin="0,6,0,0" />

View File

@ -52,6 +52,7 @@ namespace DS4WinWPF.DS4Forms
private bool keepsize;
private bool controllerReadingsTabActive = false;
public bool Keepsize { get => keepsize; }
public int DeviceNum { get => deviceNum; }
private NonFormTimer inputTimer;
@ -1242,5 +1243,17 @@ namespace DS4WinWPF.DS4Forms
conReadingsUserCon.EnableControl(false);
}
}
private void TiltControlsButton_Click(object sender, RoutedEventArgs e)
{
Button btn = sender as Button;
DS4Controls control = (DS4Controls)Convert.ToInt32(btn.Tag);
MappedControl mpControl = mappingListVM.ControlMap[control];
BindingWindow window = new BindingWindow(deviceNum, mpControl.Setting);
window.Owner = App.Current.MainWindow;
window.ShowDialog();
mpControl.UpdateMappingName();
UpdateHighlightLabel(mpControl);
}
}
}

View File

@ -67,8 +67,8 @@ namespace DS4WinWPF.DS4Forms.ViewModels
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroZNeg, "Tilt Up", devType));
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroZPos, "Tilt Down", devType));
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroXNeg, "Tilt Left", devType));
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroXPos, "Tilt Right", devType));
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroXPos, "Tilt Left", devType));
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroXNeg, "Tilt Right", devType));
mappings.Add(new MappedControl(devIndex, DS4Controls.SwipeUp, "Swipe Up", devType));
mappings.Add(new MappedControl(devIndex, DS4Controls.SwipeDown, "Swipe Down", devType));

View File

@ -20,6 +20,36 @@ namespace DS4WinWPF.DS4Forms.ViewModels
private int funcDevNum;
public int FuncDevNum { get => funcDevNum; }
private ImageBrush lightbarImgBrush = new ImageBrush();
private SolidColorBrush lightbarColBrush = new SolidColorBrush();
public System.Windows.Media.Brush LightbarBrush
{
get
{
System.Windows.Media.Brush tempBrush;
ref DS4Color color = ref Global.MainColor[device];
if (!RainbowExists)
{
lightbarColBrush.Color = new System.Windows.Media.Color()
{
A = 255,
R = color.red,
G = color.green,
B = color.blue
};
tempBrush = lightbarColBrush as System.Windows.Media.Brush;
}
else
{
tempBrush = lightbarImgBrush as System.Windows.Media.Brush;
}
return tempBrush;
}
}
public event EventHandler LightbarBrushChanged;
public System.Windows.Media.Color MainColor
{
get
@ -1372,21 +1402,34 @@ namespace DS4WinWPF.DS4Forms.ViewModels
Global.outDevTypeTemp[device] = OutContType.X360;
tempBtPollRate = Global.BTPollRate[device];
ImageSourceConverter sourceConverter = new ImageSourceConverter();
ImageSource temp = sourceConverter.
ConvertFromString("pack://application:,,,/DS4Windows;component/Resources/rainbowCCrop.png") as ImageSource;
lightbarImgBrush.ImageSource = temp.Clone();
MainColorChanged += ProfileSettingsViewModel_MainColorChanged;
MainColorRChanged += (sender, args) =>
{
MainColorRStringChanged?.Invoke(this, EventArgs.Empty);
MainColorStringChanged?.Invoke(this, EventArgs.Empty);
LightbarBrushChanged?.Invoke(this, EventArgs.Empty);
};
MainColorGChanged += (sender, args) =>
{
MainColorGStringChanged?.Invoke(this, EventArgs.Empty);
MainColorStringChanged?.Invoke(this, EventArgs.Empty);
LightbarBrushChanged?.Invoke(this, EventArgs.Empty);
};
MainColorBChanged += (sender, args) =>
{
MainColorBStringChanged?.Invoke(this, EventArgs.Empty);
MainColorStringChanged?.Invoke(this, EventArgs.Empty);
LightbarBrushChanged?.Invoke(this, EventArgs.Empty);
};
RainbowChanged += (sender, args) =>
{
LightbarBrushChanged?.Invoke(this, EventArgs.Empty);
};
}
@ -1396,6 +1439,7 @@ namespace DS4WinWPF.DS4Forms.ViewModels
MainColorRChanged?.Invoke(this, EventArgs.Empty);
MainColorGChanged?.Invoke(this, EventArgs.Empty);
MainColorBChanged?.Invoke(this, EventArgs.Empty);
LightbarBrushChanged?.Invoke(this, EventArgs.Empty);
}
public void UpdateFlashColor(System.Windows.Media.Color color)

View File

@ -410,6 +410,8 @@
<Content Include="BezierCurveEditor\index.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Resource Include="Resources\rainbowCCrop.png" />
<Resource Include="Resources\rainbowC.png" />
<Resource Include="Resources\DS4 lightbar.png" />
<Resource Include="Resources\keydown.png" />
<Resource Include="Resources\keyup.png" />

View File

@ -51,7 +51,7 @@ using System.Windows;
// 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("1.9.2")]
[assembly: AssemblyFileVersion("1.9.2")]
[assembly: AssemblyVersion("2.0.0")]
[assembly: AssemblyFileVersion("2.0.0")]
[assembly: NeutralResourcesLanguage("")]
[assembly: Guid("a52b5b20-d9ee-4f32-8518-307fa14aa0c6")]

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1 +1 @@
1.7.28
2.0.0

View File

@ -20,7 +20,7 @@ website at [ds4windows.com](http://ds4windows.com).
- Windows 7 SP1 or newer
- [Microsoft .NET 4.6.2 or higher (needed to unzip the driver and for macros to
work properly)](https://www.microsoft.com/en-us/download/details.aspx?id=53344)
- Visual C++ 2017 Redistributable. [x64](https://aka.ms/vs/15/release/vc_redist.x64.exe) or [x86](https://aka.ms/vs/15/release/vc_redist.x86.exe)
- Visual C++ 2015-2019 Redistributable. [x64](https://aka.ms/vs/16/release/vc_redist.x64.exe) or [x86](https://aka.ms/vs/16/release/vc_redist.x86.exe)
- ViGEmBus driver (DS4Windows will install it for you)
- Microsoft 360 Driver (link inside DS4Windows, already installed by Windows if
you've used a 360 controller before)