-
Notifications
You must be signed in to change notification settings - Fork 569
Creating a GUI: Calculating the screen size
Backup-eric645 edited this page May 4, 2020
·
3 revisions
Calculating the screen size is quite difficult, for there are no Height
and Width
properties on the canvas. We'll have to go through the mode instead.
using CGS = Cosmos.System.Graphics;
namespace Cosmos.System
{
public static class DisplaySizeManager
{
public int Height
{
get
{
return Canvas.Mode.Rows;
}
}
public int Height
{
get
{
return Canvas.Mode.Columns;
}
}
}
}