-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCode.cs
More file actions
25 lines (22 loc) · 681 Bytes
/
Code.cs
File metadata and controls
25 lines (22 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using Raylib_cs;
public class Code
{
public static void ChangeWindowMode()
{
if (Raylib.IsWindowFullscreen())
{
Raylib.ToggleFullscreen();
Raylib.SetWindowSize((int)(Raylib.GetMonitorWidth(0) * 0.75f), (int)(Raylib.GetMonitorHeight(0) * 0.75f));
}
else
{
Raylib.SetWindowSize(Raylib.GetMonitorWidth(0), Raylib.GetMonitorHeight(0));
Raylib.ToggleFullscreen();
}
}
public static void CenterWindow()
{
Raylib.SetWindowPosition(Raylib.GetMonitorWidth(0) / 2 - Raylib.GetScreenWidth() / 2, Raylib.GetMonitorHeight(0) / 2 - Raylib.GetScreenHeight() / 2);
}
public static int FULLHD_WIDTH = 1920, FULLHDHEIGHT = 1080;
}