Background image screenshotting, language setting

This commit is contained in:
katboi01
2023-03-03 18:22:41 +01:00
parent 27dda57bf5
commit 7a2225f276
5 changed files with 1523 additions and 199 deletions
+1505 -192
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -19,7 +19,7 @@ public class Screenshot : MonoBehaviour
public static void TakeScreenshot()
{
var camera = UmaViewerBuilder.Instance.AnimationCamera.gameObject.activeInHierarchy ? UmaViewerBuilder.Instance.AnimationCamera : Camera.main;
var camera = UmaViewerBuilder.Instance.AnimationCamera.GetComponent<Camera>().enabled ? UmaViewerBuilder.Instance.AnimationCamera : Camera.main;
int width = int.Parse(UmaViewerUI.Instance.SSWidth.text);
int height = int.Parse(UmaViewerUI.Instance.SSHeight.text);
width = width == -1 ? Screen.width : width;
@@ -46,7 +46,7 @@ public class Screenshot : MonoBehaviour
private IEnumerator RecordGif(int width, int height, bool transparent, int quality)
{
var camera = UmaViewerBuilder.Instance.AnimationCamera.gameObject.activeInHierarchy ? UmaViewerBuilder.Instance.AnimationCamera : Camera.main;
var camera = UmaViewerBuilder.Instance.AnimationCamera.GetComponent<Camera>().enabled ? UmaViewerBuilder.Instance.AnimationCamera : Camera.main;
var ppLayer = camera.GetComponent<PostProcessLayer>();
bool oldPpState = ppLayer.enabled;
ppLayer.enabled = false;
+14 -3
View File
@@ -77,7 +77,7 @@ public class UmaViewerUI : MonoBehaviour
[Header("backgrounds")]
public ScrollRect BackGroundList;
public PageManager BackGroundPageCtrl;
public GameObject BackGroundCameraObj;
public GameObject BG_Canvas;
public GameObject BG_HSVPickerObj;
public Image BG_Image;
@@ -107,6 +107,7 @@ public class UmaViewerUI : MonoBehaviour
public Button VMDButton;
public Button UpdateDBButton;
public TMP_Dropdown WorkModeDropdown;
public TMP_Dropdown LanguageDropdown;
public List<GameObject> TogglablePanels = new List<GameObject>();
public List<GameObject> TogglableFacials = new List<GameObject>();
@@ -144,6 +145,7 @@ public class UmaViewerUI : MonoBehaviour
private void Start()
{
WorkModeDropdown.SetValueWithoutNotify((int)Config.Instance.WorkMode);
LanguageDropdown.SetValueWithoutNotify((int)Config.Instance.Language);
UpdateDBButton.interactable = (Config.Instance.WorkMode == WorkMode.Standalone);
}
@@ -963,7 +965,7 @@ public class UmaViewerUI : MonoBehaviour
Camera.main.clearFlags = CameraClearFlags.SolidColor;
break;
case 2:
Camera.main.clearFlags = CameraClearFlags.Depth;
Camera.main.clearFlags = CameraClearFlags.SolidColor;
ListBackgrounds();
break;
default:
@@ -971,8 +973,8 @@ public class UmaViewerUI : MonoBehaviour
break;
}
BackGroundCameraObj.SetActive(index == 2);
BG_HSVPickerObj.SetActive(index != 2);
BG_Canvas.SetActive(index == 2);
BackGroundPageCtrl.transform.parent.gameObject.SetActive(index == 2);
}
@@ -1215,6 +1217,15 @@ public class UmaViewerUI : MonoBehaviour
StartCoroutine(UpdateResVerCoroutine);
}
public void ChangeLanguage(int lang)
{
if ((int)Config.Instance.Language != lang)
{
Config.Instance.Language = (Language)lang;
Config.Instance.UpdateConfig();
}
}
public void ChangeWorkMode(int mode)
{
if ((int)Config.Instance.WorkMode != mode)
+1 -1
View File
@@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 2.1.6
bundleVersion: 2.1.7
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
+1 -1
View File
@@ -28,7 +28,7 @@ TagManager:
- O
- P
- Q
-
- Background
-
-
-