Exemplo n.º 1
0
        private void ParseMaterialHashTbText()
        {
            int hash = GuiTools.TryParseTBInt(param1TB, true);

            if (hash != -1 && propertiesListView.SelectedItems.Count > 0)
            {
                currentMaterialList[currentMatIndex].UpdateProperty(propertiesListView.SelectedItems[0].Text, BitConverter.ToSingle(BitConverter.GetBytes(hash), 0), 0);
            }
        }
Exemplo n.º 2
0
        private void zBufferTB_TextChanged(object sender, EventArgs e)
        {
            int value = GuiTools.TryParseTBInt(zBufferTB);

            if (value != -1)
            {
                currentMaterialList[currentMatIndex].ZBufferOffset = value;
            }
        }
Exemplo n.º 3
0
        private void refAlphaTB_TextChanged(object sender, EventArgs e)
        {
            int value = GuiTools.TryParseTBInt(refAlphaTB);

            if (value != -1)
            {
                currentMaterialList[currentMatIndex].RefAlpha = value;
            }
        }
Exemplo n.º 4
0
        private void dstTB_TextChanged(object sender, EventArgs e)
        {
            int value = GuiTools.TryParseTBInt(dstTB);

            if (value != -1)
            {
                currentMaterialList[currentMatIndex].DstFactor = value;
            }
        }
Exemplo n.º 5
0
        private void charTB_TextChanged(object sender, EventArgs e)
        {
            character = GuiTools.TryParseTBInt(charTB);
            var keyValue = characters.FirstOrDefault(x => x.Value == character);

            if (keyValue.Key != null)
            {
                characterComboBox.SelectedItem = keyValue.Key;
            }
        }
Exemplo n.º 6
0
        private void typeTB_TextChanged(object sender, EventArgs e)
        {
            type = GuiTools.TryParseTBInt(typeTB);
            var keyValue = types.FirstOrDefault(x => x.Value == type);

            if (keyValue.Key != null)
            {
                typeComboBox.SelectedItem = keyValue.Key;
            }
        }
Exemplo n.º 7
0
        private void textureIdTB_TextChanged(object sender, EventArgs e)
        {
            int value = GuiTools.TryParseTBInt(textureIdTB, true);

            if (value != -1 && texturesListView.SelectedIndices.Count > 0)
            {
                currentMaterialList[currentMatIndex].textures[texturesListView.SelectedIndices[0]].hash = value;
            }

            // Update the texture color channels.
            RenderTexture();
            RenderTexture(true);

            if (texturesListView.SelectedItems.Count > 0 && value != -1)
            {
                texturesListView.SelectedItems[0].ImageKey = value.ToString("X");
            }
        }