fix 아 집에 가고싶다
This commit is contained in:
@@ -110,7 +110,7 @@ namespace UVC.UI.Toolbar.Model
|
||||
/// </param>
|
||||
public override void ExecuteClick(object parameter = null)
|
||||
{
|
||||
if (!IsEnabled) return;
|
||||
//if (!IsEnabled) return;
|
||||
|
||||
// bool previousSelectionState = IsSelected; // 이전 선택 상태 (필요하다면)
|
||||
|
||||
|
||||
@@ -101,6 +101,8 @@ namespace UVC.UI.Toolbar.Model
|
||||
// (라디오 버튼은 일반적으로 한 번 선택되면 사용자가 직접 해제할 수 없고, 다른 버튼을 선택해야 해제됨)
|
||||
if (SelectedButton == buttonToSelect && buttonToSelect.IsSelected)
|
||||
{
|
||||
SelectedButton.IsSelected = false;
|
||||
SelectedButton = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@ namespace UVC.UI.Toolbar.View
|
||||
// UI Toggle의 상태가 사용자에 의해 변경될 때 호출될 리스너를 추가합니다.
|
||||
toggleComponent.onValueChanged.AddListener((isSelected) =>
|
||||
{
|
||||
radioModel.ExecuteClick(isSelected);
|
||||
// 라디오 버튼은 선택될 때(isSelected가 true일 때)만 동작을 수행합니다.
|
||||
// 해제될 때는 다른 라디오 버튼이 선택되면서 자동으로 해제되므로 별도 처리가 필요 없습니다.
|
||||
if (isSelected)
|
||||
@@ -155,7 +156,6 @@ namespace UVC.UI.Toolbar.View
|
||||
// 같은 그룹의 다른 라디오 버튼들은 IsSelected가 false로 설정됩니다.
|
||||
// 이후 관련 이벤트가 발생하여 UI가 동기화됩니다.
|
||||
// 파라미터 true는 '선택됨'을 명시적으로 나타낼 수 있으나, 모델 내부 로직에 따라 달라질 수 있습니다.
|
||||
radioModel.ExecuteClick(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ namespace UVC.UI.Toolbar.View
|
||||
//layoutGroup.FitToChildren(width: layoutGroup is VerticalLayoutGroup, height: true);
|
||||
}
|
||||
}
|
||||
|
||||
public ToolbarButtonBase SelectButton;
|
||||
/// <summary>
|
||||
/// 버튼 모델과 UI GameObject를 기반으로 공통적인 시각적 요소(텍스트, 아이콘, 활성화 상태)를 업데이트합니다.
|
||||
/// 이 메서드는 각 IButtonViewProcessor 구현체에서 호출됩니다.
|
||||
@@ -450,6 +450,7 @@ namespace UVC.UI.Toolbar.View
|
||||
{
|
||||
selectableComponent.interactable = model.IsEnabled;
|
||||
}
|
||||
SelectButton = model;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -9,6 +9,7 @@ using System.Linq;
|
||||
using OCTOPUS_TWIN.Constants;
|
||||
using ChunilENG.Management;
|
||||
using UnityEngine.SceneManagement;
|
||||
using System;
|
||||
|
||||
namespace ChunilENG.UI
|
||||
{
|
||||
@@ -89,6 +90,8 @@ namespace ChunilENG.UI
|
||||
return;
|
||||
}
|
||||
CommandManager.Instance.Execute(new ChangedCameraCommand(item.point));
|
||||
ChunilENGSceneMain.Instance.GetManager<ChunilENGUIManager>().GetCanvas<StaticCanvas>().GetPanel<BottomLeftToolbar>().HideItem();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ using UVC.UI.Toolbar.Model;
|
||||
using UVC.UI.Toolbar.View;
|
||||
using ChunilENG.UI.Command;
|
||||
using ChunilENG.Management;
|
||||
using System;
|
||||
|
||||
namespace ChunilENG.UI
|
||||
{
|
||||
@@ -60,9 +61,16 @@ namespace ChunilENG.UI
|
||||
},
|
||||
new ActionCommand(() => { Debug.Log("카메라 위치 전환 패널 활성화/비활성화 버튼 클릭"); }),
|
||||
"카메라 위치 조절 UI를 활성화/비활성화 합니다.");
|
||||
|
||||
view.Initialize(toolbarModel);
|
||||
}
|
||||
|
||||
public void HideItem()
|
||||
{
|
||||
if(view.SelectButton!=null)
|
||||
{
|
||||
view.SelectButton.ExecuteClick();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user