Movie Subtitles - in Edit Subtitle dialog, parse color value as hex, in render panel read the subtitle color

This commit is contained in:
andres.delikat 2011-07-16 02:11:51 +00:00
parent 211889c73d
commit b551d9dbdd
2 changed files with 4 additions and 3 deletions

View File

@ -417,12 +417,12 @@ namespace BizHawk.MultiClient
if (Global.Config.DisplaySubtitles)
{
//TODO: read subtitle positioning, implement multiple subtitles at once feature
//TODO: implement multiple subtitles at once feature
Subtitle s = new Subtitle(Global.MainForm.UserMovie.Subtitles.GetSubtitle(Global.Emulator.Frame));
MessageFont.DrawString(null, s.Message, s.X + 1,
s.Y + 1, new Color4(Color.Black));
MessageFont.DrawString(null, s.Message, s.X,
s.Y, new Color4(Color.White));//Color.FromArgb((int)s.Color));
s.Y, Color.FromArgb((int)s.Color));
}
}

View File

@ -6,6 +6,7 @@ using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
namespace BizHawk.MultiClient
{
@ -77,7 +78,7 @@ namespace BizHawk.MultiClient
try { s.Duration = int.Parse(c.Value.ToString()); }
catch { ShowError(x, 3); return; }
c = SubGrid.Rows[x].Cells[4];
try { s.Color = uint.Parse(c.Value.ToString()); }
try { s.Color = uint.Parse(c.Value.ToString(), NumberStyles.HexNumber); }
catch { ShowError(x, 4); return; }
try { c = SubGrid.Rows[x].Cells[5]; }
catch { ShowError(x, 5); return; }