readded fullscreen hotkeys
This commit is contained in:
26
src/main.cs
Normal file
26
src/main.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class main : Node2D
|
||||
{
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (Input.IsActionJustPressed("hotkey_fullscreen"))
|
||||
{
|
||||
if (DisplayServer.WindowGetMode() == DisplayServer.WindowMode.Fullscreen)
|
||||
{
|
||||
DisplayServer.WindowSetMode(DisplayServer.WindowMode.Windowed);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisplayServer.WindowSetMode(DisplayServer.WindowMode.Fullscreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user