Message Config - allow configuring of the position and anchoring of messages, fix the saving of the multitrack x,y variables
This commit is contained in:
parent
b6f6b9a5db
commit
1fe65754f1
|
@ -229,6 +229,9 @@ namespace BizHawk.MultiClient
|
||||||
public int DispRamWatchy = 70;
|
public int DispRamWatchy = 70;
|
||||||
public bool DisplayRamWatch = false;
|
public bool DisplayRamWatch = false;
|
||||||
public bool ShowMenuInFullscreen = false;
|
public bool ShowMenuInFullscreen = false;
|
||||||
|
public int DispMessagex = 3;
|
||||||
|
public int DispMessagey = 0;
|
||||||
|
public int DispMessageanchor = 2;
|
||||||
|
|
||||||
// Sound options
|
// Sound options
|
||||||
public bool SoundEnabled = true;
|
public bool SoundEnabled = true;
|
||||||
|
|
|
@ -390,8 +390,16 @@ namespace BizHawk.MultiClient
|
||||||
int line = 1;
|
int line = 1;
|
||||||
for (int i = messages.Count - 1; i >= 0; i--, line++)
|
for (int i = messages.Count - 1; i >= 0; i--, line++)
|
||||||
{
|
{
|
||||||
float x = 3;
|
float x = GetX(g, Global.Config.DispMessagex, Global.Config.DispMessageanchor, MessageFont, messages[i].Message);
|
||||||
float y = g.ClipBounds.Height - (line * 18);
|
float y = GetY(g, Global.Config.DispMessagey, Global.Config.DispMessageanchor, MessageFont, messages[i].Message);
|
||||||
|
if (Global.Config.DispMessageanchor < 2)
|
||||||
|
{
|
||||||
|
y += ((line - 1) * 18);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
y -= ((line -1) * 18);
|
||||||
|
}
|
||||||
g.DrawString(messages[i].Message, MessageFont, Color.Black, x + 2, y + 2);
|
g.DrawString(messages[i].Message, MessageFont, Color.Black, x + 2, y + 2);
|
||||||
g.DrawString(messages[i].Message, MessageFont, FixedMessagesColor, x, y);
|
g.DrawString(messages[i].Message, MessageFont, FixedMessagesColor, x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,7 +214,6 @@
|
||||||
// MessagesRadio
|
// MessagesRadio
|
||||||
//
|
//
|
||||||
this.MessagesRadio.AutoSize = true;
|
this.MessagesRadio.AutoSize = true;
|
||||||
this.MessagesRadio.Enabled = false;
|
|
||||||
this.MessagesRadio.Location = new System.Drawing.Point(6, 114);
|
this.MessagesRadio.Location = new System.Drawing.Point(6, 114);
|
||||||
this.MessagesRadio.Name = "MessagesRadio";
|
this.MessagesRadio.Name = "MessagesRadio";
|
||||||
this.MessagesRadio.Size = new System.Drawing.Size(73, 17);
|
this.MessagesRadio.Size = new System.Drawing.Size(73, 17);
|
||||||
|
|
|
@ -34,6 +34,8 @@ namespace BizHawk.MultiClient
|
||||||
int DispRecy = Global.Config.DispRecy;
|
int DispRecy = Global.Config.DispRecy;
|
||||||
int DispMultix = Global.Config.DispMultix;
|
int DispMultix = Global.Config.DispMultix;
|
||||||
int DispMultiy = Global.Config.DispMultiy;
|
int DispMultiy = Global.Config.DispMultiy;
|
||||||
|
int DispMessagex = Global.Config.DispMessagex;
|
||||||
|
int DispMessagey = Global.Config.DispMessagey;
|
||||||
|
|
||||||
int MessageColor = Global.Config.MessagesColor;
|
int MessageColor = Global.Config.MessagesColor;
|
||||||
int AlertColor = Global.Config.AlertMessageColor;
|
int AlertColor = Global.Config.AlertMessageColor;
|
||||||
|
@ -45,6 +47,7 @@ namespace BizHawk.MultiClient
|
||||||
int DispInputanchor = Global.Config.DispInpanchor;
|
int DispInputanchor = Global.Config.DispInpanchor;
|
||||||
int DispRecanchor = Global.Config.DispRecanchor;
|
int DispRecanchor = Global.Config.DispRecanchor;
|
||||||
int DispMultiAnchor = Global.Config.DispMultianchor;
|
int DispMultiAnchor = Global.Config.DispMultianchor;
|
||||||
|
int DispMessageAnchor = Global.Config.DispMessageanchor;
|
||||||
|
|
||||||
public Brush brush = Brushes.Black;
|
public Brush brush = Brushes.Black;
|
||||||
int px = 0;
|
int px = 0;
|
||||||
|
@ -153,10 +156,11 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
else if (MessagesRadio.Checked)
|
else if (MessagesRadio.Checked)
|
||||||
{
|
{
|
||||||
XNumeric.Value = 0;
|
XNumeric.Value = DispMessagex;
|
||||||
YNumeric.Value = 0;
|
YNumeric.Value = DispMessagey;
|
||||||
px = 0;
|
px = DispMessagex;
|
||||||
py = 0;
|
py = DispMessagey;
|
||||||
|
SetAnchorRadio(DispMessageAnchor);
|
||||||
}
|
}
|
||||||
else if (RerecordsRadio.Checked)
|
else if (RerecordsRadio.Checked)
|
||||||
{
|
{
|
||||||
|
@ -195,6 +199,8 @@ namespace BizHawk.MultiClient
|
||||||
Global.Config.DispRecy = DispRecy;
|
Global.Config.DispRecy = DispRecy;
|
||||||
Global.Config.DispMultix = DispMultix;
|
Global.Config.DispMultix = DispMultix;
|
||||||
Global.Config.DispMultiy = DispMultiy;
|
Global.Config.DispMultiy = DispMultiy;
|
||||||
|
Global.Config.DispMessagex = DispMessagex;
|
||||||
|
Global.Config.DispMessagey = DispMessagey;
|
||||||
|
|
||||||
Global.Config.MessagesColor = MessageColor;
|
Global.Config.MessagesColor = MessageColor;
|
||||||
Global.Config.AlertMessageColor = AlertColor;
|
Global.Config.AlertMessageColor = AlertColor;
|
||||||
|
@ -206,6 +212,7 @@ namespace BizHawk.MultiClient
|
||||||
Global.Config.DispInpanchor = DispInputanchor;
|
Global.Config.DispInpanchor = DispInputanchor;
|
||||||
Global.Config.DispRecanchor = DispRecanchor;
|
Global.Config.DispRecanchor = DispRecanchor;
|
||||||
Global.Config.DispMultianchor = DispMultiAnchor;
|
Global.Config.DispMultianchor = DispMultiAnchor;
|
||||||
|
Global.Config.DispMessageanchor = DispMessageAnchor;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OK_Click(object sender, EventArgs e)
|
private void OK_Click(object sender, EventArgs e)
|
||||||
|
@ -356,13 +363,19 @@ namespace BizHawk.MultiClient
|
||||||
DispMultix = px;
|
DispMultix = px;
|
||||||
DispMultiy = py;
|
DispMultiy = py;
|
||||||
}
|
}
|
||||||
|
else if (MessagesRadio.Checked)
|
||||||
|
{
|
||||||
|
DispMessagex = px;
|
||||||
|
DispMessagey = py;
|
||||||
|
}
|
||||||
|
|
||||||
FpsPosLabel.Text = DispFPSx.ToString() + ", " + DispFPSy.ToString();
|
FpsPosLabel.Text = DispFPSx.ToString() + ", " + DispFPSy.ToString();
|
||||||
FCLabel.Text = DispFrameCx.ToString() + ", " + DispFrameCy.ToString();
|
FCLabel.Text = DispFrameCx.ToString() + ", " + DispFrameCy.ToString();
|
||||||
LagLabel.Text = DispLagx.ToString() + ", " + DispLagy.ToString();
|
LagLabel.Text = DispLagx.ToString() + ", " + DispLagy.ToString();
|
||||||
InpLabel.Text = DispInpx.ToString() + ", " + DispInpy.ToString();
|
InpLabel.Text = DispInpx.ToString() + ", " + DispInpy.ToString();
|
||||||
RerecLabel.Text = DispRecx.ToString() + ", " + DispRecy.ToString();
|
RerecLabel.Text = DispRecx.ToString() + ", " + DispRecy.ToString();
|
||||||
MultitrackLabel.Text = DispMultix.ToString() + ", " + DispMultiy.ToString();
|
MultitrackLabel.Text = DispMultix.ToString() + ", " + DispMultiy.ToString();
|
||||||
MessLabel.Text = "0, 0";
|
MessLabel.Text = DispMessagex.ToString() + ", " + DispMessagey.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ResetDefaultsButton_Click(object sender, EventArgs e)
|
private void ResetDefaultsButton_Click(object sender, EventArgs e)
|
||||||
|
@ -379,6 +392,8 @@ namespace BizHawk.MultiClient
|
||||||
Global.Config.DispRecy = 48;
|
Global.Config.DispRecy = 48;
|
||||||
Global.Config.DispMultix = 36;
|
Global.Config.DispMultix = 36;
|
||||||
Global.Config.DispMultiy = 0;
|
Global.Config.DispMultiy = 0;
|
||||||
|
Global.Config.DispMessagex = 3;
|
||||||
|
Global.Config.DispMessagey = 0;
|
||||||
|
|
||||||
Global.Config.MessagesColor = -1;
|
Global.Config.MessagesColor = -1;
|
||||||
Global.Config.AlertMessageColor = -65536;
|
Global.Config.AlertMessageColor = -65536;
|
||||||
|
@ -401,6 +416,7 @@ namespace BizHawk.MultiClient
|
||||||
Global.Config.DispInpanchor = 0;
|
Global.Config.DispInpanchor = 0;
|
||||||
Global.Config.DispRecanchor = 0;
|
Global.Config.DispRecanchor = 0;
|
||||||
Global.Config.DispMultianchor = 0;
|
Global.Config.DispMultianchor = 0;
|
||||||
|
Global.Config.DispMessageanchor = 2;
|
||||||
|
|
||||||
DispFPSx = Global.Config.DispFPSx;
|
DispFPSx = Global.Config.DispFPSx;
|
||||||
DispFPSy = Global.Config.DispFPSy;
|
DispFPSy = Global.Config.DispFPSy;
|
||||||
|
@ -414,6 +430,8 @@ namespace BizHawk.MultiClient
|
||||||
DispRecy = Global.Config.DispRecy;
|
DispRecy = Global.Config.DispRecy;
|
||||||
DispMultix = Global.Config.DispMultix;
|
DispMultix = Global.Config.DispMultix;
|
||||||
DispMultiy = Global.Config.DispMultiy;
|
DispMultiy = Global.Config.DispMultiy;
|
||||||
|
DispMessagex = Global.Config.DispMessagex;
|
||||||
|
DispMessagey = Global.Config.DispMessagey;
|
||||||
|
|
||||||
DispFPSanchor = Global.Config.DispFPSanchor;
|
DispFPSanchor = Global.Config.DispFPSanchor;
|
||||||
DispFrameanchor = Global.Config.DispFrameanchor;
|
DispFrameanchor = Global.Config.DispFrameanchor;
|
||||||
|
@ -421,26 +439,50 @@ namespace BizHawk.MultiClient
|
||||||
DispInputanchor = Global.Config.DispInpanchor;
|
DispInputanchor = Global.Config.DispInpanchor;
|
||||||
DispRecanchor = Global.Config.DispRecanchor;
|
DispRecanchor = Global.Config.DispRecanchor;
|
||||||
DispMultiAnchor = Global.Config.DispMultianchor;
|
DispMultiAnchor = Global.Config.DispMultianchor;
|
||||||
|
DispMessageAnchor = Global.Config.DispMessageanchor;
|
||||||
|
|
||||||
SetMaxXY();
|
SetMaxXY();
|
||||||
SetColorBox();
|
SetColorBox();
|
||||||
SetPositionInfo();
|
SetPositionInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SetAnchorValue(int value)
|
||||||
|
{
|
||||||
|
if (FPSRadio.Checked)
|
||||||
|
{
|
||||||
|
DispFPSanchor = value;
|
||||||
|
}
|
||||||
|
else if (FrameCounterRadio.Checked)
|
||||||
|
{
|
||||||
|
DispFrameanchor = value;
|
||||||
|
}
|
||||||
|
else if (LagCounterRadio.Checked)
|
||||||
|
{
|
||||||
|
DispLaganchor = value;
|
||||||
|
}
|
||||||
|
else if (InputDisplayRadio.Checked)
|
||||||
|
{
|
||||||
|
DispInputanchor = value;
|
||||||
|
}
|
||||||
|
else if (MessagesRadio.Checked)
|
||||||
|
{
|
||||||
|
DispMessageAnchor = value;
|
||||||
|
}
|
||||||
|
else if (RerecordsRadio.Checked)
|
||||||
|
{
|
||||||
|
DispRecanchor = value;
|
||||||
|
}
|
||||||
|
else if (MultitrackRadio.Checked)
|
||||||
|
{
|
||||||
|
DispMultiAnchor = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void TL_CheckedChanged(object sender, EventArgs e)
|
private void TL_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (TL.Checked)
|
if (TL.Checked)
|
||||||
{
|
{
|
||||||
if (FPSRadio.Checked)
|
SetAnchorValue(0);
|
||||||
DispFPSanchor = 0;
|
|
||||||
else if (FrameCounterRadio.Checked)
|
|
||||||
DispFrameanchor = 0;
|
|
||||||
else if (LagCounterRadio.Checked)
|
|
||||||
DispLaganchor = 0;
|
|
||||||
else if (InputDisplayRadio.Checked)
|
|
||||||
DispInputanchor = 0;
|
|
||||||
else if (RerecordsRadio.Checked)
|
|
||||||
DispRecanchor = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -448,16 +490,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
if (TR.Checked)
|
if (TR.Checked)
|
||||||
{
|
{
|
||||||
if (FPSRadio.Checked)
|
SetAnchorValue(1);
|
||||||
DispFPSanchor = 1;
|
|
||||||
else if (FrameCounterRadio.Checked)
|
|
||||||
DispFrameanchor = 1;
|
|
||||||
else if (LagCounterRadio.Checked)
|
|
||||||
DispLaganchor = 1;
|
|
||||||
else if (InputDisplayRadio.Checked)
|
|
||||||
DispInputanchor = 1;
|
|
||||||
else if (RerecordsRadio.Checked)
|
|
||||||
DispRecanchor = 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -465,16 +498,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
if (BL.Checked)
|
if (BL.Checked)
|
||||||
{
|
{
|
||||||
if (FPSRadio.Checked)
|
SetAnchorValue(2);
|
||||||
DispFPSanchor = 2;
|
|
||||||
else if (FrameCounterRadio.Checked)
|
|
||||||
DispFrameanchor = 2;
|
|
||||||
else if (LagCounterRadio.Checked)
|
|
||||||
DispLaganchor = 2;
|
|
||||||
else if (InputDisplayRadio.Checked)
|
|
||||||
DispInputanchor = 2;
|
|
||||||
else if (RerecordsRadio.Checked)
|
|
||||||
DispRecanchor = 2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -482,16 +506,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
if (BR.Checked)
|
if (BR.Checked)
|
||||||
{
|
{
|
||||||
if (FPSRadio.Checked)
|
SetAnchorValue(3);
|
||||||
DispFPSanchor = 3;
|
|
||||||
else if (FrameCounterRadio.Checked)
|
|
||||||
DispFrameanchor = 3;
|
|
||||||
else if (LagCounterRadio.Checked)
|
|
||||||
DispLaganchor = 3;
|
|
||||||
else if (InputDisplayRadio.Checked)
|
|
||||||
DispInputanchor = 3;
|
|
||||||
else if (RerecordsRadio.Checked)
|
|
||||||
DispRecanchor = 3;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -508,25 +523,33 @@ namespace BizHawk.MultiClient
|
||||||
private void ColorPanel_Click(object sender, EventArgs e)
|
private void ColorPanel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (MessageColorDialog.ShowDialog() == DialogResult.OK)
|
if (MessageColorDialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
SetColorBox();
|
SetColorBox();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AlertColorPanel_Click(object sender, EventArgs e)
|
private void AlertColorPanel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (AlertColorDialog.ShowDialog() == DialogResult.OK)
|
if (AlertColorDialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
SetColorBox();
|
SetColorBox();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LInputColorPanel_Click(object sender, EventArgs e)
|
private void LInputColorPanel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (LInputColorDialog.ShowDialog() == DialogResult.OK)
|
if (LInputColorDialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
SetColorBox();
|
SetColorBox();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MovieInputColor_Click(object sender, EventArgs e)
|
private void MovieInputColor_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (MovieInputColorDialog.ShowDialog() == DialogResult.OK)
|
if (MovieInputColorDialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
SetColorBox();
|
SetColorBox();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue