Окно здания: строка «Цена» обновляется вместе с кнопкой; тестовые кнопки 3D-сцены не рисуются поверх окон

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alexander
2026-11-05 17:27:58 +01:00
co-authored by Claude Opus 5.5
parent d7348dd23d
commit 4fe2dced76
2 changed files with 29 additions and 2 deletions
+14
View File
@@ -931,6 +931,19 @@ public class City3DController : MonoBehaviour, City3DSave.ILive
return label;
}
// Открыто модальное окно UIKit (окно здания, отчёт, подтверждение) -- проверка раз в кадр
int modalCheckedFrame = -1;
bool modalOpen;
bool ModalOpen()
{
if (modalCheckedFrame != Time.frameCount)
{
modalCheckedFrame = Time.frameCount;
modalOpen = GameObject.Find("Modal") != null;
}
return modalOpen;
}
bool OverGui(Vector3 screen)
{
var p = new Vector2(screen.x / guiScale, (Screen.height - screen.y) / guiScale);
@@ -967,6 +980,7 @@ public class City3DController : MonoBehaviour, City3DSave.ILive
// Окно HUD открыто -- временные кнопки сцены не показываем (и не ловим нажатия)
if (UIPanelManager.Instance != null && UIPanelManager.Instance.CurrentId != "") return;
if (ModalOpen()) return; // и окно здания / сообщение (UIKit.Modal): тестовые кнопки сцены не рисуются поверх него (05.11)
// Под верхней панелью HUD, справа: Ратуша −/+ -- только в редакторе и отладочной сборке (тест зон), редактирование
if (Application.isEditor || Debug.isDebugBuild)