UI tweaks for Ally

This commit is contained in:
Serge
2024-01-14 21:29:24 +01:00
parent 83fed695e4
commit 384a70c51c
3 changed files with 39 additions and 14 deletions

View File

@@ -513,7 +513,7 @@ public class AsusACPI
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {
if (curve[i] == old) curve[i]++; // preventing 2 points in same spot from default asus profiles if (curve[i] <= old) curve[i] = (byte)Math.Min(100, old + 6); // preventing 2 points in same spot from default asus profiles
points[curve[i]] = curve[i + 8]; points[curve[i]] = curve[i + 8];
old = curve[i]; old = curve[i];
} }

View File

@@ -115,6 +115,7 @@ namespace GHelper
panelAllyTitle = new Panel(); panelAllyTitle = new Panel();
pictureAlly = new PictureBox(); pictureAlly = new PictureBox();
labelAlly = new Label(); labelAlly = new Label();
tableAMD = new TableLayoutPanel();
buttonFPS = new RButton(); buttonFPS = new RButton();
panelMatrix.SuspendLayout(); panelMatrix.SuspendLayout();
tableLayoutMatrix.SuspendLayout(); tableLayoutMatrix.SuspendLayout();
@@ -153,6 +154,7 @@ namespace GHelper
tableLayoutAlly.SuspendLayout(); tableLayoutAlly.SuspendLayout();
panelAllyTitle.SuspendLayout(); panelAllyTitle.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pictureAlly).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureAlly).BeginInit();
tableAMD.SuspendLayout();
SuspendLayout(); SuspendLayout();
// //
// panelMatrix // panelMatrix
@@ -164,7 +166,7 @@ namespace GHelper
panelMatrix.Controls.Add(panelMatrixTitle); panelMatrix.Controls.Add(panelMatrixTitle);
panelMatrix.Controls.Add(checkMatrix); panelMatrix.Controls.Add(checkMatrix);
panelMatrix.Dock = DockStyle.Top; panelMatrix.Dock = DockStyle.Top;
panelMatrix.Location = new Point(11, 747); panelMatrix.Location = new Point(11, 827);
panelMatrix.Margin = new Padding(0); panelMatrix.Margin = new Padding(0);
panelMatrix.Name = "panelMatrix"; panelMatrix.Name = "panelMatrix";
panelMatrix.Padding = new Padding(20, 20, 20, 10); panelMatrix.Padding = new Padding(20, 20, 20, 10);
@@ -294,7 +296,7 @@ namespace GHelper
panelBattery.Controls.Add(sliderBattery); panelBattery.Controls.Add(sliderBattery);
panelBattery.Controls.Add(panelBatteryTitle); panelBattery.Controls.Add(panelBatteryTitle);
panelBattery.Dock = DockStyle.Top; panelBattery.Dock = DockStyle.Top;
panelBattery.Location = new Point(11, 1405); panelBattery.Location = new Point(11, 1485);
panelBattery.Margin = new Padding(0); panelBattery.Margin = new Padding(0);
panelBattery.Name = "panelBattery"; panelBattery.Name = "panelBattery";
panelBattery.Padding = new Padding(20, 20, 20, 10); panelBattery.Padding = new Padding(20, 20, 20, 10);
@@ -386,7 +388,7 @@ namespace GHelper
panelFooter.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelFooter.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelFooter.Controls.Add(tableButtons); panelFooter.Controls.Add(tableButtons);
panelFooter.Dock = DockStyle.Top; panelFooter.Dock = DockStyle.Top;
panelFooter.Location = new Point(11, 1580); panelFooter.Location = new Point(11, 1660);
panelFooter.Margin = new Padding(0); panelFooter.Margin = new Padding(0);
panelFooter.Name = "panelFooter"; panelFooter.Name = "panelFooter";
panelFooter.Padding = new Padding(20); panelFooter.Padding = new Padding(20);
@@ -661,6 +663,7 @@ namespace GHelper
panelGPU.AutoSize = true; panelGPU.AutoSize = true;
panelGPU.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelGPU.AutoSizeMode = AutoSizeMode.GrowAndShrink;
panelGPU.Controls.Add(labelTipGPU); panelGPU.Controls.Add(labelTipGPU);
panelGPU.Controls.Add(tableAMD);
panelGPU.Controls.Add(tableGPU); panelGPU.Controls.Add(tableGPU);
panelGPU.Controls.Add(panelGPUTitle); panelGPU.Controls.Add(panelGPUTitle);
panelGPU.Dock = DockStyle.Top; panelGPU.Dock = DockStyle.Top;
@@ -668,7 +671,7 @@ namespace GHelper
panelGPU.Margin = new Padding(0); panelGPU.Margin = new Padding(0);
panelGPU.Name = "panelGPU"; panelGPU.Name = "panelGPU";
panelGPU.Padding = new Padding(20, 20, 20, 0); panelGPU.Padding = new Padding(20, 20, 20, 0);
panelGPU.Size = new Size(827, 352); panelGPU.Size = new Size(827, 432);
panelGPU.TabIndex = 1; panelGPU.TabIndex = 1;
panelGPU.TabStop = true; panelGPU.TabStop = true;
// //
@@ -676,7 +679,7 @@ namespace GHelper
// //
labelTipGPU.Dock = DockStyle.Top; labelTipGPU.Dock = DockStyle.Top;
labelTipGPU.ForeColor = SystemColors.GrayText; labelTipGPU.ForeColor = SystemColors.GrayText;
labelTipGPU.Location = new Point(20, 316); labelTipGPU.Location = new Point(20, 396);
labelTipGPU.Margin = new Padding(4, 0, 4, 0); labelTipGPU.Margin = new Padding(4, 0, 4, 0);
labelTipGPU.Name = "labelTipGPU"; labelTipGPU.Name = "labelTipGPU";
labelTipGPU.Size = new Size(787, 36); labelTipGPU.Size = new Size(787, 36);
@@ -897,7 +900,7 @@ namespace GHelper
panelScreen.Controls.Add(tableScreen); panelScreen.Controls.Add(tableScreen);
panelScreen.Controls.Add(panelScreenTitle); panelScreen.Controls.Add(panelScreenTitle);
panelScreen.Dock = DockStyle.Top; panelScreen.Dock = DockStyle.Top;
panelScreen.Location = new Point(11, 571); panelScreen.Location = new Point(11, 651);
panelScreen.Margin = new Padding(0); panelScreen.Margin = new Padding(0);
panelScreen.Name = "panelScreen"; panelScreen.Name = "panelScreen";
panelScreen.Padding = new Padding(20, 20, 20, 0); panelScreen.Padding = new Padding(20, 20, 20, 0);
@@ -1068,7 +1071,7 @@ namespace GHelper
panelKeyboard.Controls.Add(tableLayoutKeyboard); panelKeyboard.Controls.Add(tableLayoutKeyboard);
panelKeyboard.Controls.Add(panelKeyboardTitle); panelKeyboard.Controls.Add(panelKeyboardTitle);
panelKeyboard.Dock = DockStyle.Top; panelKeyboard.Dock = DockStyle.Top;
panelKeyboard.Location = new Point(11, 1063); panelKeyboard.Location = new Point(11, 1143);
panelKeyboard.Margin = new Padding(0); panelKeyboard.Margin = new Padding(0);
panelKeyboard.Name = "panelKeyboard"; panelKeyboard.Name = "panelKeyboard";
panelKeyboard.Padding = new Padding(20); panelKeyboard.Padding = new Padding(20);
@@ -1244,7 +1247,7 @@ namespace GHelper
panelVersion.Controls.Add(labelCharge); panelVersion.Controls.Add(labelCharge);
panelVersion.Controls.Add(checkStartup); panelVersion.Controls.Add(checkStartup);
panelVersion.Dock = DockStyle.Top; panelVersion.Dock = DockStyle.Top;
panelVersion.Location = new Point(11, 1524); panelVersion.Location = new Point(11, 1604);
panelVersion.Margin = new Padding(4); panelVersion.Margin = new Padding(4);
panelVersion.Name = "panelVersion"; panelVersion.Name = "panelVersion";
panelVersion.Size = new Size(827, 56); panelVersion.Size = new Size(827, 56);
@@ -1269,7 +1272,7 @@ namespace GHelper
panelPeripherals.Controls.Add(tableLayoutPeripherals); panelPeripherals.Controls.Add(tableLayoutPeripherals);
panelPeripherals.Controls.Add(panelPeripheralsTile); panelPeripherals.Controls.Add(panelPeripheralsTile);
panelPeripherals.Dock = DockStyle.Top; panelPeripherals.Dock = DockStyle.Top;
panelPeripherals.Location = new Point(11, 1207); panelPeripherals.Location = new Point(11, 1287);
panelPeripherals.Margin = new Padding(0); panelPeripherals.Margin = new Padding(0);
panelPeripherals.Name = "panelPeripherals"; panelPeripherals.Name = "panelPeripherals";
panelPeripherals.Padding = new Padding(20, 20, 20, 10); panelPeripherals.Padding = new Padding(20, 20, 20, 10);
@@ -1411,7 +1414,7 @@ namespace GHelper
panelAlly.Controls.Add(tableLayoutAlly); panelAlly.Controls.Add(tableLayoutAlly);
panelAlly.Controls.Add(panelAllyTitle); panelAlly.Controls.Add(panelAllyTitle);
panelAlly.Dock = DockStyle.Top; panelAlly.Dock = DockStyle.Top;
panelAlly.Location = new Point(11, 923); panelAlly.Location = new Point(11, 1003);
panelAlly.Margin = new Padding(0); panelAlly.Margin = new Padding(0);
panelAlly.Name = "panelAlly"; panelAlly.Name = "panelAlly";
panelAlly.Padding = new Padding(20, 20, 20, 0); panelAlly.Padding = new Padding(20, 20, 20, 0);
@@ -1428,7 +1431,6 @@ namespace GHelper
tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
tableLayoutAlly.Controls.Add(buttonFPS, 0, 0);
tableLayoutAlly.Controls.Add(buttonBacklight, 0, 0); tableLayoutAlly.Controls.Add(buttonBacklight, 0, 0);
tableLayoutAlly.Controls.Add(buttonController, 0, 0); tableLayoutAlly.Controls.Add(buttonController, 0, 0);
tableLayoutAlly.Dock = DockStyle.Top; tableLayoutAlly.Dock = DockStyle.Top;
@@ -1517,6 +1519,25 @@ namespace GHelper
labelAlly.TabIndex = 26; labelAlly.TabIndex = 26;
labelAlly.Text = "Ally Controller"; labelAlly.Text = "Ally Controller";
// //
// tableAMD
//
tableAMD.AutoSize = true;
tableAMD.AutoSizeMode = AutoSizeMode.GrowAndShrink;
tableAMD.ColumnCount = 3;
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F));
tableAMD.Controls.Add(buttonFPS, 0, 0);
tableAMD.Dock = DockStyle.Top;
tableAMD.Location = new Point(20, 316);
tableAMD.Margin = new Padding(8, 4, 8, 4);
tableAMD.Name = "tableAMD";
tableAMD.RowCount = 1;
tableAMD.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F));
tableAMD.Size = new Size(787, 80);
tableAMD.TabIndex = 24;
tableAMD.Visible = false;
//
// buttonFPS // buttonFPS
// //
buttonFPS.Activated = false; buttonFPS.Activated = false;
@@ -1529,11 +1550,11 @@ namespace GHelper
buttonFPS.ForeColor = SystemColors.ControlText; buttonFPS.ForeColor = SystemColors.ControlText;
buttonFPS.Image = Properties.Resources.icons8_video_48; buttonFPS.Image = Properties.Resources.icons8_video_48;
buttonFPS.ImageAlign = ContentAlignment.MiddleRight; buttonFPS.ImageAlign = ContentAlignment.MiddleRight;
buttonFPS.Location = new Point(528, 4); buttonFPS.Location = new Point(4, 4);
buttonFPS.Margin = new Padding(4); buttonFPS.Margin = new Padding(4);
buttonFPS.Name = "buttonFPS"; buttonFPS.Name = "buttonFPS";
buttonFPS.Secondary = false; buttonFPS.Secondary = false;
buttonFPS.Size = new Size(255, 72); buttonFPS.Size = new Size(254, 72);
buttonFPS.TabIndex = 11; buttonFPS.TabIndex = 11;
buttonFPS.Text = "FPS Limit OFF"; buttonFPS.Text = "FPS Limit OFF";
buttonFPS.TextImageRelation = TextImageRelation.ImageBeforeText; buttonFPS.TextImageRelation = TextImageRelation.ImageBeforeText;
@@ -1620,6 +1641,7 @@ namespace GHelper
panelAllyTitle.ResumeLayout(false); panelAllyTitle.ResumeLayout(false);
panelAllyTitle.PerformLayout(); panelAllyTitle.PerformLayout();
((System.ComponentModel.ISupportInitialize)pictureAlly).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureAlly).EndInit();
tableAMD.ResumeLayout(false);
ResumeLayout(false); ResumeLayout(false);
PerformLayout(); PerformLayout();
} }
@@ -1710,6 +1732,7 @@ namespace GHelper
private Label labelAlly; private Label labelAlly;
private PictureBox pictureAlly; private PictureBox pictureAlly;
private RButton buttonBacklight; private RButton buttonBacklight;
private TableLayoutPanel tableAMD;
private RButton buttonFPS; private RButton buttonFPS;
} }
} }

View File

@@ -269,6 +269,8 @@ namespace GHelper
panelAlly.Visible = true; panelAlly.Visible = true;
panelKeyboardTitle.Visible = false; panelKeyboardTitle.Visible = false;
panelKeyboard.Padding = new Padding(20, 0, 20, 20); panelKeyboard.Padding = new Padding(20, 0, 20, 20);
tableAMD.Visible = true;
} }
public void VisualiseController(ControllerMode mode) public void VisualiseController(ControllerMode mode)