Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion UoFiddler.Controls/UserControls/HuesControl.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion UoFiddler.Controls/UserControls/HuesControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,11 @@ private void OnPaint(object sender, PaintEventArgs e)
float size = (float)(pictureBox.Width - 200) / 32;
Hue hue = Hues.List[index];
Rectangle stringRect = new Rectangle(3, y * _itemHeight, pictureBox.Width, _itemHeight);

int hueDisplayIndex = hue.Index + (IndexOffsetButton.Checked ? 1 : 0);

e.Graphics.DrawString(
$"{hue.Index,-5} {$"(0x{hue.Index:X})",-7} {hue.Name}", Font, Brushes.Black, stringRect);
$"{hueDisplayIndex,-5} {$"(0x{hueDisplayIndex:X})",-7} {hue.Name}", Font, Brushes.Black, stringRect);

for (int i = 0; i < hue.Colors.Length; ++i)
{
Expand Down Expand Up @@ -314,6 +317,11 @@ private void HueIndexToolStripTextBox_KeyUp(object sender, KeyEventArgs e)
return;
}

if (IndexOffsetButton.Checked)
{
indexValue--;
}

if (indexValue < 0)
{
indexValue = 0;
Expand Down Expand Up @@ -390,5 +398,10 @@ private void ExportAllHueNamesListToolStripMenuItem_Click(object sender, EventAr

MessageBox.Show($"Hue names list saved to {fileName}", "Saved", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
}

private void IndexOffsetButton_CheckedChanged(object sender, EventArgs e)
{
pictureBox.Invalidate();
}
}
}
6 changes: 3 additions & 3 deletions UoFiddler.Controls/UserControls/HuesControl.resx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Microsoft ResX Schema

Version 2.0

Expand All @@ -18,7 +18,7 @@
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
Expand Down Expand Up @@ -48,7 +48,7 @@
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
Expand Down