diff --git a/Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs b/Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs new file mode 100644 index 00000000..d4e3e785 --- /dev/null +++ b/Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs @@ -0,0 +1,53 @@ +using UnityEngine; +using System; +using System.Collections; + +namespace Fungus +{ + [CommandInfo("Camera", + "Fullscreen", + "Sets the application to fullscreen, windowed or toggles the current state.")] + [AddComponentMenu("")] + public class Fullscreen : Command + { + public enum FullscreenMode + { + Toggle, + Fullscreen, + Windowed + } + + public FullscreenMode fullscreenMode; + + public override void OnEnter() + { + switch (fullscreenMode) + { + case FullscreenMode.Toggle: + Screen.fullScreen = !Screen.fullScreen; + break; + case FullscreenMode.Fullscreen: + Screen.fullScreen = true; + break; + case FullscreenMode.Windowed: + Screen.fullScreen = false; + break; + } + + Debug.Log("Fullscreen:" + fullscreenMode); + + Continue(); + } + + public override string GetSummary() + { + return fullscreenMode.ToString(); + } + + public override Color GetButtonColor() + { + return new Color32(216, 228, 170, 255); + } + } + +} \ No newline at end of file diff --git a/Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs.meta b/Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs.meta new file mode 100644 index 00000000..5f3e862b --- /dev/null +++ b/Assets/Fungus/Camera/Scripts/Commands/Fullscreen.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 083836d4b33584c1aaf7d1eb57b02ba0 +timeCreated: 1434460163 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: