using UnityEngine; using UnityEngine.UI; using UVC.UI.Toolbar.Model; using UVC.UI.ToolBar.View; namespace UVC.UI.Toolbar.View { public class ToolbarExpandableButtonViewProcessor : IButtonViewProcessor { public GameObject CreateButtonUI(ToolbarButtonBase buttonModel, Transform parentContainer, ToolbarView viewContext) { if (viewContext.expandableButtonPrefab == null) { Debug.LogError("ExpandableButtonViewProcessor: expandableButtonPrefab이 ToolbarView에 할당되지 않았습니다.", viewContext); return null; } return Object.Instantiate(viewContext.expandableButtonPrefab, parentContainer); } public void SetupButtonInteractions(ToolbarButtonBase buttonModel, GameObject buttonUIObject, ToolbarView viewContext) { ToolbarExpandableButton expandableModel = buttonModel as ToolbarExpandableButton; if (expandableModel == null) return; Button uiButton = buttonUIObject.GetComponent