예제 #1
0
        public LifeInstanceEditor(LifeInstance item)
        {
            InitializeComponent();
            this.item             = item;
            infoEnable.Tag        = infoBox;
            limitedNameEnable.Tag = limitedNameBox;
            mobTimeEnable.Tag     = mobTimeBox;
            teamEnable.Tag        = teamBox;

            xInput.Value    = item.X;
            yInput.Value    = item.Y;
            rx0Box.Value    = item.rx0Shift;
            rx1Box.Value    = item.rx1Shift;
            yShiftBox.Value = item.yShift;

            LoadOptionalInt(item.Info, infoEnable, infoBox);
            LoadOptionalInt(item.Team, teamEnable, teamBox);
            LoadOptionalInt(item.MobTime, mobTimeEnable, mobTimeBox);
            LoadOptionalStr(item.LimitedName, limitedNameEnable, limitedNameBox);

            hideBox.Checked = item.Hide;
            flipBox.Checked = item.Flip;

            pathLabel.Text = HaCreatorStateManager.CreateItemDescription(item, "\r\n");
        }
예제 #2
0
 public TileInstanceEditor(TileInstance item)
 {
     InitializeComponent();
     this.item      = item;
     xInput.Value   = item.X;
     yInput.Value   = item.Y;
     zInput.Value   = item.Z;
     pathLabel.Text = HaCreatorStateManager.CreateItemDescription(item, "\r\n");
 }
        public MirrorFieldEditor(MirrorFieldData mirrorFieldData)
        {
            InitializeComponent();
            this._mirrorFieldData = mirrorFieldData;


            checkBox_reflection.Checked = mirrorFieldData.ReflectionInfo.Reflection;
            checkBox_alphaTest.Checked  = mirrorFieldData.ReflectionInfo.AlphaTest;

            trackBar_gradient.Value = mirrorFieldData.ReflectionInfo.Gradient;
            trackBar_alpha.Value    = mirrorFieldData.ReflectionInfo.Alpha;

            numericUpDown_xOffsetValue.Value = (decimal)mirrorFieldData.Offset.X;
            numericUpDown_yOffsetValue.Value = (decimal)mirrorFieldData.Offset.Y;

            comboBox_objectForOverlay.SelectedIndex = 0; // "mirror"
            int i = 0;

            foreach (string comboBoxItem in comboBox_objectForOverlay.Items)
            {
                if (comboBoxItem == mirrorFieldData.ReflectionInfo.ObjectForOverlay)
                {
                    comboBox_objectForOverlay.SelectedIndex = i;
                    break;
                }
            }

            //numericUpDown_xOffsetValue.Value = mirrorFieldData.

            pathLabel.Text = HaCreatorStateManager.CreateItemDescription(_mirrorFieldData);

            /*rBox.Checked = this._mirrorFieldData.r;
             * flipBox.Checked = this._mirrorFieldData.Flip;
             * hideBox.Checked = !this._mirrorFieldData.hide.HasValue ? false : this._mirrorFieldData.hide.Value;
             * if (this._mirrorFieldData.Name != null)
             * {
             *  nameEnable.Checked = true;
             *  nameBox.Text = this._mirrorFieldData.Name;
             * }
             * flowBox.Checked = this._mirrorFieldData.flow;
             *
             * SetOptionalInt(rxInt, rxBox, this._mirrorFieldData.rx);
             * SetOptionalInt(ryInt, ryBox, this._mirrorFieldData.ry);
             * SetOptionalInt(cxInt, cxBox, this._mirrorFieldData.cx);
             * SetOptionalInt(cyInt, cyBox, this._mirrorFieldData.cy);
             *
             * if (this._mirrorFieldData.tags == null)
             *  tagsEnable.Checked = false;
             * else
             * {
             *  tagsEnable.Checked = true; tagsBox.Text = this._mirrorFieldData.tags;
             * }*/
        }
예제 #4
0
 public GeneralInstanceEditor(BoardItem item)
 {
     InitializeComponent();
     this.item    = item;
     xInput.Value = item.X;
     yInput.Value = item.Y;
     if (item.Z == -1)
     {
         zInput.Enabled = false;
     }
     else
     {
         zInput.Value = item.Z;
     }
     pathLabel.Text = HaCreatorStateManager.CreateItemDescription(item, "\r\n");
 }
예제 #5
0
        public ObjectInstanceEditor(ObjectInstance item)
        {
            InitializeComponent();
            cxBox.Tag       = cxInt;
            cyBox.Tag       = cyInt;
            rxBox.Tag       = rxInt;
            ryBox.Tag       = ryInt;
            nameEnable.Tag  = nameBox;
            questEnable.Tag = new Control[] { questAdd, questRemove, questList };
            tagsEnable.Tag  = tagsBox;

            this.item       = item;
            xInput.Value    = item.X;
            yInput.Value    = item.Y;
            zInput.Value    = item.Z;
            rBox.Checked    = item.r;
            flipBox.Checked = item.Flip;
            hideBox.Checked = !item.hide.HasValue ? false : item.hide.Value;
            pathLabel.Text  = HaCreatorStateManager.CreateItemDescription(item);
            if (item.Name != null)
            {
                nameEnable.Checked = true;
                nameBox.Text       = item.Name;
            }
            flowBox.Checked = item.flow;
            SetOptionalInt(rxInt, rxBox, item.rx);
            SetOptionalInt(ryInt, ryBox, item.ry);
            SetOptionalInt(cxInt, cxBox, item.cx);
            SetOptionalInt(cyInt, cyBox, item.cy);
            if (item.tags == null)
            {
                tagsEnable.Checked = false;
            }
            else
            {
                tagsEnable.Checked = true; tagsBox.Text = item.tags;
            }

            if (item.QuestInfo != null)
            {
                questEnable.Checked = true;
                foreach (ObjectInstanceQuest info in item.QuestInfo)
                {
                    questList.Items.Add(info);
                }
            }
        }
 public ReactorInstanceEditor(ReactorInstance item)
 {
     InitializeComponent();
     this.item      = item;
     xInput.Value   = item.X;
     yInput.Value   = item.Y;
     pathLabel.Text = HaCreatorStateManager.CreateItemDescription(item);
     if (item.Name == null)
     {
         useName.Checked = false;
     }
     else
     {
         nameBox.Text = item.Name;
     }
     timeBox.Value = item.ReactorTime;
 }
 public RopeInstanceEditor(RopeAnchor item)
 {
     InitializeComponent();
     this.item     = item;
     xInput.Value  = item.X;
     yInput.Value  = item.Y;
     ufBox.Checked = item.ParentRope.uf;
     if (item.ParentRope.ladder)
     {
         ladderBox.Checked = true;
     }
     else
     {
         ladderBox.Checked = false;
     }
     pathLabel.Text = HaCreatorStateManager.CreateItemDescription(item);
 }
예제 #8
0
        public TooltipInstanceEditor(ToolTipInstance item)
        {
            InitializeComponent();
            this.item      = item;
            xInput.Value   = item.X;
            yInput.Value   = item.Y;
            pathLabel.Text = HaCreatorStateManager.CreateItemDescription(item);

            if (item.Title != null)
            {
                useTitleBox.Checked = true;
                titleBox.Text       = item.Title;
            }
            if (item.Desc != null)
            {
                useDescBox.Checked = true;
                descBox.Text       = item.Desc;
            }
        }
예제 #9
0
 public BackgroundInstanceEditor(BackgroundInstance item)
 {
     InitializeComponent();
     this.item    = item;
     xInput.Value = item.BaseX;
     yInput.Value = item.BaseY;
     if (item.Z == -1)
     {
         zInput.Enabled = false;
     }
     else
     {
         zInput.Value = item.Z;
     }
     pathLabel.Text = HaCreatorStateManager.CreateItemDescription(item, "\r\n");
     typeBox.Items.AddRange((object[])Tables.BackgroundTypeNames.Cast <object>());
     typeBox.SelectedIndex = (int)item.type;
     alphaBox.Value        = item.a;
     front.Checked         = item.front;
     rxBox.Value           = item.rx;
     ryBox.Value           = item.ry;
     cxBox.Value           = item.cx;
     cyBox.Value           = item.cy;
 }
예제 #10
0
        public BackgroundInstanceEditor(BackgroundInstance item)
        {
            InitializeComponent();

            this.item    = item;
            xInput.Value = item.BaseX;
            yInput.Value = item.BaseY;
            if (item.Z == -1)
            {
                zInput.Enabled = false;
            }
            else
            {
                zInput.Value = item.Z;
            }

            pathLabel.Text = HaCreatorStateManager.CreateItemDescription(item);
            typeBox.Items.AddRange((object[])Tables.BackgroundTypeNames.Cast <object>());
            typeBox.SelectedIndex = (int)item.type;
            alphaBox.Value        = item.a;
            front.Checked         = item.front;
            rxBox.Value           = item.rx;
            ryBox.Value           = item.ry;
            cxBox.Value           = item.cx;
            cyBox.Value           = item.cy;

            // Resolutions
            foreach (RenderResolution val in Enum.GetValues(typeof(RenderResolution)))
            {
                ComboBoxItem comboBoxItem = new ComboBoxItem();
                comboBoxItem.Tag     = val;
                comboBoxItem.Content = val.ToString().Replace("Res_", "").Replace("_", " ").Replace("PercScaled", "% scale");

                comboBox_screenMode.Items.Add(comboBoxItem);
            }
            comboBox_screenMode.DisplayMember = "Content";

            int i = 0;

            foreach (ComboBoxItem citem in comboBox_screenMode.Items)
            {
                if ((int)((RenderResolution)citem.Tag) == item.screenMode)
                {
                    comboBox_screenMode.SelectedIndex = i;
                    break;
                }
                i++;
            }
            if (item.screenMode < 0)
            {
                comboBox_screenMode.SelectedIndex = 0;
            }

            // Spine
            BackgroundInfo baseInfo = (BackgroundInfo)item.BaseInfo;

            if (baseInfo.WzSpineAnimationItem == null)
            {
                groupBox_spine.Enabled = false; // disable editing
            }
            else
            {
                groupBox_spine.Enabled = true; // editing

                foreach (Animation ani in baseInfo.WzSpineAnimationItem.SkeletonData.Animations)
                {
                    ComboBoxItem comboBoxItem = new ComboBoxItem();
                    comboBoxItem.Tag     = ani;
                    comboBoxItem.Content = ani.Name;

                    comboBox_spineAnimation.Items.Add(comboBoxItem);
                }
                comboBox_spineAnimation.DisplayMember = "Content";

                int i_animation = 0;
                foreach (ComboBoxItem citem in comboBox_spineAnimation.Items)
                {
                    if (((Animation)citem.Tag).Name == item.SpineAni)
                    {
                        comboBox_spineAnimation.SelectedIndex = i_animation;
                        break;
                    }
                    i_animation++;
                }

                // spineRandomStart checkbox
                checkBox_spineRandomStart.Checked = item.SpineRandomStart;
            }
        }
        public BackgroundInstanceEditor(BackgroundInstance item)
        {
            InitializeComponent();

            this.item    = item;
            xInput.Value = item.BaseX;
            yInput.Value = item.BaseY;
            if (item.Z == -1)
            {
                zInput.Enabled = false;
            }
            else
            {
                zInput.Value = item.Z;
            }

            pathLabel.Text = HaCreatorStateManager.CreateItemDescription(item);
            typeBox.Items.AddRange((object[])Tables.BackgroundTypeNames.Cast <object>());
            typeBox.SelectedIndex = (int)item.type;
            alphaBox.Value        = item.a;
            front.Checked         = item.front;
            rxBox.Value           = item.rx;
            ryBox.Value           = item.ry;
            cxBox.Value           = item.cx;
            cyBox.Value           = item.cy;

            // Resolutions
            foreach (MapRenderResolution val in Enum.GetValues(typeof(MapRenderResolution)))
            {
                ComboBoxItem comboBoxItem = new ComboBoxItem();
                comboBoxItem.Tag     = val;
                comboBoxItem.Content = val.ToString().Replace("Res_", "").Replace("_", " ").Replace("PercScaled", "% scale");

                comboBox_screenMode.Items.Add(comboBoxItem);
            }
            comboBox_screenMode.DisplayMember = "Content";

            int i = 0;

            foreach (ComboBoxItem citem in comboBox_screenMode.Items)
            {
                if ((int)((MapRenderResolution)citem.Tag) == item.screenMode)
                {
                    comboBox_screenMode.SelectedIndex = i;
                    break;
                }
                i++;
            }
            if (item.screenMode < 0)
            {
                comboBox_screenMode.SelectedIndex = 0;
            }

            // Spine
            if (item.SpineAni != null)
            {
                checkBox_spineAni.Checked = true;
                textBox_spineAni.Text     = item.SpineAni;
            }
            checkBox_spineRandomStart.Checked = item.SpineRandomStart;
        }