forked from YARC-Official/YARG
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some quick UI-related code cleanups (YARC-Official#381)
* Reformat ToastManager and put it inside a namespace * Use display name instead of layout name when toasting device changes * Move DevWatermark into a namespace and remove unused using directives * Clean up FpsCounter Move it into YARG.UI Serialize color values and update rate instead of hard-coding them Remove UpdateSettings, as it just calls SetVisible which is public anyways Other general cleanups * Remove DevWatermark disabled logging Not really informative of anything
- Loading branch information
1 parent
a0ec127
commit 1a69913
Showing
7 changed files
with
271 additions
and
277 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
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 |
---|---|---|
@@ -1,27 +1,22 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using TMPro; | ||
using UnityEngine; | ||
using YARG; | ||
using Debug = UnityEngine.Debug; | ||
|
||
public class DevWatermark : MonoBehaviour { | ||
namespace YARG.UI { | ||
public class DevWatermark : MonoBehaviour { | ||
[SerializeField] | ||
private TextMeshProUGUI watermarkText; | ||
|
||
[SerializeField] | ||
private TextMeshProUGUI watermarkText; | ||
void Start() { | ||
// check if Constants.VERSION_TAG ends with "b" | ||
if (Constants.VERSION_TAG.beta) { | ||
watermarkText.text = $"<b>YARG {Constants.VERSION_TAG}</b> Developer Build"; | ||
watermarkText.gameObject.SetActive(true); | ||
} else { | ||
this.gameObject.SetActive(false); | ||
} | ||
|
||
// Start is called before the first frame update | ||
void Start() { | ||
// check if Constants.VERSION_TAG ends with "b" | ||
if (Constants.VERSION_TAG.beta) { | ||
watermarkText.text = $"<b>YARG {Constants.VERSION_TAG}</b> Developer Build"; | ||
watermarkText.gameObject.SetActive(true); | ||
} else { | ||
this.gameObject.SetActive(false); | ||
// disable script | ||
this.enabled = false; | ||
} | ||
|
||
// disable script | ||
this.enabled = false; | ||
Debug.Log("DevWatermark script disabled"); | ||
} | ||
} |
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
Oops, something went wrong.