[정영민] 아이콘 활성화/비활성화 기능 추가
26.02.09 - 아이콘 활성화/비활성화 기능 추가
This commit is contained in:
@@ -230,11 +230,11 @@ namespace OCTOPUS_TWIN
|
||||
currentAzimuth += input.mouseX * rotateSpeed;
|
||||
currentAzimuth %= 360;
|
||||
|
||||
if(viewMode == ViewMode.PerspectiveView)
|
||||
{
|
||||
currentElevation -= input.mouseY * rotateSpeed;
|
||||
currentElevation = Mathf.Clamp(currentElevation, minElevation, maxElevation);
|
||||
}
|
||||
//if(viewMode == ViewMode.PerspectiveView)
|
||||
//{
|
||||
// currentElevation -= input.mouseY * rotateSpeed;
|
||||
// currentElevation = Mathf.Clamp(currentElevation, minElevation, maxElevation);
|
||||
//}
|
||||
isRotateOperation = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
using ChunilENG.Management;
|
||||
using UnityEngine;
|
||||
using UVC.UI.Commands;
|
||||
|
||||
namespace ChunilENG.UI.Command
|
||||
{
|
||||
public class ActiveFloorControlPanelCommand : ICommand
|
||||
{
|
||||
private bool isActive;
|
||||
|
||||
public void Execute(object? parameter = null)
|
||||
{
|
||||
var uiManager = ChunilENGSceneMain.Instance.GetManager<ChunilENGUIManager>();
|
||||
|
||||
if (!isActive)
|
||||
{
|
||||
uiManager.GetCanvas<PopupCanvas>().GetPanel<FloorControlPanel>().Open();
|
||||
isActive = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
uiManager.GetCanvas<PopupCanvas>().GetPanel<FloorControlPanel>().Close();
|
||||
isActive = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 354196db0cc909b49b89c97f06bb1528
|
||||
@@ -1,20 +0,0 @@
|
||||
using ChunilENG;
|
||||
using ChunilENG.Management;
|
||||
using ChunilENG.UI;
|
||||
using UnityEngine;
|
||||
using UVC.UI.Commands;
|
||||
|
||||
namespace ChunilENG.UI.Command
|
||||
{
|
||||
public class ActiveMachineInfoItemCommand : ICommand
|
||||
{
|
||||
private bool isActive = true;
|
||||
public void Execute(object? parameter = null)
|
||||
{
|
||||
var itemManager = ChunilENGSceneMain.Instance.GetManager<MachineInfoItemManager>();
|
||||
isActive = !isActive;
|
||||
itemManager.ActiveIcons(isActive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc27e9cd507dea347ade0e5e30c38bde
|
||||
@@ -26,7 +26,7 @@ namespace ChunilENG.Management
|
||||
public Action<Machine> onClickKPIToMachine;
|
||||
|
||||
public float defaultNameHeight = 2f;
|
||||
|
||||
private bool activeIconEnable = true;
|
||||
[Header("Scale Settings")]
|
||||
[Range(0.1f, 1.5f)] public float minScale;
|
||||
[Range(0.5f, 3f)] public float maxScale;
|
||||
@@ -93,6 +93,7 @@ namespace ChunilENG.Management
|
||||
}
|
||||
void MachineIconsActive(Machine machine)
|
||||
{
|
||||
if (!activeIconEnable) return;
|
||||
if(machine == null) return;
|
||||
var currentFloor = ChunilENGSceneMain.Instance.building.GetCurFloor();
|
||||
var machineInFloor = machine.GetComponentInParent<Floor>();
|
||||
@@ -151,7 +152,8 @@ namespace ChunilENG.Management
|
||||
}
|
||||
public void ActiveIcons(bool isActive)
|
||||
{
|
||||
foreach(var icon in itemToMachines.Keys)
|
||||
activeIconEnable = isActive;
|
||||
foreach (var icon in itemToMachines.Keys)
|
||||
{
|
||||
icon.gameObject.SetActive(isActive);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using ChunilENG.UI.Command;
|
||||
using ChunilENG.Management;
|
||||
using ChunilENG.UI.Command;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using OCTOPUS_TWIN;
|
||||
using OCTOPUS_TWIN.Command;
|
||||
@@ -99,8 +100,12 @@ namespace ChunilENG.UI
|
||||
toolbarModel.AddToggleButton("button_wall_control", false,
|
||||
"Prefabs/UI/Toolbar/images/IMG_WallControl_on",
|
||||
"Prefabs/UI/Toolbar/images/IMG_WallControl_off",
|
||||
(isSelected) => Debug.Log($"내/외벽 조절 UI 활성화 상태 : {(isSelected ? "활성화" : "비활성화")} (OnToggle 콜백)"),
|
||||
new ActiveMachineInfoItemCommand(),
|
||||
(isSelected) =>
|
||||
{
|
||||
var itemManager = ChunilENGSceneMain.Instance.GetManager<MachineInfoItemManager>();
|
||||
itemManager.ActiveIcons(!isSelected);
|
||||
},
|
||||
new ActiveWallControlPanelCommand(),
|
||||
"내/외벽 조절 UI를 활성화/비활성화 합니다.");
|
||||
|
||||
// 라이브러리
|
||||
|
||||
Reference in New Issue
Block a user