Example #1
0
        private void OpenEditor(ParamEntry entry, ListViewItem SelectedItem)
        {
            EditBox editor = new EditBox();

            editor.LoadEntry(entry);
            editor.ToggleNameEditing(true);

            if (editor.ShowDialog() == DialogResult.OK)
            {
                editor.SaveEntry();
                SetListItemParamObject(entry, SelectedItem);
            }
        }
Example #2
0
            private void OpenEditor(object sender, EventArgs e)
            {
                MessageBox.Show("Editing v2 AAMP not supported yet. Only v1", "", MessageBoxButtons.OK, MessageBoxIcon.Error);

                return;

                EditBox editor = new EditBox();

                editor.LoadEntry(entry);

                if (editor.ShowDialog() == DialogResult.OK)
                {
                    editor.SaveEntry();

                    switch (entry.ParamType)
                    {
                    case ParamType.Boolean:
                    case ParamType.Float:
                    case ParamType.Int:
                    case ParamType.Uint:
                    case ParamType.String64:
                    case ParamType.String32:
                    case ParamType.String256:
                    case ParamType.StringRef:
                        Text = $"{entry.HashString} {entry.Value}";
                        break;

                    case ParamType.Vector2F:
                        var vec2 = (Vector2F)entry.Value;
                        Text = $"{entry.HashString} {vec2.X} {vec2.Y}";
                        break;

                    case ParamType.Vector3F:
                        var vec3 = (Vector3F)entry.Value;
                        Text = $"{entry.HashString} {vec3.X} {vec3.Y} {vec3.Z}";
                        break;

                    case ParamType.Vector4F:
                        var vec4 = (Vector4F)entry.Value;
                        Text = $"{entry.HashString} {vec4.X} {vec4.Y} {vec4.Z} {vec4.W}";
                        break;

                    case ParamType.Color4F:
                        var col = (Vector4F)entry.Value;
                        Text = $"{entry.HashString} {col.X} {col.Y} {col.Z} {col.W}";
                        break;
                    }
                }
            }
Example #3
0
            private void OpenEditor(object sender, EventArgs e)
            {
                EditBox editor = new EditBox();

                editor.LoadEntry(entry);

                if (editor.ShowDialog() == DialogResult.OK)
                {
                    editor.SaveEntry();

                    switch (entry.ParamType)
                    {
                    case ParamType.Boolean:
                    case ParamType.Float:
                    case ParamType.Int:
                    case ParamType.Uint:
                    case ParamType.String64:
                    case ParamType.String32:
                    case ParamType.String256:
                    case ParamType.StringRef:
                        Text = $"{entry.HashString} {entry.Value}";
                        break;

                    case ParamType.Vector2F:
                        var vec2 = (Vector2F)entry.Value;
                        Text = $"{entry.HashString} {vec2.X} {vec2.Y}";
                        break;

                    case ParamType.Vector3F:
                        var vec3 = (Vector3F)entry.Value;
                        Text = $"{entry.HashString} {vec3.X} {vec3.Y} {vec3.Z}";
                        break;

                    case ParamType.Vector4F:
                        var vec4 = (Vector4F)entry.Value;
                        Text = $"{entry.HashString} {vec4.X} {vec4.Y} {vec4.Z} {vec4.W}";
                        break;

                    case ParamType.Color4F:
                        var col = (Vector4F)entry.Value;
                        Text = $"{entry.HashString} {col.X} {col.Y} {col.Z} {col.W}";
                        break;
                    }
                }
            }
Example #4
0
        private void OpenNewParamEditor(ParamEntry entry, ParamObject paramObject, ListViewItem SelectedItem)
        {
            EditBox editor = new EditBox();

            editor.LoadEntry(entry);
            editor.ToggleNameEditing(true);

            if (editor.ShowDialog() == DialogResult.OK)
            {
                editor.SaveEntry();
                SetListItemParamObject(entry, SelectedItem);
                listViewCustom1.Items.Add(SelectedItem);

                var entryList = new List <ParamEntry>();
                for (int i = 0; i < paramObject.paramEntries.Length; i++)
                {
                    entryList.Add(paramObject.paramEntries[i]);
                }

                entryList.Add(entry);
                paramObject.paramEntries = entryList.ToArray();
            }
        }