minor adjustment to colored game cart icons

This commit is contained in:
Yako 2025-08-04 20:59:33 +02:00
parent c4c088984e
commit 47d4ead8bc
3 changed files with 721 additions and 717 deletions

File diff suppressed because it is too large Load Diff

View File

@ -339,6 +339,23 @@ namespace DSPRE {
}
}
private void CalculateLabelWidths()
{
Label[] imageLabels = { pokeRadarLabel1, pokeRadarLabel2, rubyLabel, sapphireLabel, emeraldLabel, fireRedLabel, leafGreenLabel };
foreach (Label label in imageLabels)
{
if (label.Text.Length > 0)
{
// Measure the width of the text
SizeF size = TextRenderer.MeasureText(label.Text, label.Font);
int imageWidth = label.Image != null ? label.Image.Width : 0;
// Set the width of the label to fit the text
label.Width = (int)size.Width + imageWidth + 5; // Add image width and some padding
}
}
}
private void exportEncounterFileButton_Click(object sender, EventArgs e) {
currentFile.SaveToFileExplorePath("Encounter File " + selectEncounterComboBox.SelectedIndex);
}
@ -1088,6 +1105,7 @@ namespace DSPRE {
return;
}
DrawConnectingLines();
CalculateLabelWidths();
}
}
}

View File

@ -195,7 +195,7 @@
<data name="rubyLabel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAdCAYAAADLnm6HAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wgAADsIBFShKgAAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC41ZYUyZQAAAPBJREFUSEvtkkEK
vgAADr4B6kKxwAAAABh0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC41ZYUyZQAAAPBJREFUSEvtkkEK
wjAURHOEHkFw1WWv5dalV/Eqnq0y+qeM32iaNgkUMvAIbfIzr2Lo6TlMzsMwE3vVLih9TNNCUxEtv4/j
i6YiKGAxuZ3eVBfBpfrlnqoivny+XhZUAhQX+VeuqAQoIrK23ONFsGaLbC0nnAOUACpiVd9h+R4Bwnkl
KYGNmASIlaxB7wBJAfxsJUV0FvBuq/wMN/lP5rOXALEyj57Xu7FaZTx6eKuInvF3WU06LM4V0fec56xd