Message Config - ability to toggle the "stacking" effect on general OSD messages
This commit is contained in:
parent
6a2e17f143
commit
df767b9b6f
|
@ -156,6 +156,7 @@ namespace BizHawk.MultiClient
|
||||||
public string FFMpegPath = "%exe%/ffmpeg.exe";
|
public string FFMpegPath = "%exe%/ffmpeg.exe";
|
||||||
|
|
||||||
// General Client Settings
|
// General Client Settings
|
||||||
|
public bool StackOSDMessages = true;
|
||||||
public int TargetZoomFactor = 2;
|
public int TargetZoomFactor = 2;
|
||||||
public int TargetDisplayFilter = 0;
|
public int TargetDisplayFilter = 0;
|
||||||
public bool AutoLoadMostRecentRom = false;
|
public bool AutoLoadMostRecentRom = false;
|
||||||
|
|
|
@ -388,6 +388,8 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
messages.RemoveAll(m => DateTime.Now > m.ExpireAt);
|
messages.RemoveAll(m => DateTime.Now > m.ExpireAt);
|
||||||
int line = 1;
|
int line = 1;
|
||||||
|
if (Global.Config.StackOSDMessages)
|
||||||
|
{
|
||||||
for (int i = messages.Count - 1; i >= 0; i--, line++)
|
for (int i = messages.Count - 1; i >= 0; i--, line++)
|
||||||
{
|
{
|
||||||
float x = GetX(g, Global.Config.DispMessagex, Global.Config.DispMessageanchor, MessageFont, messages[i].Message);
|
float x = GetX(g, Global.Config.DispMessagex, Global.Config.DispMessageanchor, MessageFont, messages[i].Message);
|
||||||
|
@ -398,11 +400,32 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
y -= ((line -1) * 18);
|
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);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (messages.Count > 0)
|
||||||
|
{
|
||||||
|
int i = messages.Count - 1;
|
||||||
|
|
||||||
|
float x = GetX(g, Global.Config.DispMessagex, Global.Config.DispMessageanchor, MessageFont, messages[i].Message);
|
||||||
|
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, FixedMessagesColor, x, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int x = 0; x < GUITextList.Count; x++)
|
for (int x = 0; x < GUITextList.Count; x++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
this.AlertColorDialog = new System.Windows.Forms.ColorDialog();
|
this.AlertColorDialog = new System.Windows.Forms.ColorDialog();
|
||||||
this.LInputColorDialog = new System.Windows.Forms.ColorDialog();
|
this.LInputColorDialog = new System.Windows.Forms.ColorDialog();
|
||||||
this.MovieInputColorDialog = new System.Windows.Forms.ColorDialog();
|
this.MovieInputColorDialog = new System.Windows.Forms.ColorDialog();
|
||||||
|
this.StackMessagesCheckbox = new System.Windows.Forms.CheckBox();
|
||||||
this.MessageTypeBox.SuspendLayout();
|
this.MessageTypeBox.SuspendLayout();
|
||||||
this.groupBox2.SuspendLayout();
|
this.groupBox2.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.XNumeric)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.XNumeric)).BeginInit();
|
||||||
|
@ -617,6 +618,16 @@
|
||||||
//
|
//
|
||||||
this.MovieInputColorDialog.FullOpen = true;
|
this.MovieInputColorDialog.FullOpen = true;
|
||||||
//
|
//
|
||||||
|
// StackMessagesCheckbox
|
||||||
|
//
|
||||||
|
this.StackMessagesCheckbox.AutoSize = true;
|
||||||
|
this.StackMessagesCheckbox.Location = new System.Drawing.Point(195, 411);
|
||||||
|
this.StackMessagesCheckbox.Name = "StackMessagesCheckbox";
|
||||||
|
this.StackMessagesCheckbox.Size = new System.Drawing.Size(105, 17);
|
||||||
|
this.StackMessagesCheckbox.TabIndex = 7;
|
||||||
|
this.StackMessagesCheckbox.Text = "Stack Messages";
|
||||||
|
this.StackMessagesCheckbox.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// MessageConfig
|
// MessageConfig
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.OK;
|
this.AcceptButton = this.OK;
|
||||||
|
@ -624,6 +635,7 @@
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.CancelButton = this.Cancel;
|
this.CancelButton = this.Cancel;
|
||||||
this.ClientSize = new System.Drawing.Size(612, 469);
|
this.ClientSize = new System.Drawing.Size(612, 469);
|
||||||
|
this.Controls.Add(this.StackMessagesCheckbox);
|
||||||
this.Controls.Add(this.ResetDefaultsButton);
|
this.Controls.Add(this.ResetDefaultsButton);
|
||||||
this.Controls.Add(this.Cancel);
|
this.Controls.Add(this.Cancel);
|
||||||
this.Controls.Add(this.groupBox2);
|
this.Controls.Add(this.groupBox2);
|
||||||
|
@ -645,6 +657,7 @@
|
||||||
this.PositionGroupBox.ResumeLayout(false);
|
this.PositionGroupBox.ResumeLayout(false);
|
||||||
this.PositionGroupBox.PerformLayout();
|
this.PositionGroupBox.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -699,5 +712,6 @@
|
||||||
private System.Windows.Forms.ColorDialog MovieInputColorDialog;
|
private System.Windows.Forms.ColorDialog MovieInputColorDialog;
|
||||||
private System.Windows.Forms.Label MultitrackLabel;
|
private System.Windows.Forms.Label MultitrackLabel;
|
||||||
private System.Windows.Forms.RadioButton MultitrackRadio;
|
private System.Windows.Forms.RadioButton MultitrackRadio;
|
||||||
|
private System.Windows.Forms.CheckBox StackMessagesCheckbox;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -64,6 +64,7 @@ namespace BizHawk.MultiClient
|
||||||
MovieInputColorDialog.Color = Color.FromArgb(MovieInput);
|
MovieInputColorDialog.Color = Color.FromArgb(MovieInput);
|
||||||
SetColorBox();
|
SetColorBox();
|
||||||
SetPositionInfo();
|
SetPositionInfo();
|
||||||
|
StackMessagesCheckbox.Checked = Global.Config.StackOSDMessages;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetMaxXY()
|
private void SetMaxXY()
|
||||||
|
@ -209,6 +210,8 @@ namespace BizHawk.MultiClient
|
||||||
Global.Config.DispRecanchor = DispRecanchor;
|
Global.Config.DispRecanchor = DispRecanchor;
|
||||||
Global.Config.DispMultianchor = DispMultiAnchor;
|
Global.Config.DispMultianchor = DispMultiAnchor;
|
||||||
Global.Config.DispMessageanchor = DispMessageAnchor;
|
Global.Config.DispMessageanchor = DispMessageAnchor;
|
||||||
|
|
||||||
|
Global.Config.StackOSDMessages = StackMessagesCheckbox.Checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OK_Click(object sender, EventArgs e)
|
private void OK_Click(object sender, EventArgs e)
|
||||||
|
@ -443,6 +446,8 @@ namespace BizHawk.MultiClient
|
||||||
SetMaxXY();
|
SetMaxXY();
|
||||||
SetColorBox();
|
SetColorBox();
|
||||||
SetPositionInfo();
|
SetPositionInfo();
|
||||||
|
|
||||||
|
StackMessagesCheckbox.Checked = Global.Config.StackOSDMessages = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetAnchorValue(int value)
|
private void SetAnchorValue(int value)
|
||||||
|
|
Loading…
Reference in New Issue