PPT加载锁定
This commit is contained in:
parent
0b30c44306
commit
01f277c747
|
|
@ -24,6 +24,8 @@ public class UI_PPTForPracticePanel : BasePanel
|
||||||
|
|
||||||
public UI_SelectDevicePanel UI_SelectDevice;
|
public UI_SelectDevicePanel UI_SelectDevice;
|
||||||
|
|
||||||
|
protected bool isPPTLoading = false;
|
||||||
|
|
||||||
protected override void Awake()
|
protected override void Awake()
|
||||||
{
|
{
|
||||||
canvasGroup.alpha = 1f;
|
canvasGroup.alpha = 1f;
|
||||||
|
|
@ -136,7 +138,9 @@ public class UI_PPTForPracticePanel : BasePanel
|
||||||
}
|
}
|
||||||
protected override void OnChangeToggle(string togglePath, bool isOn)
|
protected override void OnChangeToggle(string togglePath, bool isOn)
|
||||||
{
|
{
|
||||||
|
|
||||||
base.OnChangeToggle(togglePath, isOn);
|
base.OnChangeToggle(togglePath, isOn);
|
||||||
|
if (isPPTLoading) return;//PPT正在加载中,不处理其他切换
|
||||||
switch (togglePath)
|
switch (togglePath)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
|
@ -146,6 +150,7 @@ public class UI_PPTForPracticePanel : BasePanel
|
||||||
{
|
{
|
||||||
DestroyImmediate(child.gameObject);
|
DestroyImmediate(child.gameObject);
|
||||||
}
|
}
|
||||||
|
isPPTLoading = true;
|
||||||
// Æô¶¯Ð³ÌÒì²½¼ÓÔØPPT
|
// Æô¶¯Ð³ÌÒì²½¼ÓÔØPPT
|
||||||
StartCoroutine(LoadPPTAsync(togglePath, textures =>
|
StartCoroutine(LoadPPTAsync(togglePath, textures =>
|
||||||
{
|
{
|
||||||
|
|
@ -181,6 +186,7 @@ public class UI_PPTForPracticePanel : BasePanel
|
||||||
image.texture = texture;
|
image.texture = texture;
|
||||||
image.rectTransform.sizeDelta = new Vector2(1608, 940);
|
image.rectTransform.sizeDelta = new Vector2(1608, 940);
|
||||||
}
|
}
|
||||||
|
isPPTLoading = false;//完成加载
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DisplaySinglePage(Texture2D texture)
|
private void DisplaySinglePage(Texture2D texture)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue