-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
77 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using TMPro; | ||
|
||
namespace SEE.Controls | ||
{ | ||
/// <summary> | ||
/// Handles the actions in the | ||
/// settings canvas. | ||
/// </summary> | ||
public class SettingsMenue : MonoBehaviour | ||
{ | ||
/// <summary> | ||
/// The text box, which will display the text. | ||
/// </summary> | ||
public TMP_Text keybindingsText; | ||
|
||
/// <summary> | ||
/// The settings panel which will be toggled. | ||
/// </summary> | ||
public GameObject settingsPanel; | ||
|
||
/// <summary> | ||
/// The keybindings panel which will be toggled. | ||
/// </summary> | ||
public GameObject keybindingsPanel; | ||
|
||
/// <summary> | ||
/// Start is called before the first frame update. | ||
/// Sets the text of the textbox. | ||
/// </summary> | ||
void Start() | ||
{ | ||
keybindingsText.text = KeyBindings.ShowBindings(); | ||
} | ||
|
||
/// <summary> | ||
/// Update is called once per frame. | ||
/// Activates the settings panel with the esc button. | ||
/// </summary> | ||
void Update() | ||
{ | ||
if (keybindingsPanel.activeSelf == true && settingsPanel.activeSelf == false && SEEInput.ToggleSettings()) | ||
{ | ||
keybindingsPanel.SetActive(false); | ||
} | ||
else if (SEEInput.ToggleSettings()) | ||
{ | ||
settingsPanel.SetActive(!settingsPanel.activeSelf); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// When this method is called, the application will be terminated. | ||
/// </summary> | ||
public void ExitGame() | ||
{ | ||
#if UNITY_EDITOR | ||
UnityEditor.EditorApplication.isPlaying = false; | ||
#else | ||
Application.Quit(); | ||
#endif | ||
} | ||
} | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters