private void ToggleFlag(object sender, DLCObjectFlags flag)
        {
            int index = listBoxObjects.SelectedIndex;

            if (index < 0)
            {
                return;
            }
            DLCObjectData data  = editorMeta.Items[index];
            CheckBox      check = (CheckBox)sender;

            if (check.Checked)
            {
                data.Flags |= flag;
            }
            else
            {
                data.Flags &= ~flag;
            }
            groupBoxWarp.Enabled      = data.Flags.HasFlag(DLCObjectFlags.FLAG_WARP);
            groupBoxPlaySound.Enabled = data.Flags.HasFlag(DLCObjectFlags.FLAG_SOUND);
            comboBoxMessage.Enabled   = labelMessage.Enabled = data.Flags.HasFlag(DLCObjectFlags.FLAG_MESSAGE);
            editorMeta.Items[index]   = data;
            RefreshObjectList();
            listBoxObjects.SelectedIndex = index;
        }
Esempio n. 2
0
 public DLCObjectData(DLCObjectData origdata)
 {
     Act                  = origdata.Act;
     Flags                = origdata.Flags;
     Level                = origdata.Level;
     Message              = origdata.Message;
     InternalID           = origdata.InternalID;
     ObjectType           = origdata.ObjectType;
     TriggerDistance      = origdata.TriggerDistance;
     RotSpeedX            = origdata.RotSpeedX;
     RotSpeedY            = origdata.RotSpeedY;
     RotSpeedZ            = origdata.RotSpeedZ;
     RotationX            = origdata.RotationX;
     RotationY            = origdata.RotationY;
     RotationZ            = origdata.RotationZ;
     ScaleX               = origdata.ScaleX;
     ScaleY               = origdata.ScaleY;
     ScaleZ               = origdata.ScaleZ;
     WarpActOrSoundID     = origdata.WarpActOrSoundID;
     Texture              = origdata.Texture;
     Unknown3             = origdata.Unknown3;
     WarpLevelOrSoundbank = origdata.WarpLevelOrSoundbank;
     X = origdata.X;
     Y = origdata.Y;
     Z = origdata.Z;
 }