void PanelsEngPaint(object sender, PaintEventArgs e)
{
if (custListViewMain.SelectedIndices.Count > 0 && custListViewBlock.SelectedIndices.Count > 0)
{
DialogueChoicesEntry choicesEntry = GetCurrentDialogueEntry();
int j = 0;
Lib.NoBackgroundPaintPanel panel = (Lib.NoBackgroundPaintPanel)sender;
for (int i = 0; i < panelsEng.Length; i++)
{
if (panel.Name == panelsEng[i].Name)
j = i;
}
if (choicesEntry.JapText[j] != null)
{
ResourceObjects.EngFontResourceObject resobject = ResourceObjects.EngFontResourceObject.Instance;
string text = choicesEntry.EngText[j];
if (text == null)
text = String.Empty;
Bitmap buffer = resobject.GetTextWithChoiceBoxBitmap(text);
panelsEng[j].Size = buffer.Size;
//Draws buffer
Graphics g = e.Graphics;
Point rect = new Point(0, 0);
g.DrawImage(buffer, rect);
}
else
{
panelsEng[j].Visible = false;
}
}
}