示例#1
0
    /// <summary>
    /// Fit the window to specified monitor
    /// </summary>
    /// <param name="monitorIndex"></param>
    /// <returns></returns>
    public bool FitToMonitor(int monitorIndex)
    {
        float x, y, width, height;

        if (LibUniWinC.GetMonitorRectangle(monitorIndex, out x, out y, out width, out height))
        {
            LibUniWinC.SetPosition(x, y);
            LibUniWinC.SetSize(width, height);
            return(true);
        }
        return(false);
    }
示例#2
0
 /// <summary>
 /// Set the window Size.
 /// </summary>
 /// <param name="size">Size.</param>
 public void SetWindowSize(Vector2 size)
 {
     LibUniWinC.SetSize(size.x, size.y);
 }