Fullscreen mode dropdown
This commit is contained in:
parent
c7c2d51262
commit
081f9ff086
File diff suppressed because it is too large
Load Diff
@ -541,6 +541,14 @@ PrefabInstance:
|
||||
propertyPath: eventSystem
|
||||
value:
|
||||
objectReference: {fileID: 775644865}
|
||||
- target: {fileID: 2702070852302166608, guid: 7671830e57aa4bd4cab63b8399c6f825, type: 3}
|
||||
propertyPath: m_text
|
||||
value: Windowed
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3281526541317417273, guid: 7671830e57aa4bd4cab63b8399c6f825, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4394421820928219480, guid: 7671830e57aa4bd4cab63b8399c6f825, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: MainMenu
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using NaughtyAttributes;
|
||||
using TMPro;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
public class MainMenuManager : MonoBehaviour {
|
||||
@ -15,17 +17,27 @@ public class MainMenuManager : MonoBehaviour {
|
||||
|
||||
[SerializeField] [Required]
|
||||
TMP_Text titleLabel;
|
||||
|
||||
[SerializeField] string[] titleOptions;
|
||||
|
||||
[SerializeField] [Required]
|
||||
Transform startMenuParent;
|
||||
|
||||
[SerializeField] [Required]
|
||||
Transform pauseParent;
|
||||
|
||||
[SerializeField] [Required]
|
||||
Transform optionsParent;
|
||||
|
||||
[SerializeField] [Required]
|
||||
GameTimer gameTimer;
|
||||
|
||||
[SerializeField] [Required]
|
||||
EventSystem eventSystem;
|
||||
|
||||
[SerializeField] [Required]
|
||||
TMP_Dropdown displayModeDropdown;
|
||||
|
||||
MenuMode mode;
|
||||
MenuMode? preOptionsMode;
|
||||
|
||||
@ -83,4 +95,13 @@ public class MainMenuManager : MonoBehaviour {
|
||||
public void QuitGame() => Application.Quit(0);
|
||||
|
||||
public void ResetHighScore() => gameTimer.ResetHighScore();
|
||||
|
||||
public void DisplayModeChange() {
|
||||
Screen.fullScreenMode = displayModeDropdown.value switch {
|
||||
0 => FullScreenMode.Windowed,
|
||||
1 => FullScreenMode.ExclusiveFullScreen,
|
||||
2 => FullScreenMode.FullScreenWindow,
|
||||
_ => Screen.fullScreenMode
|
||||
};
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user