2014-03-28 02:50:40 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using DS4Library;
|
|
|
|
|
using DS4Control;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Reflection;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
namespace ScpServer
|
|
|
|
|
{
|
|
|
|
|
public partial class Options : Form
|
|
|
|
|
{
|
|
|
|
|
private DS4Control.Control scpDevice;
|
2014-05-30 22:39:39 +02:00
|
|
|
|
public int device;
|
2014-06-02 19:29:38 +02:00
|
|
|
|
public string filename;
|
|
|
|
|
Byte[] oldLedColor, oldLowLedColor, oldChargingColor;
|
2014-06-21 20:00:28 +02:00
|
|
|
|
public Timer inputtimer = new Timer(), sixaxisTimer = new Timer();
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
public List<Button> buttons = new List<Button>(), subbuttons = new List<Button>();
|
2014-04-27 21:32:09 +02:00
|
|
|
|
private Button lastSelected;
|
2014-04-30 21:32:44 +02:00
|
|
|
|
private int alphacolor;
|
|
|
|
|
private Color reg, full;
|
|
|
|
|
private Image colored, greyscale;
|
2014-05-25 01:08:40 +02:00
|
|
|
|
ToolTip tp = new ToolTip();
|
2014-06-03 07:29:42 +02:00
|
|
|
|
Graphics g;
|
2014-05-30 22:39:39 +02:00
|
|
|
|
ScpForm root;
|
2014-08-23 22:52:20 +02:00
|
|
|
|
bool olddinputcheck = false;
|
2014-05-30 22:39:39 +02:00
|
|
|
|
public Options(DS4Control.Control bus_device, int deviceNum, string name, ScpForm rt)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
device = deviceNum;
|
|
|
|
|
scpDevice = bus_device;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
filename = name;
|
2014-04-30 21:32:44 +02:00
|
|
|
|
colored = pBRainbow.Image;
|
2014-05-30 22:39:39 +02:00
|
|
|
|
root = rt;
|
2014-06-03 07:29:42 +02:00
|
|
|
|
g = CreateGraphics();
|
2014-04-30 21:32:44 +02:00
|
|
|
|
greyscale = GreyscaleImage((Bitmap)pBRainbow.Image);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
foreach (System.Windows.Forms.Control control in MainPanel.Controls)
|
|
|
|
|
if (control is Button)
|
|
|
|
|
if (!((Button)control).Name.Contains("btn"))
|
|
|
|
|
buttons.Add((Button)control);
|
|
|
|
|
foreach (System.Windows.Forms.Control control in SticksPanel.Controls)
|
|
|
|
|
if (control is Button)
|
|
|
|
|
if (!((Button)control).Name.Contains("btn"))
|
|
|
|
|
buttons.Add((Button)control);
|
|
|
|
|
foreach (System.Windows.Forms.Control control in fLPTiltControls.Controls)
|
|
|
|
|
if (control is Button)
|
|
|
|
|
if (!((Button)control).Name.Contains("btn"))
|
|
|
|
|
buttons.Add((Button)control);
|
|
|
|
|
foreach (System.Windows.Forms.Control control in ShiftMainPanel.Controls)
|
|
|
|
|
if (control is Button)
|
|
|
|
|
if (!((Button)control).Name.Contains("sbtn"))
|
|
|
|
|
subbuttons.Add((Button)control);
|
|
|
|
|
foreach (System.Windows.Forms.Control control in ShiftSticksPanel.Controls)
|
|
|
|
|
if (control is Button)
|
|
|
|
|
if (!((Button)control).Name.Contains("sbtn"))
|
|
|
|
|
subbuttons.Add((Button)control);
|
|
|
|
|
foreach (System.Windows.Forms.Control control in sfLPTiltControls.Controls)
|
|
|
|
|
if (control is Button)
|
|
|
|
|
if (!((Button)control).Name.Contains("sbtn"))
|
|
|
|
|
subbuttons.Add((Button)control);
|
|
|
|
|
if (device < 4)
|
2014-05-30 22:39:39 +02:00
|
|
|
|
nUDSixaxis.Value = deviceNum + 1;
|
2014-04-30 21:32:44 +02:00
|
|
|
|
if (filename != "")
|
2014-04-27 21:32:09 +02:00
|
|
|
|
{
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (device == 4)
|
|
|
|
|
Global.setAProfile(4, name);
|
|
|
|
|
Global.LoadProfile(device, buttons.ToArray(), subbuttons.ToArray());
|
2014-04-27 21:32:09 +02:00
|
|
|
|
DS4Color color = Global.loadColor(device);
|
|
|
|
|
redBar.Value = color.red;
|
|
|
|
|
greenBar.Value = color.green;
|
|
|
|
|
blueBar.Value = color.blue;
|
2014-04-30 21:32:44 +02:00
|
|
|
|
|
2014-06-21 20:00:28 +02:00
|
|
|
|
cBLightbyBattery.Checked = Global.getLedAsBatteryIndicator(device);
|
2014-05-31 06:37:02 +02:00
|
|
|
|
nUDflashLED.Value = Global.getFlashAt(device);
|
2014-06-21 20:00:28 +02:00
|
|
|
|
lowBatteryPanel.Visible = cBLightbyBattery.Checked;
|
|
|
|
|
lbFull.Text = (cBLightbyBattery.Checked ? "Full:" : "Color:");
|
|
|
|
|
FullPanel.Location = (cBLightbyBattery.Checked ? new Point(FullPanel.Location.X, 42) : new Point(FullPanel.Location.X, 48));
|
2014-05-24 04:30:43 +02:00
|
|
|
|
|
2014-04-30 21:32:44 +02:00
|
|
|
|
DS4Color lowColor = Global.loadLowColor(device);
|
|
|
|
|
lowRedBar.Value = lowColor.red;
|
|
|
|
|
lowGreenBar.Value = lowColor.green;
|
|
|
|
|
lowBlueBar.Value = lowColor.blue;
|
|
|
|
|
|
2014-07-26 01:17:45 +02:00
|
|
|
|
DS4Color shiftColor = Global.loadShiftColor(device);
|
|
|
|
|
shiftRedBar.Value = shiftColor.red;
|
|
|
|
|
shiftGreenBar.Value = shiftColor.green;
|
|
|
|
|
shiftBlueBar.Value = shiftColor.blue;
|
|
|
|
|
cBShiftLight.Checked = Global.getShiftColorOn(device);
|
|
|
|
|
|
2014-06-02 19:29:38 +02:00
|
|
|
|
DS4Color cColor = Global.loadChargingColor(device);
|
|
|
|
|
btnChargingColor.BackColor = Color.FromArgb(cColor.red, cColor.green, cColor.blue);
|
2014-08-23 22:52:20 +02:00
|
|
|
|
|
|
|
|
|
DS4Color fColor = Global.loadFlashColor(device);
|
|
|
|
|
lbFlashAt.ForeColor = Color.FromArgb(fColor.red, fColor.green, fColor.blue);
|
|
|
|
|
if (lbFlashAt.ForeColor.GetBrightness() > .5f)
|
|
|
|
|
lbFlashAt.BackColor = Color.Black;
|
|
|
|
|
lbPercentFlashBar.ForeColor = lbFlashAt.ForeColor;
|
|
|
|
|
lbPercentFlashBar.BackColor = lbFlashAt.BackColor;
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDRumbleBoost.Value = Global.loadRumbleBoost(device);
|
|
|
|
|
nUDTouch.Value = Global.getTouchSensitivity(device);
|
2014-05-28 04:49:58 +02:00
|
|
|
|
cBSlide.Checked = Global.getTouchSensitivity(device) > 0;
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDScroll.Value = Global.getScrollSensitivity(device);
|
2014-05-28 04:49:58 +02:00
|
|
|
|
cBScroll.Checked = Global.getScrollSensitivity(device) >0;
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDTap.Value = Global.getTapSensitivity(device);
|
2014-05-28 04:49:58 +02:00
|
|
|
|
cBTap.Checked = Global.getTapSensitivity(device) > 0;
|
2014-04-29 03:14:01 +02:00
|
|
|
|
cBDoubleTap.Checked = Global.getDoubleTap(device);
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDL2.Value = (decimal)Global.getLeftTriggerMiddle(device)/255;
|
|
|
|
|
nUDR2.Value = (decimal)Global.getRightTriggerMiddle(device)/255;
|
2014-06-21 20:00:28 +02:00
|
|
|
|
cBTouchpadJitterCompensation.Checked = Global.getTouchpadJitterCompensation(device);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
cBlowerRCOn.Checked = Global.getLowerRCOn(device);
|
2014-06-21 20:00:28 +02:00
|
|
|
|
cBFlushHIDQueue.Checked = Global.getFlushHIDQueue(device);
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDIdleDisconnect.Value = Math.Round((decimal)(Global.getIdleDisconnectTimeout(device) / 60d), 1);
|
|
|
|
|
cBIdleDisconnect.Checked = Global.getIdleDisconnectTimeout(device) > 0;
|
2014-05-24 04:30:43 +02:00
|
|
|
|
numUDMouseSens.Value = Global.getButtonMouseSensitivity(device);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
// Force update of color choosers
|
|
|
|
|
alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value));
|
|
|
|
|
reg = Color.FromArgb(color.red, color.green, color.blue);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
|
|
|
|
pBController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
|
|
|
|
|
alphacolor = Math.Max(lowRedBar.Value, Math.Max(greenBar.Value, blueBar.Value));
|
|
|
|
|
reg = Color.FromArgb(lowColor.red, lowColor.green, lowColor.blue);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
lowColorChooserButton.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDRainbow.Value = (decimal)Global.getRainbow(device);
|
2014-06-02 19:29:38 +02:00
|
|
|
|
switch (Global.getChargingType(deviceNum))
|
|
|
|
|
{
|
|
|
|
|
case 1: rBFade.Checked = true; break;
|
|
|
|
|
case 2: rBRainbow.Checked = true; break;
|
|
|
|
|
case 3: rBColor.Checked = true; break;
|
|
|
|
|
default: rBNormal.Checked = true; break;
|
|
|
|
|
}
|
2014-04-30 21:32:44 +02:00
|
|
|
|
if (Global.getRainbow(device) == 0)
|
|
|
|
|
{
|
|
|
|
|
pBRainbow.Image = greyscale;
|
|
|
|
|
ToggleRainbow(false);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pBRainbow.Image = colored;
|
|
|
|
|
ToggleRainbow(true);
|
|
|
|
|
}
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDLS.Value = Math.Round((decimal)(Global.getLSDeadzone(device) / 127d ), 3);
|
|
|
|
|
nUDRS.Value = Math.Round((decimal)(Global.getRSDeadzone(device) / 127d ), 3);
|
2014-06-26 20:02:01 +02:00
|
|
|
|
nUDSX.Value = (decimal)Global.getSXDeadzone(device);
|
|
|
|
|
nUDSZ.Value = (decimal)Global.getSZDeadzone(device);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
cBShiftControl.SelectedIndex = Global.getShiftModifier(device);
|
2014-07-26 01:17:45 +02:00
|
|
|
|
if (Global.getLaunchProgram(device) != string.Empty)
|
|
|
|
|
{
|
|
|
|
|
cBLaunchProgram.Checked = true;
|
|
|
|
|
pBProgram.Image = Icon.ExtractAssociatedIcon(Global.getLaunchProgram(device)).ToBitmap();
|
|
|
|
|
btnBrowse.Text = Path.GetFileNameWithoutExtension(Global.getLaunchProgram(device));
|
|
|
|
|
}
|
2014-08-23 22:52:20 +02:00
|
|
|
|
cBDinput.Checked = Global.getDinputOnly(device);
|
|
|
|
|
olddinputcheck = cBDinput.Checked;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
|
|
|
|
else
|
2014-04-30 21:32:44 +02:00
|
|
|
|
Set();
|
2014-05-14 09:12:15 +02:00
|
|
|
|
foreach (Button b in buttons)
|
|
|
|
|
b.MouseHover += button_MouseHover;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
foreach (Button b in subbuttons)
|
|
|
|
|
b.MouseHover += button_MouseHover;
|
|
|
|
|
|
2014-08-17 00:09:15 +02:00
|
|
|
|
tp.SetToolTip(cBlowerRCOn, Properties.Resources.BestUsedRightSide);
|
|
|
|
|
tp.SetToolTip(cBDoubleTap, Properties.Resources.TapAndHold);
|
|
|
|
|
tp.SetToolTip(lbControlTip, Properties.Resources.UseControllerForMapping);
|
2014-06-21 20:00:28 +02:00
|
|
|
|
tp.SetToolTip(cBTouchpadJitterCompensation, "Use Sixaxis to help calculate touchpad movement");
|
2014-08-17 00:09:15 +02:00
|
|
|
|
tp.SetToolTip(pBRainbow, Properties.Resources.AlwaysRainbow);
|
2014-06-21 20:00:28 +02:00
|
|
|
|
tp.SetToolTip(cBFlushHIDQueue, "Flush HID Queue after each reading");
|
|
|
|
|
tp.SetToolTip(cBLightbyBattery, "Also dim light by idle timeout if on");
|
2014-07-26 01:17:45 +02:00
|
|
|
|
tp.SetToolTip(lbGryo, "Click to see readout of Sixaxis Gyro");
|
2014-06-24 00:27:14 +02:00
|
|
|
|
tp.SetToolTip(tBsixaxisGyroX, "GyroX, Left and Right Tilt");
|
|
|
|
|
tp.SetToolTip(tBsixaxisGyroY, "GyroY, Forward and Back Tilt");
|
|
|
|
|
tp.SetToolTip(tBsixaxisGyroZ, "GyroZ, Up and Down Tilt");
|
|
|
|
|
tp.SetToolTip(tBsixaxisAccelX, "AccelX");
|
|
|
|
|
tp.SetToolTip(tBsixaxisAccelY, "AccelY");
|
|
|
|
|
tp.SetToolTip(tBsixaxisAccelZ, "AccelZ");
|
2014-08-17 00:09:15 +02:00
|
|
|
|
tp.SetToolTip(lbEmpty, Properties.Resources.CopyFullColor);
|
|
|
|
|
tp.SetToolTip(lbShift, Properties.Resources.CopyFullColor);
|
2014-07-26 01:17:45 +02:00
|
|
|
|
tp.SetToolTip(lbSATip, "Click for advanced Sixaxis reading");
|
2014-08-23 22:52:20 +02:00
|
|
|
|
tp.SetToolTip(cBDinput, Properties.Resources.DinputOnly);
|
|
|
|
|
tp.SetToolTip(lbFlashAt, "Click to change flash color. Black = default color");
|
2014-04-27 21:32:09 +02:00
|
|
|
|
advColorDialog.OnUpdateColor += advColorDialog_OnUpdateColor;
|
|
|
|
|
btnLeftStick.Enter += btnSticks_Enter;
|
|
|
|
|
btnRightStick.Enter += btnSticks_Enter;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
sbtnLeftStick.Enter += sbtnSticks_Enter;
|
|
|
|
|
sbtnRightStick.Enter += sbtnSticks_Enter;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
UpdateLists();
|
2014-05-19 07:55:12 +02:00
|
|
|
|
inputtimer.Start();
|
|
|
|
|
inputtimer.Tick += InputDS4;
|
2014-06-24 00:27:14 +02:00
|
|
|
|
sixaxisTimer.Tick += sixaxisTimer_Tick;
|
|
|
|
|
sixaxisTimer.Interval = 1000 / 60;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
|
2014-05-19 07:55:12 +02:00
|
|
|
|
}
|
2014-05-30 22:39:39 +02:00
|
|
|
|
|
|
|
|
|
void sixaxisTimer_Tick(object sender, EventArgs e)
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
{
|
2014-05-30 22:39:39 +02:00
|
|
|
|
// MEMS gyro data is all calibrated to roughly -1G..1G for values -0x2000..0x1fff
|
|
|
|
|
// Enough additional acceleration and we are no longer mostly measuring Earth's gravity...
|
|
|
|
|
// We should try to indicate setpoints of the calibration when exposing this measurement....
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (scpDevice.DS4Controllers[(int)nUDSixaxis.Value - 1] == null)
|
|
|
|
|
{
|
|
|
|
|
tPController.Enabled = false;
|
2014-08-17 00:09:15 +02:00
|
|
|
|
lbInputDelay.Text = Properties.Resources.InputDelay.Replace("*number*", Properties.Resources.NA).Replace("*ms*", "ms");
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
pBDelayTracker.BackColor = Color.Transparent;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
tPController.Enabled = true;
|
|
|
|
|
SetDynamicTrackBarValue(tBsixaxisGyroX, (scpDevice.ExposedState[(int)nUDSixaxis.Value - 1].GyroX + tBsixaxisGyroX.Value * 2) / 3);
|
|
|
|
|
SetDynamicTrackBarValue(tBsixaxisGyroY, (scpDevice.ExposedState[(int)nUDSixaxis.Value - 1].GyroY + tBsixaxisGyroY.Value * 2) / 3);
|
|
|
|
|
SetDynamicTrackBarValue(tBsixaxisGyroZ, (scpDevice.ExposedState[(int)nUDSixaxis.Value - 1].GyroZ + tBsixaxisGyroZ.Value * 2) / 3);
|
|
|
|
|
SetDynamicTrackBarValue(tBsixaxisAccelX, (scpDevice.ExposedState[(int)nUDSixaxis.Value - 1].AccelX + tBsixaxisAccelX.Value * 2) / 3);
|
|
|
|
|
SetDynamicTrackBarValue(tBsixaxisAccelY, (scpDevice.ExposedState[(int)nUDSixaxis.Value - 1].AccelY + tBsixaxisAccelY.Value * 2) / 3);
|
|
|
|
|
SetDynamicTrackBarValue(tBsixaxisAccelZ, (scpDevice.ExposedState[(int)nUDSixaxis.Value - 1].AccelZ + tBsixaxisAccelZ.Value * 2) / 3);
|
|
|
|
|
int x = scpDevice.getDS4State((int)nUDSixaxis.Value - 1).LX;
|
|
|
|
|
int y = scpDevice.getDS4State((int)nUDSixaxis.Value - 1).LY;
|
2014-07-26 01:17:45 +02:00
|
|
|
|
btnLSTrack.Location = new Point((int)(x / 2.09 + lbLSTrack.Location.X), (int)(y / 2.09 + lbLSTrack.Location.Y));
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
x = scpDevice.getDS4State((int)nUDSixaxis.Value - 1).RX;
|
|
|
|
|
y = scpDevice.getDS4State((int)nUDSixaxis.Value - 1).RY;
|
2014-07-26 01:17:45 +02:00
|
|
|
|
btnRSTrack.Location = new Point((int)(x / 2.09 + lbRSTrack.Location.X), (int)(y / 2.09 + lbRSTrack.Location.Y));
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
x = -scpDevice.ExposedState[(int)nUDSixaxis.Value - 1].GyroX / 62 + 127;
|
|
|
|
|
y = scpDevice.ExposedState[(int)nUDSixaxis.Value - 1].GyroZ / 62 + 127;
|
2014-07-26 01:17:45 +02:00
|
|
|
|
btnSATrack.Location = new Point((int)(x / 2.09 + lbSATrack.Location.X), (int)(y / 2.09 + lbSATrack.Location.Y));
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
tBL2.Value = scpDevice.getDS4State((int)nUDSixaxis.Value - 1).L2;
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lbL2Track.Location = new Point(tBL2.Location.X - 15, (int)(24 - tBL2.Value / 10.625) + 10);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (tBL2.Value == 255)
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lbL2Track.ForeColor = Color.Green;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
else if (tBL2.Value < (double)nUDL2.Value * 255)
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lbL2Track.ForeColor = Color.Red;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
else
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lbL2Track.ForeColor = Color.Black;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
tBR2.Value = scpDevice.getDS4State((int)nUDSixaxis.Value - 1).R2;
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lbR2Track.Location = new Point(tBR2.Location.X + 20, (int)(24 - tBR2.Value / 10.625) + 10);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (tBR2.Value == 255)
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lbR2Track.ForeColor = Color.Green;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
else if (tBR2.Value < (double)nUDR2.Value * 255)
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lbR2Track.ForeColor = Color.Red;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
else
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lbR2Track.ForeColor = Color.Black;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
double latency = scpDevice.DS4Controllers[(int)nUDSixaxis.Value - 1].Latency;
|
2014-08-17 00:09:15 +02:00
|
|
|
|
lbInputDelay.Text = Properties.Resources.InputDelay.Replace("*number*", latency.ToString()).Replace("*ms*", "ms");
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (latency > 10)
|
|
|
|
|
pBDelayTracker.BackColor = Color.Red;
|
|
|
|
|
else if (latency > 5)
|
|
|
|
|
pBDelayTracker.BackColor = Color.Yellow;
|
|
|
|
|
else
|
|
|
|
|
pBDelayTracker.BackColor = Color.Green;
|
|
|
|
|
}
|
2014-05-30 22:39:39 +02:00
|
|
|
|
}
|
2014-05-19 07:55:12 +02:00
|
|
|
|
private void InputDS4(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
#region DS4Input
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (Form.ActiveForm == root && cBControllerInput.Checked && tabControls.SelectedIndex != 2)
|
2014-05-30 22:39:39 +02:00
|
|
|
|
switch (scpDevice.GetInputkeys((int)nUDSixaxis.Value - 1))
|
2014-05-19 07:55:12 +02:00
|
|
|
|
{
|
|
|
|
|
case ("Cross"): Show_ControlsBn(bnCross, e); break;
|
|
|
|
|
case ("Circle"): Show_ControlsBn(bnCircle, e); break;
|
|
|
|
|
case ("Square"): Show_ControlsBn(bnSquare, e); break;
|
|
|
|
|
case ("Triangle"): Show_ControlsBn(bnTriangle, e); break;
|
|
|
|
|
case ("Options"): Show_ControlsBn(bnOptions, e); break;
|
|
|
|
|
case ("Share"): Show_ControlsBn(bnShare, e); break;
|
|
|
|
|
case ("Up"): Show_ControlsBn(bnUp, e); break;
|
|
|
|
|
case ("Down"): Show_ControlsBn(bnDown, e); break;
|
|
|
|
|
case ("Left"): Show_ControlsBn(bnLeft, e); break;
|
|
|
|
|
case ("Right"): Show_ControlsBn(bnRight, e); break;
|
|
|
|
|
case ("PS"): Show_ControlsBn(bnPS, e); break;
|
|
|
|
|
case ("L1"): Show_ControlsBn(bnL1, e); break;
|
|
|
|
|
case ("R1"): Show_ControlsBn(bnR1, e); break;
|
|
|
|
|
case ("L2"): Show_ControlsBn(bnL2, e); break;
|
|
|
|
|
case ("R2"): Show_ControlsBn(bnR2, e); break;
|
|
|
|
|
case ("L3"): Show_ControlsBn(bnL3, e); break;
|
|
|
|
|
case ("R3"): Show_ControlsBn(bnR3, e); break;
|
|
|
|
|
case ("Touch Left"): Show_ControlsBn(bnTouchLeft, e); break;
|
|
|
|
|
case ("Touch Right"): Show_ControlsBn(bnTouchRight, e); break;
|
|
|
|
|
case ("Touch Multi"): Show_ControlsBn(bnTouchMulti, e); break;
|
|
|
|
|
case ("Touch Upper"): Show_ControlsBn(bnTouchUpper, e); break;
|
|
|
|
|
case ("LS Up"): Show_ControlsBn(bnLSUp, e); break;
|
|
|
|
|
case ("LS Down"): Show_ControlsBn(bnLSDown, e); break;
|
|
|
|
|
case ("LS Left"): Show_ControlsBn(bnLSLeft, e); break;
|
|
|
|
|
case ("LS Right"): Show_ControlsBn(bnLSRight, e); break;
|
|
|
|
|
case ("RS Up"): Show_ControlsBn(bnRSUp, e); break;
|
|
|
|
|
case ("RS Down"): Show_ControlsBn(bnRSDown, e); break;
|
|
|
|
|
case ("RS Left"): Show_ControlsBn(bnRSLeft, e); break;
|
|
|
|
|
case ("RS Right"): Show_ControlsBn(bnRSRight, e); break;
|
2014-06-24 00:27:14 +02:00
|
|
|
|
case ("GyroXP"): Show_ControlsBn(bnGyroXP, e); break;
|
|
|
|
|
case ("GyroXN"): Show_ControlsBn(bnGyroXN, e); break;
|
|
|
|
|
case ("GyroZP"): Show_ControlsBn(bnGyroZP, e); break;
|
|
|
|
|
case ("GyroZN"): Show_ControlsBn(bnGyroZN, e); break;
|
2014-05-19 07:55:12 +02:00
|
|
|
|
}
|
|
|
|
|
#endregion
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2014-05-14 09:12:15 +02:00
|
|
|
|
private void button_MouseHover(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
switch (((Button)sender).Name)
|
|
|
|
|
{
|
2014-05-19 07:55:12 +02:00
|
|
|
|
#region
|
2014-05-14 09:12:15 +02:00
|
|
|
|
case ("bnCross"): lBControls.SelectedIndex = 0; break;
|
|
|
|
|
case ("bnCircle"): lBControls.SelectedIndex = 1; break;
|
|
|
|
|
case ("bnSquare"): lBControls.SelectedIndex = 2; break;
|
|
|
|
|
case ("bnTriangle"): lBControls.SelectedIndex = 3; break;
|
|
|
|
|
case ("bnOptions"): lBControls.SelectedIndex = 4; break;
|
|
|
|
|
case ("bnShare"): lBControls.SelectedIndex = 5; break;
|
|
|
|
|
case ("bnUp"): lBControls.SelectedIndex = 6; break;
|
|
|
|
|
case ("bnDown"): lBControls.SelectedIndex = 7; break;
|
|
|
|
|
case ("bnLeft"): lBControls.SelectedIndex = 8; break;
|
|
|
|
|
case ("bnRight"): lBControls.SelectedIndex = 9; break;
|
|
|
|
|
case ("bnPS"): lBControls.SelectedIndex = 10; break;
|
|
|
|
|
case ("bnL1"): lBControls.SelectedIndex = 11; break;
|
|
|
|
|
case ("bnR1"): lBControls.SelectedIndex = 12; break;
|
|
|
|
|
case ("bnL2"): lBControls.SelectedIndex = 13; break;
|
|
|
|
|
case ("bnR2"): lBControls.SelectedIndex = 14; break;
|
|
|
|
|
case ("bnL3"): lBControls.SelectedIndex = 15; break;
|
|
|
|
|
case ("bnR3"): lBControls.SelectedIndex = 16; break;
|
|
|
|
|
case ("bnTouchLeft"): lBControls.SelectedIndex = 17; break;
|
|
|
|
|
case ("bnTouchRight"): lBControls.SelectedIndex = 18; break;
|
|
|
|
|
case ("bnTouchMulti"): lBControls.SelectedIndex = 19; break;
|
|
|
|
|
case ("bnTouchUpper"): lBControls.SelectedIndex = 20; break;
|
|
|
|
|
case ("bnLSUp"): lBControls.SelectedIndex = 21; break;
|
|
|
|
|
case ("bnLSDown"): lBControls.SelectedIndex = 22; break;
|
|
|
|
|
case ("bnLSLeft"): lBControls.SelectedIndex = 23; break;
|
|
|
|
|
case ("bnLSRight"): lBControls.SelectedIndex = 24; break;
|
|
|
|
|
case ("bnRSUp"): lBControls.SelectedIndex = 25; break;
|
|
|
|
|
case ("bnRSDown"): lBControls.SelectedIndex = 26; break;
|
|
|
|
|
case ("bnRSLeft"): lBControls.SelectedIndex = 27; break;
|
|
|
|
|
case ("bnRSRight"): lBControls.SelectedIndex = 28; break;
|
2014-06-24 00:27:14 +02:00
|
|
|
|
case ("bnGyroZN"): lBControls.SelectedIndex = 29; break;
|
|
|
|
|
case ("bnGyroZP"): lBControls.SelectedIndex = 30; break;
|
|
|
|
|
case ("bnGyroXP"): lBControls.SelectedIndex = 31; break;
|
|
|
|
|
case ("bnGyroXN"): lBControls.SelectedIndex = 32; break;
|
|
|
|
|
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
case ("sbnCross"): lBShiftControls.SelectedIndex = 0; break;
|
|
|
|
|
case ("sbnCircle"): lBShiftControls.SelectedIndex = 1; break;
|
|
|
|
|
case ("sbnSquare"): lBShiftControls.SelectedIndex = 2; break;
|
|
|
|
|
case ("sbnTriangle"): lBShiftControls.SelectedIndex = 3; break;
|
|
|
|
|
case ("sbnOptions"): lBShiftControls.SelectedIndex = 4; break;
|
|
|
|
|
case ("sbnShare"): lBShiftControls.SelectedIndex = 5; break;
|
|
|
|
|
case ("sbnUp"): lBShiftControls.SelectedIndex = 6; break;
|
|
|
|
|
case ("sbnDown"): lBShiftControls.SelectedIndex = 7; break;
|
|
|
|
|
case ("sbnLeft"): lBShiftControls.SelectedIndex = 8; break;
|
|
|
|
|
case ("sbnRight"): lBShiftControls.SelectedIndex = 9; break;
|
|
|
|
|
case ("sbnPS"): lBShiftControls.SelectedIndex = 10; break;
|
|
|
|
|
case ("sbnL1"): lBShiftControls.SelectedIndex = 11; break;
|
|
|
|
|
case ("sbnR1"): lBShiftControls.SelectedIndex = 12; break;
|
|
|
|
|
case ("sbnL2"): lBShiftControls.SelectedIndex = 13; break;
|
|
|
|
|
case ("sbnR2"): lBShiftControls.SelectedIndex = 14; break;
|
|
|
|
|
case ("sbnL3"): lBShiftControls.SelectedIndex = 15; break;
|
|
|
|
|
case ("sbnR3"): lBShiftControls.SelectedIndex = 16; break;
|
|
|
|
|
case ("sbnTouchLeft"): lBShiftControls.SelectedIndex = 17; break;
|
|
|
|
|
case ("sbnTouchRight"): lBShiftControls.SelectedIndex = 18; break;
|
|
|
|
|
case ("sbnTouchMulti"): lBShiftControls.SelectedIndex = 19; break;
|
|
|
|
|
case ("sbnTouchUpper"): lBShiftControls.SelectedIndex = 20; break;
|
|
|
|
|
case ("sbnLSUp"): lBShiftControls.SelectedIndex = 21; break;
|
|
|
|
|
case ("sbnLSDown"): lBShiftControls.SelectedIndex = 22; break;
|
|
|
|
|
case ("sbnLSLeft"): lBShiftControls.SelectedIndex = 23; break;
|
|
|
|
|
case ("sbnLSRight"): lBShiftControls.SelectedIndex = 24; break;
|
|
|
|
|
case ("sbnRSUp"): lBShiftControls.SelectedIndex = 25; break;
|
|
|
|
|
case ("sbnRSDown"): lBShiftControls.SelectedIndex = 26; break;
|
|
|
|
|
case ("sbnRSLeft"): lBShiftControls.SelectedIndex = 27; break;
|
|
|
|
|
case ("sbnRSRight"): lBShiftControls.SelectedIndex = 28; break;
|
|
|
|
|
case ("sbnGyroZN"): lBShiftControls.SelectedIndex = 29; break;
|
|
|
|
|
case ("sbnGyroZP"): lBShiftControls.SelectedIndex = 30; break;
|
|
|
|
|
case ("sbnGyroXP"): lBShiftControls.SelectedIndex = 31; break;
|
|
|
|
|
case ("sbnGyroXN"): lBShiftControls.SelectedIndex = 32; break;
|
2014-05-19 07:55:12 +02:00
|
|
|
|
#endregion
|
2014-05-14 09:12:15 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-28 02:50:40 +01:00
|
|
|
|
private void SetDynamicTrackBarValue(TrackBar trackBar, int value)
|
|
|
|
|
{
|
|
|
|
|
if (trackBar.Maximum < value)
|
|
|
|
|
trackBar.Maximum = value;
|
|
|
|
|
else if (trackBar.Minimum > value)
|
|
|
|
|
trackBar.Minimum = value;
|
|
|
|
|
trackBar.Value = value;
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-02 19:29:38 +02:00
|
|
|
|
public void Set()
|
2014-05-12 07:48:50 +02:00
|
|
|
|
{
|
2014-06-21 20:00:28 +02:00
|
|
|
|
lowBatteryPanel.Visible = cBLightbyBattery.Checked;
|
2014-08-17 00:09:15 +02:00
|
|
|
|
lbFull.Text = (cBLightbyBattery.Checked ? Properties.Resources.Full + ":": Properties.Resources.Color + ":");
|
2014-06-21 20:00:28 +02:00
|
|
|
|
FullPanel.Location = (cBLightbyBattery.Checked ? new Point(FullPanel.Location.X, 42) : new Point(FullPanel.Location.X, 48));
|
2014-05-12 07:48:50 +02:00
|
|
|
|
Global.saveColor(device, (byte)redBar.Value, (byte)greenBar.Value, (byte)blueBar.Value);
|
|
|
|
|
Global.saveLowColor(device, (byte)lowRedBar.Value, (byte)lowGreenBar.Value, (byte)lowBlueBar.Value);
|
2014-07-26 01:17:45 +02:00
|
|
|
|
Global.saveShiftColor(device, (byte)shiftRedBar.Value, (byte)shiftGreenBar.Value, (byte)shiftBlueBar.Value);
|
2014-08-23 22:52:20 +02:00
|
|
|
|
Global.saveFlashColor(device, lbFlashAt.ForeColor.R, lbFlashAt.ForeColor.G, lbFlashAt.ForeColor.B);
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.setLeftTriggerMiddle(device, (byte)Math.Round((nUDL2.Value * 255), 0));
|
|
|
|
|
Global.setRightTriggerMiddle(device, (byte)Math.Round((nUDR2.Value * 255), 0));
|
|
|
|
|
Global.saveRumbleBoost(device, (byte)nUDRumbleBoost.Value);
|
|
|
|
|
Global.setTouchSensitivity(device, (byte)nUDTouch.Value);
|
2014-06-21 20:00:28 +02:00
|
|
|
|
Global.setTouchpadJitterCompensation(device, cBTouchpadJitterCompensation.Checked);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
Global.setLowerRCOn(device, cBlowerRCOn.Checked);
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.setScrollSensitivity(device, (byte)nUDScroll.Value);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
Global.setDoubleTap(device, cBDoubleTap.Checked);
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.setTapSensitivity(device, (byte)nUDTap.Value);
|
|
|
|
|
Global.setIdleDisconnectTimeout(device, (int)(nUDIdleDisconnect.Value * 60));
|
|
|
|
|
Global.setRainbow(device, (int)nUDRainbow.Value);
|
|
|
|
|
Global.setRSDeadzone(device, (byte)Math.Round((nUDRS.Value * 127), 0));
|
|
|
|
|
Global.setLSDeadzone(device, (byte)Math.Round((nUDLS.Value * 127), 0));
|
2014-05-24 04:30:43 +02:00
|
|
|
|
Global.setButtonMouseSensitivity(device, (int)numUDMouseSens.Value);
|
2014-05-31 06:37:02 +02:00
|
|
|
|
Global.setFlashAt(device, (int)nUDflashLED.Value);
|
2014-06-26 20:02:01 +02:00
|
|
|
|
Global.setSXDeadzone(device, (double)nUDSX.Value);
|
|
|
|
|
Global.setSZDeadzone(device, (double)nUDSZ.Value);
|
|
|
|
|
Global.setMouseAccel(device, cBMouseAccel.Checked);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
Global.setShiftModifier(device, cBShiftControl.SelectedIndex);
|
2014-08-23 22:52:20 +02:00
|
|
|
|
Global.setDinputOnly(device, cBDinput.Checked);
|
|
|
|
|
|
2014-06-09 01:41:36 +02:00
|
|
|
|
if (nUDRainbow.Value == 0) pBRainbow.Image = greyscale;
|
2014-05-12 07:48:50 +02:00
|
|
|
|
else pBRainbow.Image = colored;
|
|
|
|
|
}
|
|
|
|
|
|
2014-04-27 21:32:09 +02:00
|
|
|
|
KBM360 kbm360 = null;
|
|
|
|
|
|
|
|
|
|
private void Show_ControlsBn(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
lastSelected = (Button)sender;
|
2014-05-12 07:48:50 +02:00
|
|
|
|
kbm360 = new KBM360(scpDevice, device, this, lastSelected);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
kbm360.Icon = this.Icon;
|
|
|
|
|
kbm360.ShowDialog();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ChangeButtonText(string controlname, object tag)
|
|
|
|
|
{
|
|
|
|
|
lastSelected.Text = controlname;
|
|
|
|
|
int value;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (tag == null)
|
|
|
|
|
lastSelected.Tag = tag;
|
|
|
|
|
else if (Int32.TryParse(tag.ToString(), out value))
|
2014-04-27 21:32:09 +02:00
|
|
|
|
lastSelected.Tag = value;
|
2014-05-28 04:49:58 +02:00
|
|
|
|
else if (tag is Int32[])
|
|
|
|
|
lastSelected.Tag = tag;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
else
|
|
|
|
|
lastSelected.Tag = tag.ToString();
|
|
|
|
|
}
|
|
|
|
|
public void ChangeButtonText(string controlname)
|
|
|
|
|
{
|
|
|
|
|
lastSelected.Text = controlname;
|
|
|
|
|
lastSelected.Tag = controlname;
|
|
|
|
|
}
|
2014-06-14 21:14:27 +02:00
|
|
|
|
public void Toggle_Bn(bool SC, bool TG, bool MC, bool MR)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2014-05-28 04:49:58 +02:00
|
|
|
|
if (lastSelected.Tag is int || lastSelected.Tag is UInt16 || lastSelected.Tag is int[])
|
2014-06-14 21:14:27 +02:00
|
|
|
|
lastSelected.Font = new Font(lastSelected.Font,
|
|
|
|
|
(SC ? FontStyle.Bold : FontStyle.Regular) | (TG ? FontStyle.Italic : FontStyle.Regular) |
|
|
|
|
|
(MC ? FontStyle.Underline : FontStyle.Regular) | (MR ? FontStyle.Strikeout : FontStyle.Regular));
|
2014-05-28 04:49:58 +02:00
|
|
|
|
else if (lastSelected.Tag is string)
|
|
|
|
|
if (lastSelected.Tag.ToString().Contains("Mouse Button"))
|
|
|
|
|
lastSelected.Font = new Font(lastSelected.Font, TG ? FontStyle.Italic : FontStyle.Regular);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
else
|
|
|
|
|
lastSelected.Font = new Font(lastSelected.Font, FontStyle.Regular);
|
|
|
|
|
}
|
|
|
|
|
private void btnSticks_Enter(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-05-12 07:48:50 +02:00
|
|
|
|
SticksPanel.Visible = true;
|
|
|
|
|
MainPanel.Visible = false;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
2014-05-12 07:48:50 +02:00
|
|
|
|
|
|
|
|
|
private void btnFullView_Click(object sender, EventArgs e)
|
2014-04-27 21:32:09 +02:00
|
|
|
|
{
|
2014-05-12 07:48:50 +02:00
|
|
|
|
SticksPanel.Visible = false;
|
|
|
|
|
MainPanel.Visible = true;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
|
|
|
|
|
private void sbtnSticks_Enter(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
ShiftSticksPanel.Visible = true;
|
|
|
|
|
ShiftMainPanel.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void sbtnFullView_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
ShiftSticksPanel.Visible = false;
|
|
|
|
|
ShiftMainPanel.Visible = true;
|
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
private void btnLightbar_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-05-12 07:48:50 +02:00
|
|
|
|
advColorDialog.Color = Color.FromArgb(redBar.Value, greenBar.Value, blueBar.Value);
|
|
|
|
|
advColorDialog_OnUpdateColor(pBController.BackColor, e);
|
|
|
|
|
if (advColorDialog.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
pBController.BackColor = advColorDialog.Color;
|
|
|
|
|
redBar.Value = advColorDialog.Color.R;
|
|
|
|
|
greenBar.Value = advColorDialog.Color.G;
|
|
|
|
|
blueBar.Value = advColorDialog.Color.B;
|
|
|
|
|
}
|
|
|
|
|
else Global.saveColor(device, oldLedColor[0], oldLedColor[1], oldLedColor[2]);
|
2014-06-02 19:29:38 +02:00
|
|
|
|
Global.saveChargingColor(device, oldChargingColor[0], oldChargingColor[1], oldChargingColor[2]);
|
|
|
|
|
Global.saveLowColor(device, oldLowLedColor[0], oldLowLedColor[1], oldLowLedColor[2]);
|
|
|
|
|
oldChargingColor = null;
|
2014-05-12 07:48:50 +02:00
|
|
|
|
oldLedColor = null;
|
|
|
|
|
oldLowLedColor = null;
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2014-05-12 07:48:50 +02:00
|
|
|
|
private void lowColorChooserButton_Click(object sender, EventArgs e)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2014-05-12 07:48:50 +02:00
|
|
|
|
advColorDialog.Color = lowColorChooserButton.BackColor;
|
|
|
|
|
advColorDialog_OnUpdateColor(lowColorChooserButton.BackColor, e);
|
|
|
|
|
if (advColorDialog.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
lowColorChooserButton.BackColor = advColorDialog.Color;
|
|
|
|
|
lowRedBar.Value = advColorDialog.Color.R;
|
|
|
|
|
lowGreenBar.Value = advColorDialog.Color.G;
|
|
|
|
|
lowBlueBar.Value = advColorDialog.Color.B;
|
|
|
|
|
}
|
|
|
|
|
else Global.saveLowColor(device, oldLowLedColor[0], oldLowLedColor[1], oldLowLedColor[2]);
|
2014-06-02 19:29:38 +02:00
|
|
|
|
Global.saveChargingColor(device, oldChargingColor[0], oldChargingColor[1], oldChargingColor[2]);
|
|
|
|
|
Global.saveColor(device, oldLedColor[0], oldLedColor[1], oldLedColor[2]);
|
|
|
|
|
oldChargingColor = null;
|
|
|
|
|
oldLedColor = null;
|
|
|
|
|
oldLowLedColor = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void btnChargingColor_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
advColorDialog.Color = btnChargingColor.BackColor;
|
|
|
|
|
advColorDialog_OnUpdateColor(btnChargingColor.BackColor, e);
|
|
|
|
|
if (advColorDialog.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
btnChargingColor.BackColor = advColorDialog.Color;
|
|
|
|
|
}
|
|
|
|
|
else Global.saveChargingColor(device, oldChargingColor[0], oldChargingColor[1], oldChargingColor[2]);
|
|
|
|
|
Global.saveLowColor(device, oldLowLedColor[0], oldLowLedColor[1], oldLowLedColor[2]);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
Global.saveColor(device, oldLedColor[0], oldLedColor[1], oldLedColor[2]);
|
2014-06-02 19:29:38 +02:00
|
|
|
|
oldChargingColor = null;
|
2014-05-12 07:48:50 +02:00
|
|
|
|
oldLedColor = null;
|
|
|
|
|
oldLowLedColor = null;
|
2014-04-30 21:32:44 +02:00
|
|
|
|
}
|
2014-05-12 07:48:50 +02:00
|
|
|
|
private void advColorDialog_OnUpdateColor(object sender, EventArgs e)
|
2014-04-30 21:32:44 +02:00
|
|
|
|
{
|
2014-06-02 19:29:38 +02:00
|
|
|
|
if (oldLedColor == null || oldLowLedColor == null || oldChargingColor == null)
|
2014-04-27 21:32:09 +02:00
|
|
|
|
{
|
2014-05-12 07:48:50 +02:00
|
|
|
|
DS4Color color = Global.loadColor(device);
|
|
|
|
|
oldLedColor = new Byte[] { color.red, color.green, color.blue };
|
|
|
|
|
color = Global.loadLowColor(device);
|
|
|
|
|
oldLowLedColor = new Byte[] { color.red, color.green, color.blue };
|
2014-06-02 19:29:38 +02:00
|
|
|
|
color = Global.loadChargingColor(device);
|
|
|
|
|
oldChargingColor = new Byte[] { color.red, color.green, color.blue };
|
2014-05-12 07:48:50 +02:00
|
|
|
|
}
|
|
|
|
|
if (sender is Color)
|
|
|
|
|
{
|
|
|
|
|
Color color = (Color)sender;
|
|
|
|
|
Global.saveColor(device, color.R, color.G, color.B);
|
|
|
|
|
Global.saveLowColor(device, color.R, color.G, color.B);
|
2014-06-02 19:29:38 +02:00
|
|
|
|
Global.saveChargingColor(device, color.R, color.G, color.B);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2014-05-31 06:37:02 +02:00
|
|
|
|
int bgc = 255; //Color of the form background, If greyscale color
|
2014-03-28 02:50:40 +01:00
|
|
|
|
private void redBar_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-05-12 07:48:50 +02:00
|
|
|
|
int value = ((TrackBar)sender).Value;
|
2014-05-31 06:37:02 +02:00
|
|
|
|
int sat = bgc - (value < bgc ? value : bgc);
|
|
|
|
|
int som = bgc + 11 * (int)(value * 0.0039215);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
((TrackBar)sender).BackColor = Color.FromArgb(som, sat, sat);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value));
|
|
|
|
|
reg = Color.FromArgb(redBar.Value, greenBar.Value, blueBar.Value);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
|
|
|
|
pBController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
Global.saveColor(device, (byte)redBar.Value, (byte)greenBar.Value, (byte)blueBar.Value);
|
2014-06-03 07:29:42 +02:00
|
|
|
|
if (g.DpiX == 120)
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 125, 0, 2000);
|
|
|
|
|
else
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0, 2000);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
private void greenBar_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-05-12 07:48:50 +02:00
|
|
|
|
int value = ((TrackBar)sender).Value;
|
2014-05-31 06:37:02 +02:00
|
|
|
|
int sat = bgc - (value < bgc ? value : bgc);
|
|
|
|
|
int som = bgc + 11 * (int)(value * 0.0039215);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
((TrackBar)sender).BackColor = Color.FromArgb(sat, som, sat);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value));
|
|
|
|
|
reg = Color.FromArgb(redBar.Value, greenBar.Value, blueBar.Value);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
|
|
|
|
pBController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
Global.saveColor(device, (byte)redBar.Value, (byte)greenBar.Value, (byte)blueBar.Value);
|
2014-06-03 07:29:42 +02:00
|
|
|
|
if (g.DpiX == 120)
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 125, 0, 2000);
|
|
|
|
|
else
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0, 2000);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
private void blueBar_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-05-12 07:48:50 +02:00
|
|
|
|
int value = ((TrackBar)sender).Value;
|
2014-05-31 06:37:02 +02:00
|
|
|
|
int sat = bgc - (value < bgc ? value : bgc);
|
|
|
|
|
int som = bgc + 11 * (int)(value * 0.0039215);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
((TrackBar)sender).BackColor = Color.FromArgb(sat, sat, som);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
alphacolor = Math.Max(redBar.Value, Math.Max(greenBar.Value, blueBar.Value));
|
|
|
|
|
reg = Color.FromArgb(redBar.Value, greenBar.Value, blueBar.Value);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
|
|
|
|
pBController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
Global.saveColor(device, (byte)redBar.Value, (byte)greenBar.Value, (byte)blueBar.Value);
|
2014-06-03 07:29:42 +02:00
|
|
|
|
if (g.DpiX == 120)
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 125, 0, 2000);
|
|
|
|
|
else
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0, 2000);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void lowRedBar_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-05-12 07:48:50 +02:00
|
|
|
|
int value = ((TrackBar)sender).Value;
|
2014-05-31 06:37:02 +02:00
|
|
|
|
int sat = bgc - (value < bgc ? value : bgc);
|
|
|
|
|
int som = bgc + 11 * (int)(value * 0.0039215);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
((TrackBar)sender).BackColor = Color.FromArgb(som, sat, sat);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
alphacolor = Math.Max(lowRedBar.Value, Math.Max(lowGreenBar.Value, lowBlueBar.Value));
|
|
|
|
|
reg = Color.FromArgb(lowRedBar.Value, lowGreenBar.Value, lowBlueBar.Value);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
lowColorChooserButton.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
|
|
|
|
Global.saveLowColor(device, (byte)lowRedBar.Value, (byte)lowGreenBar.Value, (byte)lowBlueBar.Value);
|
2014-06-03 07:29:42 +02:00
|
|
|
|
if (g.DpiX == 120)
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 125, 0, 2000);
|
|
|
|
|
else
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0, 2000);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void lowGreenBar_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-05-12 07:48:50 +02:00
|
|
|
|
int value = ((TrackBar)sender).Value;
|
2014-05-31 06:37:02 +02:00
|
|
|
|
int sat = bgc - (value < bgc ? value : bgc);
|
|
|
|
|
int som = bgc + 11 * (int)(value * 0.0039215);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
((TrackBar)sender).BackColor = Color.FromArgb(sat, som, sat);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
alphacolor = Math.Max(lowRedBar.Value, Math.Max(lowGreenBar.Value, lowBlueBar.Value));
|
|
|
|
|
reg = Color.FromArgb(lowRedBar.Value, lowGreenBar.Value, lowBlueBar.Value);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
lowColorChooserButton.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
|
|
|
|
Global.saveLowColor(device, (byte)lowRedBar.Value, (byte)lowGreenBar.Value, (byte)lowBlueBar.Value);
|
2014-06-03 07:29:42 +02:00
|
|
|
|
if (g.DpiX == 120)
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 125, 0, 2000);
|
|
|
|
|
else
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0, 2000);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void lowBlueBar_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-05-12 07:48:50 +02:00
|
|
|
|
int value = ((TrackBar)sender).Value;
|
2014-05-31 06:37:02 +02:00
|
|
|
|
int sat = bgc - (value < bgc ? value : bgc);
|
|
|
|
|
int som = bgc + 11 * (int)(value * 0.0039215);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
((TrackBar)sender).BackColor = Color.FromArgb(sat, sat, som);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
alphacolor = Math.Max(lowRedBar.Value, Math.Max(lowGreenBar.Value, lowBlueBar.Value));
|
|
|
|
|
reg = Color.FromArgb(lowRedBar.Value, lowGreenBar.Value, lowBlueBar.Value);
|
2014-05-12 07:48:50 +02:00
|
|
|
|
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
2014-04-30 21:32:44 +02:00
|
|
|
|
lowColorChooserButton.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
|
|
|
|
Global.saveLowColor(device, (byte)lowRedBar.Value, (byte)lowGreenBar.Value, (byte)lowBlueBar.Value);
|
2014-06-03 07:29:42 +02:00
|
|
|
|
if (g.DpiX == 120)
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 125, 0, 2000);
|
|
|
|
|
else
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0, 2000);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-07-26 01:17:45 +02:00
|
|
|
|
private void shiftRedBar_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
int value = ((TrackBar)sender).Value;
|
|
|
|
|
int sat = bgc - (value < bgc ? value : bgc);
|
|
|
|
|
int som = bgc + 11 * (int)(value * 0.0039215);
|
|
|
|
|
((TrackBar)sender).BackColor = Color.FromArgb(som, sat, sat);
|
|
|
|
|
alphacolor = Math.Max(shiftRedBar.Value, Math.Max(shiftGreenBar.Value, shiftBlueBar.Value));
|
|
|
|
|
reg = Color.FromArgb(shiftRedBar.Value, shiftGreenBar.Value, shiftBlueBar.Value);
|
|
|
|
|
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
|
|
|
|
spBController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
|
|
|
|
Global.saveShiftColor(device, (byte)shiftRedBar.Value, (byte)shiftGreenBar.Value, (byte)shiftBlueBar.Value);
|
|
|
|
|
if (g.DpiX == 120)
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 125, 0, 2000);
|
|
|
|
|
else
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0, 2000);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void shiftGreenBar_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
int value = ((TrackBar)sender).Value;
|
|
|
|
|
int sat = bgc - (value < bgc ? value : bgc);
|
|
|
|
|
int som = bgc + 11 * (int)(value * 0.0039215);
|
|
|
|
|
((TrackBar)sender).BackColor = Color.FromArgb(sat, som, sat);
|
|
|
|
|
alphacolor = Math.Max(shiftRedBar.Value, Math.Max(shiftGreenBar.Value, shiftBlueBar.Value));
|
|
|
|
|
reg = Color.FromArgb(shiftRedBar.Value, shiftGreenBar.Value, shiftBlueBar.Value);
|
|
|
|
|
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
|
|
|
|
spBController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
|
|
|
|
Global.saveShiftColor(device, (byte)shiftRedBar.Value, (byte)shiftGreenBar.Value, (byte)shiftBlueBar.Value);
|
|
|
|
|
if (g.DpiX == 120)
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 125, 0, 2000);
|
|
|
|
|
else
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0, 2000);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void shiftBlueBar_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
int value = ((TrackBar)sender).Value;
|
|
|
|
|
int sat = bgc - (value < bgc ? value : bgc);
|
|
|
|
|
int som = bgc + 11 * (int)(value * 0.0039215);
|
|
|
|
|
((TrackBar)sender).BackColor = Color.FromArgb(sat, sat, som);
|
|
|
|
|
alphacolor = Math.Max(shiftRedBar.Value, Math.Max(shiftGreenBar.Value, shiftBlueBar.Value));
|
|
|
|
|
reg = Color.FromArgb(shiftRedBar.Value, shiftGreenBar.Value, shiftBlueBar.Value);
|
|
|
|
|
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
|
|
|
|
spBController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
|
|
|
|
Global.saveShiftColor(device, (byte)shiftRedBar.Value, (byte)shiftGreenBar.Value, (byte)shiftBlueBar.Value);
|
|
|
|
|
if (g.DpiX == 120)
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 125, 0, 2000);
|
|
|
|
|
else
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0, 2000);
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-12 07:48:50 +02:00
|
|
|
|
public Color HuetoRGB(float hue, float light, Color rgb)
|
|
|
|
|
{
|
|
|
|
|
float L = (float)Math.Max(.5, light);
|
|
|
|
|
float C = (1 - Math.Abs(2 * L - 1));
|
|
|
|
|
float X = (C * (1 - Math.Abs((hue / 60) % 2 - 1)));
|
|
|
|
|
float m = L - C / 2;
|
|
|
|
|
float R =0, G=0, B=0;
|
|
|
|
|
if (light == 1) return Color.FromName("White");
|
|
|
|
|
else if (rgb.R == rgb.G && rgb.G == rgb.B) return Color.FromName("White");
|
|
|
|
|
else if (0 <= hue && hue < 60) { R = C; G = X; }
|
|
|
|
|
else if (60 <= hue && hue < 120) { R = X; G = C; }
|
|
|
|
|
else if (120 <= hue && hue < 180) { G = C; B = X; }
|
|
|
|
|
else if (180 <= hue && hue < 240) { G = X; B = C; }
|
|
|
|
|
else if (240 <= hue && hue < 300) { R = X; B = C; }
|
|
|
|
|
else if (300 <= hue && hue < 360) { R = C; B = X; }
|
|
|
|
|
return Color.FromArgb((int)((R + m) * 255), (int)((G + m) * 255), (int)((B + m) * 255));
|
|
|
|
|
}
|
2014-03-28 02:50:40 +01:00
|
|
|
|
private void rumbleBoostBar_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.saveRumbleBoost(device, (byte)nUDRumbleBoost.Value);
|
2014-08-17 00:09:15 +02:00
|
|
|
|
if (btnRumbleTest.Text == Properties.Resources.StopText)
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
scpDevice.setRumble(255, 255, device);
|
2014-05-05 09:42:05 +02:00
|
|
|
|
}
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-05-05 09:31:24 +02:00
|
|
|
|
private void btnRumbleTest_Click(object sender, EventArgs e)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2014-08-17 00:09:15 +02:00
|
|
|
|
if (((Button)sender).Text == Properties.Resources.TestText)
|
2014-05-05 09:31:24 +02:00
|
|
|
|
{
|
2014-09-02 01:23:02 +02:00
|
|
|
|
scpDevice.setRumble((byte)Math.Min(255, (255 * nUDRumbleBoost.Value / 100)), (byte)Math.Min(255, (255 * nUDRumbleBoost.Value / 100)), (int)nUDSixaxis.Value - 1);
|
2014-08-17 00:09:15 +02:00
|
|
|
|
((Button)sender).Text = Properties.Resources.StopText;
|
2014-05-05 09:31:24 +02:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-05-30 22:39:39 +02:00
|
|
|
|
scpDevice.setRumble(0, 0, (int)nUDSixaxis.Value - 1);
|
2014-08-17 00:09:15 +02:00
|
|
|
|
((Button)sender).Text = Properties.Resources.TestText;
|
2014-05-05 09:31:24 +02:00
|
|
|
|
}
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
|
2014-04-27 21:32:09 +02:00
|
|
|
|
private void numUDTouch_ValueChanged(object sender, EventArgs e)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.setTouchSensitivity(device, (byte)nUDTouch.Value);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
|
2014-04-27 21:32:09 +02:00
|
|
|
|
private void numUDTap_ValueChanged(object sender, EventArgs e)
|
2014-03-28 02:50:40 +01:00
|
|
|
|
{
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.setTapSensitivity(device, (byte)nUDTap.Value);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-04-27 21:32:09 +02:00
|
|
|
|
private void numUDScroll_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.setScrollSensitivity(device, (int)nUDScroll.Value);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
private void ledAsBatteryIndicator_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-06-21 20:00:28 +02:00
|
|
|
|
Global.setLedAsBatteryIndicator(device, cBLightbyBattery.Checked);
|
|
|
|
|
lowBatteryPanel.Visible = cBLightbyBattery.Checked;
|
|
|
|
|
FullPanel.Location = (cBLightbyBattery.Checked ? new Point(FullPanel.Location.X, 42) : new Point(FullPanel.Location.X, 48));
|
2014-08-17 00:09:15 +02:00
|
|
|
|
lbFull.Text = (cBLightbyBattery.Checked ? Properties.Resources.Full + ":" : Properties.Resources.Color + ":");
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2014-05-24 04:30:43 +02:00
|
|
|
|
|
2014-03-28 02:50:40 +01:00
|
|
|
|
private void lowerRCOffCheckBox_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-04-27 21:32:09 +02:00
|
|
|
|
Global.setLowerRCOn(device, cBlowerRCOn.Checked);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void touchpadJitterCompensation_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-06-21 20:00:28 +02:00
|
|
|
|
Global.setTouchpadJitterCompensation(device, cBTouchpadJitterCompensation.Checked);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
2014-05-12 07:48:50 +02:00
|
|
|
|
|
2014-03-28 02:50:40 +01:00
|
|
|
|
private void flushHIDQueue_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-06-21 20:00:28 +02:00
|
|
|
|
Global.setFlushHIDQueue(device, cBFlushHIDQueue.Checked);
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|
|
|
|
|
|
2014-06-09 01:41:36 +02:00
|
|
|
|
private void nUDIdleDisconnect_ValueChanged(object sender, EventArgs e)
|
2014-04-27 21:32:09 +02:00
|
|
|
|
{
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.setIdleDisconnectTimeout(device, (int)(nUDIdleDisconnect.Value * 60));
|
|
|
|
|
//if (nUDIdleDisconnect.Value == 0)
|
|
|
|
|
//cBIdleDisconnect.Checked = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void cBIdleDisconnect_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (cBIdleDisconnect.Checked)
|
|
|
|
|
nUDIdleDisconnect.Value = 5;
|
|
|
|
|
else
|
|
|
|
|
nUDIdleDisconnect.Value = 0;
|
|
|
|
|
nUDIdleDisconnect.Enabled = cBIdleDisconnect.Checked;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
2014-03-28 02:50:40 +01:00
|
|
|
|
|
2014-04-27 21:32:09 +02:00
|
|
|
|
private void Options_Closed(object sender, FormClosedEventArgs e)
|
|
|
|
|
{
|
2014-04-30 05:54:41 +02:00
|
|
|
|
for (int i = 0; i < 4; i++)
|
|
|
|
|
Global.LoadProfile(i); //Refreshes all profiles in case other controllers are using the same profile
|
2014-08-23 22:52:20 +02:00
|
|
|
|
if (olddinputcheck != cBDinput.Checked)
|
|
|
|
|
{
|
|
|
|
|
root.btnStartStop_Clicked(false);
|
|
|
|
|
root.btnStartStop_Clicked(false);
|
|
|
|
|
}
|
2014-05-30 22:39:39 +02:00
|
|
|
|
inputtimer.Stop();
|
|
|
|
|
sixaxisTimer.Stop();
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-05-12 07:48:50 +02:00
|
|
|
|
private void cBSlide_CheckedChanged(object sender, EventArgs e)
|
2014-04-27 21:32:09 +02:00
|
|
|
|
{
|
|
|
|
|
if (cBSlide.Checked)
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDTouch.Value = 100;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
else
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDTouch.Value = 0;
|
|
|
|
|
nUDTouch.Enabled = cBSlide.Checked;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void cBScroll_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (cBScroll.Checked)
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDScroll.Value = 5;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
else
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDScroll.Value = 0;
|
|
|
|
|
nUDScroll.Enabled = cBScroll.Checked;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void cBTap_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (cBTap.Checked)
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDTap.Value = 100;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
else
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDTap.Value = 0;
|
|
|
|
|
nUDTap.Enabled = cBTap.Checked;
|
2014-05-12 07:48:50 +02:00
|
|
|
|
cBDoubleTap.Enabled = cBTap.Checked;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-04-29 03:14:01 +02:00
|
|
|
|
private void cBDoubleTap_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Global.setDoubleTap(device, cBDoubleTap.Checked);
|
|
|
|
|
}
|
|
|
|
|
|
2014-04-27 21:32:09 +02:00
|
|
|
|
public void UpdateLists()
|
|
|
|
|
{
|
|
|
|
|
lBControls.Items[0] = "Cross : " + bnCross.Text;
|
|
|
|
|
lBControls.Items[1] = "Circle : " + bnCircle.Text;
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lBControls.Items[2] = "Square : " + bnSquare.Text;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
lBControls.Items[3] = "Triangle : " + bnTriangle.Text;
|
|
|
|
|
lBControls.Items[4] = "Options : " + bnOptions.Text;
|
|
|
|
|
lBControls.Items[5] = "Share : " + bnShare.Text;
|
|
|
|
|
lBControls.Items[6] = "Up : " + bnUp.Text;
|
|
|
|
|
lBControls.Items[7] = "Down : " + bnDown.Text;
|
|
|
|
|
lBControls.Items[8] = "Left : " + bnLeft.Text;
|
|
|
|
|
lBControls.Items[9] = "Right : " + bnRight.Text;
|
|
|
|
|
lBControls.Items[10] = "PS : " + bnPS.Text;
|
|
|
|
|
lBControls.Items[11] = "L1 : " + bnL1.Text;
|
|
|
|
|
lBControls.Items[12] = "R1 : " + bnR1.Text;
|
|
|
|
|
lBControls.Items[13] = "L2 : " + bnL2.Text;
|
|
|
|
|
lBControls.Items[14] = "R2 : " + bnR2.Text;
|
|
|
|
|
lBControls.Items[15] = "L3 : " + bnL3.Text;
|
|
|
|
|
lBControls.Items[16] = "R3 : " + bnR3.Text;
|
2014-05-12 07:48:50 +02:00
|
|
|
|
lBControls.Items[17] = "Left Touch : " + bnTouchLeft.Text;
|
|
|
|
|
lBControls.Items[18] = "Right Touch : " + bnTouchRight.Text;
|
|
|
|
|
lBControls.Items[19] = "Multitouch : " + bnTouchMulti.Text;
|
|
|
|
|
lBControls.Items[20] = "Upper Touch : " + bnTouchUpper.Text;
|
|
|
|
|
lBControls.Items[21] = "LS Up : " + bnLSUp.Text;
|
|
|
|
|
lBControls.Items[22] = "LS Down : " + bnLSDown.Text;
|
|
|
|
|
lBControls.Items[23] = "LS Left : " + bnLSLeft.Text;
|
|
|
|
|
lBControls.Items[24] = "LS Right : " + bnLSRight.Text;
|
|
|
|
|
lBControls.Items[25] = "RS Up : " + bnRSUp.Text;
|
|
|
|
|
lBControls.Items[26] = "RS Down : " + bnRSDown.Text;
|
|
|
|
|
lBControls.Items[27] = "RS Left : " + bnRSLeft.Text;
|
|
|
|
|
lBControls.Items[28] = "RS Right : " + bnRSRight.Text;
|
2014-06-24 00:27:14 +02:00
|
|
|
|
lBControls.Items[29] = "Tilt Up : " + UpdateGyroList(bnGyroZN);
|
|
|
|
|
lBControls.Items[30] = "Tilt Down : " + UpdateGyroList(bnGyroZP);
|
|
|
|
|
lBControls.Items[31] = "Tilt Left : " + UpdateGyroList(bnGyroXP);
|
|
|
|
|
lBControls.Items[32] = "Tilt Right : " + UpdateGyroList(bnGyroXN);
|
|
|
|
|
bnGyroZN.Text = "Tilt Up";
|
|
|
|
|
bnGyroZP.Text = "Tilt Down";
|
|
|
|
|
bnGyroXP.Text = "Tilt Left";
|
|
|
|
|
bnGyroXN.Text = "Tilt Right";
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
|
|
|
|
|
foreach (Button b in subbuttons)
|
|
|
|
|
if (b.Tag == null)
|
|
|
|
|
b.Text = "Fall Back to " + buttons[subbuttons.IndexOf(b)].Text;
|
|
|
|
|
lBShiftControls.Items[0] = "Cross : " + sbnCross.Text;
|
|
|
|
|
lBShiftControls.Items[1] = "Circle : " + sbnCircle.Text;
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lBShiftControls.Items[2] = "Square : " + sbnSquare.Text;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
lBShiftControls.Items[3] = "Triangle : " + sbnTriangle.Text;
|
|
|
|
|
lBShiftControls.Items[4] = "Options : " + sbnOptions.Text;
|
|
|
|
|
lBShiftControls.Items[5] = "Share : " + sbnShare.Text;
|
|
|
|
|
lBShiftControls.Items[6] = "Up : " + sbnUp.Text;
|
|
|
|
|
lBShiftControls.Items[7] = "Down : " + sbnDown.Text;
|
|
|
|
|
lBShiftControls.Items[8] = "Left : " + sbnLeft.Text;
|
|
|
|
|
lBShiftControls.Items[9] = "Right : " + sbnRight.Text;
|
|
|
|
|
lBShiftControls.Items[10] = "PS : " + sbnPS.Text;
|
|
|
|
|
lBShiftControls.Items[11] = "L1 : " + sbnL1.Text;
|
|
|
|
|
lBShiftControls.Items[12] = "R1 : " + sbnR1.Text;
|
|
|
|
|
lBShiftControls.Items[13] = "L2 : " + sbnL2.Text;
|
|
|
|
|
lBShiftControls.Items[14] = "R2 : " + sbnR2.Text;
|
|
|
|
|
lBShiftControls.Items[15] = "L3 : " + sbnL3.Text;
|
|
|
|
|
lBShiftControls.Items[16] = "R3 : " + sbnR3.Text;
|
|
|
|
|
lBShiftControls.Items[17] = "Left Touch : " + sbnTouchLeft.Text;
|
|
|
|
|
lBShiftControls.Items[18] = "Right Touch : " + sbnTouchRight.Text;
|
|
|
|
|
lBShiftControls.Items[19] = "Multitouch : " + sbnTouchMulti.Text;
|
|
|
|
|
lBShiftControls.Items[20] = "Upper Touch : " + sbnTouchUpper.Text;
|
|
|
|
|
lBShiftControls.Items[21] = "LS Up : " + sbnLSUp.Text;
|
|
|
|
|
lBShiftControls.Items[22] = "LS Down : " + sbnLSDown.Text;
|
|
|
|
|
lBShiftControls.Items[23] = "LS Left : " + sbnLSLeft.Text;
|
|
|
|
|
lBShiftControls.Items[24] = "LS Right : " + sbnLSRight.Text;
|
|
|
|
|
lBShiftControls.Items[25] = "RS Up : " + sbnRSUp.Text;
|
|
|
|
|
lBShiftControls.Items[26] = "RS Down : " + sbnRSDown.Text;
|
|
|
|
|
lBShiftControls.Items[27] = "RS Left : " + sbnRSLeft.Text;
|
|
|
|
|
lBShiftControls.Items[28] = "RS Right : " + sbnRSRight.Text;
|
|
|
|
|
lBShiftControls.Items[29] = "Tilt Up : " + UpdateGyroList(sbnGyroZN);
|
|
|
|
|
lBShiftControls.Items[30] = "Tilt Down : " + UpdateGyroList(sbnGyroZP);
|
|
|
|
|
lBShiftControls.Items[31] = "Tilt Left : " + UpdateGyroList(sbnGyroXP);
|
|
|
|
|
lBShiftControls.Items[32] = "Tilt Right : " + UpdateGyroList(sbnGyroXN);
|
|
|
|
|
sbnGyroZN.Text = "Tilt Up";
|
|
|
|
|
sbnGyroZP.Text = "Tilt Down";
|
|
|
|
|
sbnGyroXP.Text = "Tilt Left";
|
|
|
|
|
sbnGyroXN.Text = "Tilt Right";
|
2014-06-24 00:27:14 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private string UpdateGyroList(Button button)
|
|
|
|
|
{
|
|
|
|
|
if (button.Tag is String && (String)button.Tag == "Unbound")
|
|
|
|
|
return "Unbound";
|
|
|
|
|
else if (button.Tag is IEnumerable<int> || button.Tag is Int32[] || button.Tag is UInt16[])
|
|
|
|
|
return "Macro";
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
else if (button.Tag is Int32)
|
|
|
|
|
return ((Keys)(Int32)button.Tag).ToString();
|
|
|
|
|
else if (button.Tag is UInt16)
|
|
|
|
|
return ((Keys)(UInt16)button.Tag).ToString();
|
2014-06-24 00:27:14 +02:00
|
|
|
|
else if (button.Tag is string)
|
|
|
|
|
return button.Tag.ToString();
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
else if (button.Name.StartsWith("s") && buttons[subbuttons.IndexOf(button)].Tag != null && button.Tag == null)
|
|
|
|
|
return "Fall Back to " + UpdateGyroList(buttons[subbuttons.IndexOf(button)]);
|
2014-06-24 00:27:14 +02:00
|
|
|
|
else
|
|
|
|
|
return string.Empty;
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
|
|
|
|
private void Show_ControlsList(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-05-12 07:48:50 +02:00
|
|
|
|
if (lBControls.SelectedIndex == 0) Show_ControlsBn(bnCross, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 1) Show_ControlsBn(bnCircle, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 2) Show_ControlsBn(bnSquare, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 3) Show_ControlsBn(bnTriangle, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 4) Show_ControlsBn(bnOptions, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 5) Show_ControlsBn(bnShare, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 6) Show_ControlsBn(bnUp, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 7) Show_ControlsBn(bnDown, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 8) Show_ControlsBn(bnLeft, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 9) Show_ControlsBn(bnRight, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 10) Show_ControlsBn(bnPS, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 11) Show_ControlsBn(bnL1, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 12) Show_ControlsBn(bnR1, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 13) Show_ControlsBn(bnL2, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 14) Show_ControlsBn(bnR2, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 15) Show_ControlsBn(bnL3, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 16) Show_ControlsBn(bnR3, e);
|
|
|
|
|
|
|
|
|
|
if (lBControls.SelectedIndex == 17) Show_ControlsBn(bnTouchLeft, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 18) Show_ControlsBn(bnTouchRight, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 19) Show_ControlsBn(bnTouchMulti, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 20) Show_ControlsBn(bnTouchUpper, e);
|
|
|
|
|
|
|
|
|
|
if (lBControls.SelectedIndex == 21) Show_ControlsBn(bnLSUp, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 22) Show_ControlsBn(bnLSDown, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 23) Show_ControlsBn(bnLSLeft, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 24) Show_ControlsBn(bnLSRight, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 25) Show_ControlsBn(bnRSUp, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 26) Show_ControlsBn(bnRSDown, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 27) Show_ControlsBn(bnRSLeft, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 28) Show_ControlsBn(bnRSRight, e);
|
2014-06-24 00:27:14 +02:00
|
|
|
|
|
|
|
|
|
if (lBControls.SelectedIndex == 29) Show_ControlsBn(bnGyroZN, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 30) Show_ControlsBn(bnGyroZP, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 31) Show_ControlsBn(bnGyroXP, e);
|
|
|
|
|
if (lBControls.SelectedIndex == 32) Show_ControlsBn(bnGyroXN, e);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
|
|
|
|
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
private void Show_ShiftControlsList(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 0) Show_ControlsBn(sbnCross, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 1) Show_ControlsBn(sbnCircle, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 2) Show_ControlsBn(sbnSquare, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 3) Show_ControlsBn(sbnTriangle, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 4) Show_ControlsBn(sbnOptions, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 5) Show_ControlsBn(sbnShare, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 6) Show_ControlsBn(sbnUp, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 7) Show_ControlsBn(sbnDown, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 8) Show_ControlsBn(sbnLeft, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 9) Show_ControlsBn(sbnRight, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 10) Show_ControlsBn(sbnPS, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 11) Show_ControlsBn(sbnL1, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 12) Show_ControlsBn(sbnR1, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 13) Show_ControlsBn(sbnL2, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 14) Show_ControlsBn(sbnR2, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 15) Show_ControlsBn(sbnL3, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 16) Show_ControlsBn(sbnR3, e);
|
|
|
|
|
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 17) Show_ControlsBn(sbnTouchLeft, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 18) Show_ControlsBn(sbnTouchRight, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 19) Show_ControlsBn(sbnTouchMulti, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 20) Show_ControlsBn(sbnTouchUpper, e);
|
|
|
|
|
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 21) Show_ControlsBn(sbnLSUp, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 22) Show_ControlsBn(sbnLSDown, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 23) Show_ControlsBn(sbnLSLeft, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 24) Show_ControlsBn(sbnLSRight, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 25) Show_ControlsBn(sbnRSUp, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 26) Show_ControlsBn(sbnRSDown, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 27) Show_ControlsBn(sbnRSLeft, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 28) Show_ControlsBn(sbnRSRight, e);
|
|
|
|
|
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 29) Show_ControlsBn(sbnGyroZN, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 30) Show_ControlsBn(sbnGyroZP, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 31) Show_ControlsBn(sbnGyroXP, e);
|
|
|
|
|
if (lBShiftControls.SelectedIndex == 32) Show_ControlsBn(sbnGyroXN, e);
|
|
|
|
|
}
|
|
|
|
|
|
2014-04-27 21:32:09 +02:00
|
|
|
|
private void List_MouseDoubleClick(object sender, MouseEventArgs e)
|
|
|
|
|
{
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (((ListBox)sender).Name.Contains("Shift"))
|
|
|
|
|
Show_ShiftControlsList(sender, e);
|
|
|
|
|
else
|
2014-04-27 21:32:09 +02:00
|
|
|
|
Show_ControlsList(sender, e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void List_KeyDown(object sender, KeyEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (e.KeyValue == 13)
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (((ListBox)sender).Name.Contains("Shift"))
|
|
|
|
|
Show_ShiftControlsList(sender, e);
|
|
|
|
|
else
|
|
|
|
|
Show_ControlsList(sender, e);
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
2014-04-29 23:56:58 +02:00
|
|
|
|
|
2014-04-30 21:32:44 +02:00
|
|
|
|
private void numUDRainbow_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.setRainbow(device, (double)nUDRainbow.Value);
|
|
|
|
|
if ((double)nUDRainbow.Value <= 0.5)
|
2014-05-05 04:25:53 +02:00
|
|
|
|
{
|
|
|
|
|
pBRainbow.Image = greyscale;
|
|
|
|
|
ToggleRainbow(false);
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDRainbow.Value = 0;
|
2014-05-05 04:25:53 +02:00
|
|
|
|
}
|
2014-04-30 21:32:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-05-12 07:48:50 +02:00
|
|
|
|
private void pbRainbow_Click(object sender, EventArgs e)
|
2014-04-30 21:32:44 +02:00
|
|
|
|
{
|
|
|
|
|
if (pBRainbow.Image == greyscale)
|
|
|
|
|
{
|
|
|
|
|
pBRainbow.Image = colored;
|
|
|
|
|
ToggleRainbow(true);
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDRainbow.Value = 5;
|
2014-04-30 21:32:44 +02:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pBRainbow.Image = greyscale;
|
|
|
|
|
ToggleRainbow(false);
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDRainbow.Value = 0;
|
2014-04-30 21:32:44 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ToggleRainbow(bool on)
|
|
|
|
|
{
|
2014-06-09 01:41:36 +02:00
|
|
|
|
nUDRainbow.Enabled = on;
|
2014-04-30 21:32:44 +02:00
|
|
|
|
if (on)
|
|
|
|
|
{
|
2014-05-31 06:37:02 +02:00
|
|
|
|
//pBRainbow.Location = new Point(216 - 78, pBRainbow.Location.Y);
|
2014-05-05 04:25:53 +02:00
|
|
|
|
pBController.BackgroundImage = Properties.Resources.rainbowC;
|
2014-08-17 00:09:15 +02:00
|
|
|
|
cBLightbyBattery.Text = Properties.Resources.DimByBattery.Replace("*nl*", "\n");
|
2014-04-30 21:32:44 +02:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-06-21 20:00:28 +02:00
|
|
|
|
lowBatteryPanel.Enabled = cBLightbyBattery.Checked;
|
2014-05-31 06:37:02 +02:00
|
|
|
|
//pBRainbow.Location = new Point(216, pBRainbow.Location.Y);
|
2014-05-05 04:25:53 +02:00
|
|
|
|
pBController.BackgroundImage = null;
|
2014-08-17 00:09:15 +02:00
|
|
|
|
cBLightbyBattery.Text = Properties.Resources.ColorByBattery.Replace("*nl*", "\n");
|
2014-04-30 21:32:44 +02:00
|
|
|
|
}
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lbspc.Enabled = on;
|
2014-05-12 07:48:50 +02:00
|
|
|
|
lowBatteryPanel.Enabled = !on;
|
2014-05-24 04:30:43 +02:00
|
|
|
|
FullPanel.Enabled = !on;
|
2014-04-30 21:32:44 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Bitmap GreyscaleImage(Bitmap image)
|
|
|
|
|
{
|
|
|
|
|
Bitmap c = (Bitmap)image;
|
|
|
|
|
Bitmap d = new Bitmap(c.Width, c.Height);
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < c.Width; i++)
|
|
|
|
|
{
|
|
|
|
|
for (int x = 0; x < c.Height; x++)
|
|
|
|
|
{
|
|
|
|
|
Color oc = c.GetPixel(i, x);
|
|
|
|
|
int grayScale = (int)((oc.R * 0.3) + (oc.G * 0.59) + (oc.B * 0.11));
|
|
|
|
|
Color nc = Color.FromArgb(oc.A, grayScale, grayScale, grayScale);
|
|
|
|
|
d.SetPixel(i, x, nc);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return d;
|
|
|
|
|
}
|
2014-05-05 09:31:24 +02:00
|
|
|
|
|
|
|
|
|
private void numUDL2_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.setLeftTriggerMiddle(device, (byte)(nUDL2.Value * 255));
|
2014-05-05 09:31:24 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void numUDR2_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.setRightTriggerMiddle(device, (byte)(nUDR2.Value * 255));
|
2014-05-12 07:48:50 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-06-26 20:02:01 +02:00
|
|
|
|
private void nUDSX_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Global.setSXDeadzone(device, (double)nUDSX.Value);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (nUDSX.Value <= 0 && nUDSZ.Value <= 0)
|
|
|
|
|
pBSADeadzone.Visible = false;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pBSADeadzone.Visible = true;
|
|
|
|
|
pBSADeadzone.Size = new Size((int)(nUDSX.Value * 125), (int)(nUDSZ.Value * 125));
|
2014-07-26 01:17:45 +02:00
|
|
|
|
pBSADeadzone.Location = new Point(lbSATrack.Location.X + 63 - pBSADeadzone.Size.Width / 2, lbSATrack.Location.Y + 63 - pBSADeadzone.Size.Height / 2);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
}
|
2014-06-26 20:02:01 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void nUDSZ_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Global.setSZDeadzone(device, (double)nUDSZ.Value);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (nUDSX.Value <= 0 && nUDSZ.Value <= 0)
|
|
|
|
|
pBSADeadzone.Visible = false;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pBSADeadzone.Visible = true;
|
|
|
|
|
pBSADeadzone.Size = new Size((int)(nUDSX.Value * 125), (int)(nUDSZ.Value * 125));
|
2014-07-26 01:17:45 +02:00
|
|
|
|
pBSADeadzone.Location = new Point(lbSATrack.Location.X + 63 - pBSADeadzone.Size.Width / 2, lbSATrack.Location.Y + 63 - pBSADeadzone.Size.Height / 2);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
}
|
2014-06-26 20:02:01 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-05-12 07:48:50 +02:00
|
|
|
|
Image L = Properties.Resources.LeftTouch;
|
|
|
|
|
Image R = Properties.Resources.RightTouch;
|
|
|
|
|
Image M = Properties.Resources.MultiTouch;
|
|
|
|
|
Image U = Properties.Resources.UpperTouch;
|
|
|
|
|
private void bnTouchLeft_MouseHover(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-05-24 04:30:43 +02:00
|
|
|
|
pBController.Image = L;
|
|
|
|
|
}
|
2014-05-12 07:48:50 +02:00
|
|
|
|
|
|
|
|
|
private void bnTouchMulti_MouseHover(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
pBController.Image = M;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void bnTouchRight_MouseHover(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
pBController.Image = R;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void bnTouchUpper_MouseHover(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
pBController.Image = U;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Toucpad_Leave(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
pBController.Image = Properties.Resources.DS4_Controller;
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-21 23:42:25 +02:00
|
|
|
|
private void numUDRS_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.setRSDeadzone(device, (byte)Math.Round((nUDRS.Value * 127),0));
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (nUDRS.Value <= 0)
|
|
|
|
|
pBRSDeadzone.Visible = false;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pBRSDeadzone.Visible = true;
|
|
|
|
|
pBRSDeadzone.Size = new Size((int)(nUDRS.Value * 125), (int)(nUDRS.Value * 125));
|
2014-07-26 01:17:45 +02:00
|
|
|
|
pBRSDeadzone.Location = new Point(lbRSTrack.Location.X + 63 - pBRSDeadzone.Size.Width / 2, lbRSTrack.Location.Y + 63 - pBRSDeadzone.Size.Width / 2);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
}
|
2014-05-21 23:42:25 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void numUDLS_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-06-09 01:41:36 +02:00
|
|
|
|
Global.setLSDeadzone(device, (byte)Math.Round((nUDLS.Value * 127),0));
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
if (nUDLS.Value <= 0)
|
|
|
|
|
pBLSDeadzone.Visible = false;
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pBLSDeadzone.Visible = true;
|
|
|
|
|
pBLSDeadzone.Size = new Size((int)(nUDLS.Value*125), (int)(nUDLS.Value*125));
|
2014-07-26 01:17:45 +02:00
|
|
|
|
pBLSDeadzone.Location = new Point(lbLSTrack.Location.X + 63 - pBLSDeadzone.Size.Width / 2, lbLSTrack.Location.Y + 63 - pBLSDeadzone.Size.Width / 2);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
}
|
2014-05-21 23:42:25 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-05-24 04:30:43 +02:00
|
|
|
|
private void numUDMouseSens_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Global.setButtonMouseSensitivity(device, (int)numUDMouseSens.Value);
|
|
|
|
|
}
|
|
|
|
|
|
2014-05-25 01:08:40 +02:00
|
|
|
|
private void LightBar_MouseDown(object sender, MouseEventArgs e)
|
|
|
|
|
{
|
2014-06-03 07:29:42 +02:00
|
|
|
|
if (g.DpiX == 120)
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 125, 0, 2000);
|
|
|
|
|
else
|
|
|
|
|
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), 100, 0, 2000);
|
2014-05-25 01:08:40 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Lightbar_MouseUp(object sender, MouseEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
tp.Hide(((TrackBar)sender));
|
|
|
|
|
}
|
2014-05-30 22:39:39 +02:00
|
|
|
|
|
|
|
|
|
private void btnCancel_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.Close();
|
|
|
|
|
}
|
2014-05-31 06:37:02 +02:00
|
|
|
|
|
|
|
|
|
private void nUDflashLED_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (nUDflashLED.Value % 10 != 0)
|
|
|
|
|
nUDflashLED.Value = Math.Round(nUDflashLED.Value / 10, 0) * 10;
|
|
|
|
|
Global.setFlashAt(device, (int)nUDflashLED.Value);
|
|
|
|
|
}
|
2014-06-02 19:29:38 +02:00
|
|
|
|
|
|
|
|
|
private void rBNormal_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Global.setChargingType(device, 0);
|
|
|
|
|
btnChargingColor.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void rBFade_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Global.setChargingType(device, 1);
|
|
|
|
|
btnChargingColor.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void rBRainbow_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Global.setChargingType(device, 2);
|
|
|
|
|
btnChargingColor.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void rBColor_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Global.setChargingType(device, 3);
|
|
|
|
|
btnChargingColor.Visible = true;
|
|
|
|
|
}
|
|
|
|
|
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
private void cBMouseAccel_CheckedChanged(object sender, EventArgs e)
|
2014-06-24 00:27:14 +02:00
|
|
|
|
{
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
Global.setMouseAccel(device, cBMouseAccel.Checked);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void cBShiftControl_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Global.setShiftModifier(device, cBShiftControl.SelectedIndex);
|
2014-07-26 01:17:45 +02:00
|
|
|
|
if (cBShiftControl.SelectedIndex < 1)
|
|
|
|
|
cBShiftLight.Checked = false;
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void tabControls_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (tabControls.SelectedIndex == 2)
|
2014-06-24 00:27:14 +02:00
|
|
|
|
sixaxisTimer.Start();
|
|
|
|
|
else
|
|
|
|
|
sixaxisTimer.Stop();
|
2014-07-26 01:17:45 +02:00
|
|
|
|
if (tabControls.SelectedIndex == 1)
|
|
|
|
|
ShiftPanel.Visible = true;
|
|
|
|
|
else
|
|
|
|
|
ShiftPanel.Visible = false;
|
2014-06-24 00:27:14 +02:00
|
|
|
|
}
|
2014-06-26 20:02:01 +02:00
|
|
|
|
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
private void DrawCircle(object sender, PaintEventArgs e)
|
2014-06-26 20:02:01 +02:00
|
|
|
|
{
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
// Create pen.
|
|
|
|
|
Pen blackPen = new Pen(Color.Red);
|
|
|
|
|
|
|
|
|
|
// Create rectangle for ellipse.
|
|
|
|
|
Rectangle rect = new Rectangle(0, 0, ((PictureBox)sender).Size.Width, ((PictureBox)sender).Size.Height);
|
|
|
|
|
|
|
|
|
|
// Draw ellipse to screen.
|
|
|
|
|
e.Graphics.DrawEllipse(blackPen, rect);
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-26 01:17:45 +02:00
|
|
|
|
private void lbEmpty_Click(object sender, EventArgs e)
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
{
|
|
|
|
|
lowRedBar.Value = redBar.Value;
|
|
|
|
|
lowGreenBar.Value = greenBar.Value;
|
|
|
|
|
lowBlueBar.Value = blueBar.Value;
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-26 01:17:45 +02:00
|
|
|
|
private void lbShift_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
shiftRedBar.Value = redBar.Value;
|
|
|
|
|
shiftGreenBar.Value = greenBar.Value;
|
|
|
|
|
shiftBlueBar.Value = blueBar.Value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void lbSATip_Click(object sender, EventArgs e)
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
{
|
|
|
|
|
SixaxisPanel.Visible = !SixaxisPanel.Visible;
|
|
|
|
|
pBSADeadzone.Visible = !pBSADeadzone.Visible;
|
|
|
|
|
btnSATrack.Visible = !btnSATrack.Visible;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void SixaxisPanel_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lbSATip_Click(sender, e);
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-07-26 01:17:45 +02:00
|
|
|
|
private void lbSATrack_Click(object sender, EventArgs e)
|
Shift modifier: Hold an action to use another set of controls, if nothing is set to the shifted control, in falls back to the default action
View input of controls in profiles, see exactly when a deadzone is passed and check the input delay for controllers (special thanks to jhebbel), click the on sixaxis panel
Click the Empty text on in the lightbar box to copy the lightbar color from full to empty.
While opened, option to keep the window size after closing the profile's settings
Old profiles are automatically upgraded if it's missing new settings, such as how colors are now saved, sixaxis deadzones, and shift controls
Other UI changes for profile settings, flipped touchpad and other settings boxes
Others:
Fix for when clicking the semicolon in the select an action screen
Fix assigning Sixaxis action to a key
minor UI changes and bug fixes, such as auto resize of the log listview
DS4Updater: Also now works for the new numbering system, can read the version number right from the exe instead of in profiles.xml, UI additions to better notify users of errors, Bug fixes for non-portable users
2014-07-07 21:22:42 +02:00
|
|
|
|
{
|
2014-07-26 01:17:45 +02:00
|
|
|
|
lbSATip_Click(sender, e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void cBShiftLight_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (Global.getShiftModifier(device) < 1)
|
|
|
|
|
cBShiftLight.Checked = false;
|
|
|
|
|
if (!cBShiftLight.Checked)
|
|
|
|
|
{
|
|
|
|
|
spBController.BackColor = pBController.BackColor;
|
|
|
|
|
spBController.BackgroundImage = pBController.BackgroundImage;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
alphacolor = Math.Max(shiftRedBar.Value, Math.Max(shiftGreenBar.Value, shiftBlueBar.Value));
|
|
|
|
|
reg = Color.FromArgb(shiftRedBar.Value, shiftGreenBar.Value, shiftBlueBar.Value);
|
|
|
|
|
full = HuetoRGB(reg.GetHue(), reg.GetBrightness(), reg);
|
|
|
|
|
spBController.BackColor = Color.FromArgb((alphacolor > 205 ? 255 : (alphacolor + 50)), full);
|
|
|
|
|
}
|
|
|
|
|
Global.setShiftColorOn(device, cBShiftLight.Checked);
|
|
|
|
|
lbShift.Enabled = cBShiftLight.Checked;
|
|
|
|
|
lbShiftRed.Enabled = cBShiftLight.Checked;
|
|
|
|
|
lbShiftGreen.Enabled = cBShiftLight.Checked;
|
|
|
|
|
lbShiftBlue.Enabled = cBShiftLight.Checked;
|
|
|
|
|
shiftRedBar.Enabled = cBShiftLight.Checked;
|
|
|
|
|
shiftGreenBar.Enabled = cBShiftLight.Checked;
|
|
|
|
|
shiftBlueBar.Enabled = cBShiftLight.Checked;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnBrowse_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if( openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
cBLaunchProgram.Checked = true;
|
|
|
|
|
Global.setLaunchProgram(device, openFileDialog1.FileName);
|
|
|
|
|
pBProgram.Image = Icon.ExtractAssociatedIcon(openFileDialog1.FileName).ToBitmap();
|
|
|
|
|
btnBrowse.Text = Path.GetFileNameWithoutExtension(openFileDialog1.FileName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void cBLaunchProgram_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (!cBLaunchProgram.Checked)
|
|
|
|
|
{
|
|
|
|
|
Global.setLaunchProgram(device, string.Empty);
|
|
|
|
|
pBProgram.Image = null;
|
2014-08-17 00:09:15 +02:00
|
|
|
|
btnBrowse.Text = Properties.Resources.Browse;
|
2014-07-26 01:17:45 +02:00
|
|
|
|
}
|
2014-06-26 20:02:01 +02:00
|
|
|
|
}
|
2014-08-23 22:52:20 +02:00
|
|
|
|
|
|
|
|
|
private void cBDinput_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Global.setDinputOnly(device, cBDinput.Checked);
|
|
|
|
|
if (device > 4)
|
|
|
|
|
{
|
|
|
|
|
root.btnStartStop_Clicked(false);
|
|
|
|
|
root.btnStartStop_Clicked(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void lbFlashAt_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
advColorDialog.Color = lbFlashAt.ForeColor;
|
|
|
|
|
advColorDialog.Color = lbPercentFlashBar.ForeColor;
|
|
|
|
|
advColorDialog_OnUpdateColor(lbPercentFlashBar.ForeColor, e);
|
|
|
|
|
if (advColorDialog.ShowDialog() == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
lbFlashAt.ForeColor = advColorDialog.Color;
|
|
|
|
|
lbPercentFlashBar.ForeColor = advColorDialog.Color;
|
|
|
|
|
Global.saveFlashColor(device, advColorDialog.Color.R, advColorDialog.Color.G, advColorDialog.Color.B);
|
|
|
|
|
}
|
|
|
|
|
//else Global.saveChargingColor(device, oldChargingColor[0], oldChargingColor[1], oldChargingColor[2]);
|
|
|
|
|
//Global.saveLowColor(device, oldLowLedColor[0], oldLowLedColor[1], oldLowLedColor[2]);
|
|
|
|
|
Global.saveColor(device, oldLedColor[0], oldLedColor[1], oldLedColor[2]);
|
|
|
|
|
oldLedColor = null;
|
|
|
|
|
if (lbFlashAt.ForeColor.GetBrightness() > .5f)
|
|
|
|
|
{
|
|
|
|
|
lbFlashAt.BackColor = Color.Black;
|
|
|
|
|
lbPercentFlashBar.BackColor = Color.Black;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
lbFlashAt.BackColor = Color.White;
|
|
|
|
|
lbPercentFlashBar.BackColor = Color.White;
|
|
|
|
|
}
|
|
|
|
|
//oldChargingColor = null;
|
|
|
|
|
//oldLowLedColor = null;
|
|
|
|
|
}
|
2014-04-27 21:32:09 +02:00
|
|
|
|
}
|
2014-03-28 02:50:40 +01:00
|
|
|
|
}
|