示例#1
0
 public static void SetAspectRatio(int width, int height, params FBScreen.Layout[] layoutParams)
 {
     FBScreen.SetAspectRatio(width, height, layoutParams);
 }
示例#2
0
 public static void SetResolution(int width, int height, bool fullscreen, int preferredRefreshRate = 0, params FBScreen.Layout[] layoutParams)
 {
     FBScreen.SetResolution(width, height, fullscreen, preferredRefreshRate, layoutParams);
 }
示例#3
0
 public static void SetResolution(int width, int height, bool fullscreen, int preferredRefreshRate = 0)
 {
     FBScreen.SetResolution(width, height, fullscreen, preferredRefreshRate);
 }
示例#4
0
 public static void SetAspectRatio(int width, int height)
 {
     FBScreen.SetAspectRatio(width, height);
 }
    public void CallCanvasSetResolution()
    {
        int width;

        if (!Int32.TryParse(Width, out width))
        {
            width = 800;
        }
        int height;

        if (!Int32.TryParse(Height, out height))
        {
            height = 600;
        }
        float top;

        if (!float.TryParse(Top, out top))
        {
            top = 0.0f;
        }
        float left;

        if (!float.TryParse(Left, out left))
        {
            left = 0.0f;
        }
        if (CenterHorizontal && CenterVertical)
        {
            FB.Canvas.SetResolution(width, height, false, 0, FBScreen.CenterVertical(), FBScreen.CenterHorizontal());
        }
        else if (CenterHorizontal)
        {
            FB.Canvas.SetResolution(width, height, false, 0, FBScreen.Top(top), FBScreen.CenterHorizontal());
        }
        else if (CenterVertical)
        {
            FB.Canvas.SetResolution(width, height, false, 0, FBScreen.CenterVertical(), FBScreen.Left(left));
        }
        else
        {
            FB.Canvas.SetResolution(width, height, false, 0, FBScreen.Top(top), FBScreen.Left(left));
        }
    }