コード例 #1
0
    public void ConfigureItem(bool disabled, DisplayOptionInfo display_info)
    {
        KImage kImage = selectedItem;
        HierarchyReferences component = kImage.GetComponent <HierarchyReferences>();
        KImage kImage2 = component.GetReference("BG") as KImage;

        if (display_info.bgOptions == null)
        {
            kImage2.gameObject.SetActive(false);
        }
        else
        {
            kImage2.sprite = display_info.bgOptions[display_info.bgIndex];
        }
        KImage kImage3 = component.GetReference("FG") as KImage;

        if (display_info.fgOptions == null)
        {
            kImage3.gameObject.SetActive(false);
        }
        else
        {
            kImage3.sprite = display_info.fgOptions[display_info.fgIndex];
        }
        KImage kImage4 = component.GetReference("Fill") as KImage;

        if ((UnityEngine.Object)kImage4 != (UnityEngine.Object)null)
        {
            kImage4.enabled = !disabled;
            kImage4.color   = display_info.fillColour;
        }
        KImage kImage5 = component.GetReference("Outline") as KImage;

        if ((UnityEngine.Object)kImage5 != (UnityEngine.Object)null)
        {
            kImage5.enabled = !disabled;
        }
    }
コード例 #2
0
    private void Start()
    {
        KButton component = selectedItem.GetComponent <KButton>();

        component.onBtnClick += OnClick;
    }
コード例 #3
0
 private void OnSettingsButtonClicked()
 {
     optionsPanel.gameObject.SetActive(true);
     optionsPanel.GetComponent <Selectable>().Select();
 }