example of how to store default message positions so it can be used by default config and reset process too

This commit is contained in:
zeromus 2015-07-08 16:58:17 -05:00
parent 53c415a843
commit 83b2f70283
2 changed files with 10 additions and 4 deletions

View File

@ -172,14 +172,20 @@ namespace BizHawk.Client.Common
/// <summary>use vsync. if VSyncThrottle = false, this will try to use vsync without throttling to it</summary>
public bool VSync = false;
public static class DefaultMessageOptions
{
public const int DispFPSx = 99;
public const int DispFPSy = 99;
}
// Display options
public int MessagesColor = -1;
public int AlertMessageColor = -65536;
public int LastInputColor = -23296;
public int MovieInput = -8355712;
public bool DisplayFPS = false;
public int DispFPSx = 0;
public int DispFPSy = 0;
public int DispFPSx = DefaultMessageOptions.DispFPSx;
public int DispFPSy = DefaultMessageOptions.DispFPSy;
public int DispFPSanchor = 0; // 0 = UL, 1 = UR, 2 = DL, 3 = DR
public bool DisplayFrameCounter = false;
public int DispFrameCx = 0;

View File

@ -401,8 +401,8 @@ namespace BizHawk.Client.EmuHawk
private void ResetDefaultsButton_Click(object sender, EventArgs e)
{
Global.Config.DispFPSx = 0;
Global.Config.DispFPSy = 0;
Global.Config.DispFPSx = Config.DefaultMessageOptions.DispFPSx;
Global.Config.DispFPSy = Config.DefaultMessageOptions.DispFPSy;
Global.Config.DispFrameCx = 0;
Global.Config.DispFrameCy = 12;
Global.Config.DispLagx = 0;