예제 #1
0
        public CharacterDlg(AdvCharacter chr, AdvData data)
        {
            InitializeComponent();
            this.stateFrameImage1.ClientSizeChanged += new EventHandler(stateFrameImage1_ClientSizeChanged);
            mCharacter = chr;
            updateCharacter();
            string[] labels = new string[36];
            labels[0] = "Stand front";
            labels[1] = "Stand back";
            labels[2] = "Stand right";
            labels[3] = "Walk front";
            labels[4] = "Walk back";
            labels[5] = "Walk right";
            labels[6] = "Talk, Stand front";
            labels[7] = "Talk, Stand back";
            labels[8] = "Talk, Stand right";
            labels[9] = "Talk, Walk front";
            labels[10] = "Talk, Walk back";
            labels[11] = "Talk, Walk right";
            labels[12] = "Bored 1";
            labels[13] = "Bored 2";
            labels[14] = "Pickup front";
            labels[15] = "Pickup right";
            for (int i = 16; i < 36; ++i)
            {
                labels[i] = chr.getStateName(i);
            }
            this.font.Items.Add("Default");
            for (int i = 0; i < data.Settings.Fonts.Count; ++i)
            {
                FontInfo fi = (FontInfo)data.Settings.Fonts[i];
                this.font.Items.Add(fi.name+ " ("+fi.size+")");
            }
            for (int i = 1; i < 10; ++i)
            {
                this.walkspeed.Items.Add(i);
            }
            this.stateFrameImage1.setStateLables(labels);
            this.stateFrameImage1.Data = chr;
            this.stateFrameImage1.BackgroundColor = data.Persistence.CharBackColor;

            this.text_color.BackColor = Color.FromArgb(Utilities.convertColor(chr.TextColor));
            this.font.SelectedIndex = chr.Font;
            this.walksound.Text = chr.Walksound;
            this.walkspeed.SelectedIndex = chr.WalkSpeed - 1;
            this.nozoom.Checked = chr.NoZoom;
            this.leftanim.Checked = chr.RealLeftAnimations;
            this.memory_resistant.Checked = chr.MemoryReistent;
            this.ghostmode.Checked = chr.Ghost;
            this.startzoom.Value = chr.Zoom;

            mData = data;
        }