Exemplo n.º 1
0
        private void OnItemDataBinding(object sender, VirtualizingTreeViewItemDataBindingArgs e)
        {
            Material material = (Material)e.Item;

            MaterialPaletteItem paletteItem = e.ItemPresenter.GetComponent <MaterialPaletteItem>();

            paletteItem.Material = material;

            int index = m_paletteManager.Palette.Materials.IndexOf(material);

            if (index > 10)
            {
                paletteItem.Text = "Apply";
            }
            else
            {
                paletteItem.Text = "Alt + " + (m_paletteManager.Palette.Materials.IndexOf(material) + 1) % 10;
            }
        }
        private void OnItemDataBinding(object sender, VirtualizingTreeViewItemDataBindingArgs e)
        {
            Material material = (Material)e.Item;

            MaterialPaletteItem paletteItem = e.ItemPresenter.GetComponent <MaterialPaletteItem>();

            paletteItem.Material = material;

            int index = m_paletteManager.Palette.Materials.IndexOf(material);

            if (index > 10)
            {
                paletteItem.Text = m_localization.GetString("ID_RTBuilder_MaterialPalette_Apply", "Apply");
            }
            else
            {
                paletteItem.Text = m_localization.GetString("ID_RTBuilder_MaterialPalette_Alt", "Alt + ") + (m_paletteManager.Palette.Materials.IndexOf(material) + 1) % 10;
            }
        }