一些修复和优化
This commit is contained in:
@@ -6516,6 +6516,7 @@ MonoBehaviour:
|
||||
notice_display: {fileID: 920723299105391293}
|
||||
market_launch: {fileID: 5379967691629323644}
|
||||
button_userBag: {fileID: 7063352251955770202}
|
||||
enableGuideDisplay: 0
|
||||
userGuideButton: {fileID: 6945238783669072533}
|
||||
guideDisplayImage: {fileID: 2438452334951697137}
|
||||
preIMGb: {fileID: 7091982211545804283}
|
||||
|
||||
@@ -14,6 +14,8 @@ using GameServer.Client;
|
||||
|
||||
public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
{
|
||||
private const string MusicLockedMessage = "暂无可选择的音乐";
|
||||
|
||||
public static event System.Action<bool> GlobalSettingsVisibilityChanged;
|
||||
public static event System.Action<bool> GlobalOverlayPanelVisibilityChanged;
|
||||
public static bool CurrentSettingsVisible { get; private set; }
|
||||
@@ -47,6 +49,8 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
public Button button_userBag;
|
||||
|
||||
[Header("User Guide")]
|
||||
[Tooltip("是否启用指引 sprite 展示。true:点击指引按钮时按场景展示 guideMappings 的 sprite;false:点击无反应,不展示任何指引。")]
|
||||
[SerializeField] private bool enableGuideDisplay = true;
|
||||
[SerializeField] private Button userGuideButton;
|
||||
[SerializeField] private Image guideDisplayImage;
|
||||
[SerializeField] private Button preIMGb;
|
||||
@@ -227,7 +231,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
EnsureMusicPicRoot();
|
||||
SetupMusicPicDefault();
|
||||
if (button_Music != null)
|
||||
button_Music.onClick.AddListener(ToggleMusicPicLocal);
|
||||
button_Music.onClick.AddListener(HandleMusicButtonLockedClick);
|
||||
|
||||
UpdateSteamUserInfo();
|
||||
InitializeMailRedPot();
|
||||
@@ -473,6 +477,11 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
SetMusicPicVisible(!musicPicVisible, false);
|
||||
}
|
||||
|
||||
private void HandleMusicButtonLockedClick()
|
||||
{
|
||||
gNotice.error.display(MusicLockedMessage);
|
||||
}
|
||||
|
||||
private void SetMusicPicVisible(bool visible, bool instant)
|
||||
{
|
||||
if (musicPicRoot == null)
|
||||
@@ -578,7 +587,7 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
closeGuideButton.onClick.RemoveListener(CloseGuideDisplay);
|
||||
|
||||
if (button_Music != null)
|
||||
button_Music.onClick.RemoveListener(ToggleMusicPicLocal);
|
||||
button_Music.onClick.RemoveListener(HandleMusicButtonLockedClick);
|
||||
|
||||
if (back_navButton != null && navBackAction != null)
|
||||
back_navButton.onClick.RemoveListener(navBackAction);
|
||||
@@ -842,6 +851,16 @@ public class btmandtopController : MonoBehaviour, ICancelHandler
|
||||
|
||||
private void ToggleGuideDisplay()
|
||||
{
|
||||
// 关闭指引展示时点击无反应;若指引已在显示中则允许关闭,避免残留面板卡住。
|
||||
if (!enableGuideDisplay)
|
||||
{
|
||||
if (guideDisplayImage != null && guideDisplayImage.gameObject.activeSelf)
|
||||
{
|
||||
CloseGuideDisplay();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (guideDisplayImage == null)
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user