コード例 #1
0
        private void listViewCustom1_DoubleClick(object sender, EventArgs e)
        {
            if (listViewCustom1.SelectedItems.Count > 0)
            {
                int SelectedFrame = KeyFrames[listViewCustom1.SelectedIndices[0]];

                string currentTex = listViewCustom1.SelectedItems[0].Text;

                Texture_Selector editor = new Texture_Selector();
                editor.LoadTexture(currentTex, activeSampleU != null);

                if (editor.ShowDialog() == DialogResult.OK)
                {
                    string NewTex = editor.GetSelectedTexture();

                    if (!ActiveMaterialAnim.Textures.Contains(NewTex))
                    {
                        ActiveMaterialAnim.Textures.Add(NewTex);
                    }

                    int index = ActiveMaterialAnim.Textures.IndexOf(NewTex);
                    if (activeSampleU != null)
                    {
                        activeSampleU.group.SetValue(SelectedFrame, index);
                    }
                    else
                    {
                        activeSampler.group.SetValue(SelectedFrame, index);
                    }

                    ActiveMaterialAnim.UpdateAnimationData();
                }
            }
        }
コード例 #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Texture_Selector editor = new Texture_Selector();

            editor.LoadTexture("", activeSampleU != null);

            if (editor.ShowDialog() == DialogResult.OK)
            {
                string NewTex = editor.GetSelectedTexture();

                if (ActiveMaterialAnim.Textures == null)
                {
                    ActiveMaterialAnim.Textures = new List <string>();
                }

                if (!ActiveMaterialAnim.Textures.Contains(NewTex))
                {
                    ActiveMaterialAnim.Textures.Add(NewTex);
                }

                if (activeSampler != null)
                {
                    activeSampler.AddKeyFrame(NewTex);
                }
                else
                {
                }
            }
        }
コード例 #3
0
        private void addKeyFrameToolstrip_Click(object sender, EventArgs e)
        {
            if (activeSampler != null)
            {
                bool IsWiiU = activeSampler is FTXP.BfresSamplerAnim;

                Texture_Selector editor = new Texture_Selector();
                editor.LoadTexture("", IsWiiU);
                if (editor.ShowDialog() == DialogResult.OK)
                {
                    string NewTex = editor.GetSelectedTexture();

                    if (ActiveMaterialAnim.Textures == null)
                    {
                        ActiveMaterialAnim.Textures = new List <string>();
                    }

                    if (!ActiveMaterialAnim.Textures.Contains(NewTex))
                    {
                        ActiveMaterialAnim.Textures.Add(NewTex);
                    }

                    if (activeSampler != null)
                    {
                        activeSampler.AddKeyFrame(NewTex);
                    }
                }
            }
        }
コード例 #4
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            Texture_Selector selector = new Texture_Selector();

            if (selector.ShowDialog() == DialogResult.OK)
            {
                textureNameTB.Text = selector.GetSelectedTexture();
            }
        }
コード例 #5
0
        private void textureRefListView_DoubleClick(object sender, EventArgs e)
        {
            if (textureRefListView.SelectedIndices.Count <= 0)
            {
                return;
            }

            int index            = textureRefListView.SelectedIndices[0];
            Texture_Selector tex = new Texture_Selector();

            tex.LoadTexture(textureRefListView.SelectedItems[0].Text, material.GetResFileU() != null);
            if (tex.ShowDialog() == DialogResult.OK)
            {
                material.TextureMaps[index].Name = tex.GetSelectedTexture();
                InitializeTextureListView(material);
                material.UpdateTextureMaps();
            }
        }