Update Setting
This commit is contained in:
@@ -127,6 +127,10 @@ namespace Hallucinate.UI
|
||||
public void SetMouseSensitivity(float sensitivity)
|
||||
{
|
||||
PlayerPrefs.SetFloat("MouseSensitivity", sensitivity);
|
||||
if (OnlyScove.Scripts.SettingsManager.Instance != null)
|
||||
{
|
||||
OnlyScove.Scripts.SettingsManager.Instance.SetSensitivity(sensitivity);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnGameStarted()
|
||||
@@ -161,6 +165,15 @@ namespace Hallucinate.UI
|
||||
if (globalStyleSheet != null)
|
||||
_rootElement.panel.visualTree.styleSheets.Add(globalStyleSheet);
|
||||
|
||||
var dimOverlay = new VisualElement { name = "BackgroundDimOverlay" };
|
||||
dimOverlay.style.position = Position.Absolute;
|
||||
dimOverlay.style.width = Length.Percent(100);
|
||||
dimOverlay.style.height = Length.Percent(100);
|
||||
dimOverlay.pickingMode = PickingMode.Ignore;
|
||||
float savedDim = PlayerPrefs.GetFloat("BackgroundDim", 50f);
|
||||
dimOverlay.style.backgroundColor = new Color(0, 0, 0, savedDim / 100f);
|
||||
_rootElement.Add(dimOverlay);
|
||||
|
||||
_cursorLayer = new VisualElement { name = "CursorLayer" };
|
||||
_cursorLayer.style.position = Position.Absolute;
|
||||
_cursorLayer.style.width = Length.Percent(100);
|
||||
|
||||
Reference in New Issue
Block a user