BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Properties | List of all members
BrawlCrate.UI.AdvancedCollisionEditor Class Reference
Inheritance diagram for BrawlCrate.UI.AdvancedCollisionEditor:
BrawlCrate.UI.CollisionEditor

Public Member Functions

 AdvancedCollisionEditor ()
 
- Public Member Functions inherited from BrawlCrate.UI.CollisionEditor
 CollisionEditor ()
 
void UpdateTools ()
 

Protected Member Functions

override void Dispose (bool disposing)
 Clean up any resources being used. More...
 
override void SelectionModified ()
 
override void UpdatePropPanels ()
 
- Protected Member Functions inherited from BrawlCrate.UI.CollisionEditor
void InitializeComponent ()
 
void TargetChanged (CollisionNode node)
 
virtual void SelectionModified ()
 
virtual void UpdatePropPanels ()
 
void PopulateModelList ()
 
void PopulateObjectList ()
 
void lstObjects_MouseDown (object sender, MouseEventArgs e)
 
void lstObjects_SelectedValueChanged (object sender, EventArgs e)
 
void snapToolStripMenuItem_Click (object sender, EventArgs e)
 
void _deleteToolStripMenuItem_Click (object sender, EventArgs e)
 
void newObjectToolStripMenuItem_Click (object sender, EventArgs e)
 
void ObjectSelected ()
 
void SnapObject ()
 
void lstObjects_ItemCheck (object sender, ItemCheckEventArgs e)
 
void ClearSelection ()
 
void UpdateSelection (bool finish)
 
void _treeObjects_AfterCheck (object sender, TreeViewEventArgs e)
 
void chkAllModels_CheckedChanged (object sender, EventArgs e)
 
void BeginHover (Vector3 point)
 
void UpdateHover (int x, int y)
 
void CancelHover ()
 
void FinishHover ()
 
void BeginSelection (Vector3 point, bool inverse)
 
void CancelSelection ()
 
void FinishSelection ()
 
void _modelPanel_MouseDown (object sender, MouseEventArgs e)
 
void _modelPanel_MouseUp (object sender, MouseEventArgs e)
 
void _modelPanel_MouseMove (object sender, MouseEventArgs e)
 
bool PointCollides (Vector3 point)
 
bool PointCollides (Vector3 point, out float y_result)
 
void _modelPanel_PreRender (object sender)
 
void _modelPanel_PostRender (object sender)
 
void btnSplit_Click (object sender, EventArgs e)
 
void btnMerge_Click (object sender, EventArgs e)
 
void trackBar1_Scroll (object sender, EventArgs e)
 
void btnResetRot_Click (object sender, EventArgs e)
 
void btnResetCam_Click (object sender, EventArgs e)
 
void btnPerspectiveCam_Click (object sender, EventArgs e)
 
void btnOrthographicCam_Click (object sender, EventArgs e)
 
void btnSpawns_Click (object sender, EventArgs e)
 
void btnItems_Click (object sender, EventArgs e)
 
void btnBoundaries_Click (object sender, EventArgs e)
 
void _modelPanel_KeyDown (object sender, KeyEventArgs e)
 
void cboMaterial_SelectedIndexChanged (object sender, EventArgs e)
 
void cboType_SelectedIndexChanged (object sender, EventArgs e)
 
void chkTypeCharacters_CheckedChanged (object sender, EventArgs e)
 
void chkTypeItems_CheckedChanged (object sender, EventArgs e)
 
void chkTypePokemonTrainer_CheckedChanged (object sender, EventArgs e)
 
void chkTypeRotating_CheckedChanged (object sender, EventArgs e)
 
void chkFallThrough_CheckedChanged (object sender, EventArgs e)
 
void chkLeftLedge_CheckedChanged (object sender, EventArgs e)
 
void chkRightLedge_CheckedChanged (object sender, EventArgs e)
 
void chkNoWalljump_CheckedChanged (object sender, EventArgs e)
 
void chkTypeCharacters_CheckedChanged_NoErrorHandling (object sender, EventArgs e)
 
void chkTypeItems_CheckedChanged_NoErrorHandling (object sender, EventArgs e)
 
void chkTypePokemonTrainer_CheckedChanged_NoErrorHandling (object sender, EventArgs e)
 
void chkTypeRotating_CheckedChanged_NoErrorHandling (object sender, EventArgs e)
 
void chkFallThrough_CheckedChanged_NoErrorHandling (object sender, EventArgs e)
 
void chkLeftLedge_CheckedChanged_NoErrorHandling (object sender, EventArgs e)
 
void chkRightLedge_CheckedChanged_NoErrorHandling (object sender, EventArgs e)
 
void chkNoWalljump_CheckedChanged_NoErrorHandling (object sender, EventArgs e)
 
void chkFlagCrush_CheckedChanged (object sender, EventArgs e)
 
void chkFlagBucculus_CheckedChanged (object sender, EventArgs e)
 
void chkFlagSuperSoft_CheckedChanged (object sender, EventArgs e)
 
void numX_ValueChanged (object sender, EventArgs e)
 
void numY_ValueChanged (object sender, EventArgs e)
 
void transformToolStripMenuItem_Click (object sender, EventArgs e)
 
void btnSameX_Click (object sender, EventArgs e)
 
void btnSameY_Click (object sender, EventArgs e)
 
void chkPoly_CheckStateChanged (object sender, EventArgs e)
 
void chkBones_CheckedChanged (object sender, EventArgs e)
 
void modelTree_AfterCheck (object sender, TreeViewEventArgs e)
 
void modelTree_AfterSelect (object sender, TreeViewEventArgs e)
 
void modelTree_BeforeSelect (object sender, TreeViewCancelEventArgs e)
 
void btnRelink_Click (object sender, EventArgs e)
 
void btnRelinkNoMove_Click (object sender, EventArgs e)
 
void btnUnlink_Click (object sender, EventArgs e)
 
void btnUnlinkNoMove_Click (object sender, EventArgs e)
 
void btnDelete_Click (object sender, EventArgs e)
 
void contextMenuStrip2_Opening (object sender, CancelEventArgs e)
 
void contextMenuStrip1_Opening (object sender, CancelEventArgs e)
 
void contextMenuStrip3_Opening (object sender, CancelEventArgs e)
 
void snapToolStripMenuItem1_Click (object sender, EventArgs e)
 
void btnResetSnap_Click (object sender, EventArgs e)
 
void btnFlipColl_Click (object sender, EventArgs e)
 
void CreateUndo ()
 
void CheckSaveIndex ()
 
void ClearUndoBuffer ()
 
void Undo (object sender, EventArgs e)
 
void Redo (object sender, EventArgs e)
 
void chkObjUnk_CheckedChanged (object sender, EventArgs e)
 
void chkObjIndep_CheckedChanged (object sender, EventArgs e)
 
void chkObjModule_CheckedChanged (object sender, EventArgs e)
 
void chkObjSSEUnk_CheckedChanged (object sender, EventArgs e)
 
void btnPlayAnims_Click (object sender, EventArgs e)
 
void btnPrevFrame_Click (object sender, EventArgs e)
 
void btnNextFrame_Click (object sender, EventArgs e)
 
void btnHelp_Click (object sender, EventArgs e)
 
void btnTranslateAll_Click (object sender, EventArgs e)
 

Properties

override bool ErrorChecking [get]
 
- Properties inherited from BrawlCrate.UI.CollisionEditor
virtual bool ErrorChecking [get]
 
CollisionNode TargetNode [get, set]
 

Additional Inherited Members

- Public Attributes inherited from BrawlCrate.UI.CollisionEditor
ModelPanel _modelPanel
 
- Protected Attributes inherited from BrawlCrate.UI.CollisionEditor
SplitContainer undoToolStrip
 
SplitContainer redoToolStrip
 
CheckBox chkAllModels
 
Panel pnlPlaneProps
 
Label label5
 
Label labelType
 
ComboBox cboMaterial
 
Panel pnlObjProps
 
ToolStrip toolStrip1
 
ToolStripButton btnTransform
 
ToolStripButton btnSplit
 
ToolStripButton btnMerge
 
ToolStripButton btnDelete
 
ContextMenuStrip contextMenuStrip1
 
ContextMenuStrip contextMenuStrip3
 
ToolStripMenuItem snapToolStripMenuItem
 
Panel panel1
 
TrackBar trackBar1
 
Button btnResetRot
 
ToolStripButton btnResetCam
 
GroupBox groupBoxFlags1
 
CheckBox chkFallThrough
 
GroupBox groupBoxFlags2
 
CheckBox chkNoWalljump
 
CheckBox chkRightLedge
 
CheckBox chkTypeCharacters
 
CheckBox chkTypeItems
 
CheckBox chkTypePokemonTrainer
 
CheckBox chkTypeRotating
 
CheckBox chkFlagCrush
 
CheckBox chkFlagSuperSoft
 
CheckBox chkFlagBucculus
 
GroupBox groupBoxTargets
 
Panel pnlPointProps
 
NumericInputBox numX
 
Label label2
 
NumericInputBox numY
 
Label label1
 
ToolStripSeparator toolStripSeparator1
 
ToolStripButton btnSameX
 
ToolStripButton btnSameY
 
ToolStripMenuItem newObjectToolStripMenuItem
 
ToolStripSeparator toolStripMenuItem2
 
ToolStripSeparator toolStripMenuItem3
 
ToolStripSeparator assignSeperatorToolStripMenuItem
 
ToolStripSeparator toolStripMenuItem1
 
ToolStripMenuItem _deleteToolStripMenuItem
 
TextBox txtModel
 
Label label3
 
Panel panel2
 
CheckBox chkPoly
 
Button btnRelink
 
TextBox txtBone
 
Label label4
 
CheckBox chkBones
 
CheckBox chkLeftLedge
 
ComboBox cboType
 
TreeView modelTree
 
Button btnUnlink
 
ContextMenuStrip contextMenuStrip2
 
ToolStripMenuItem assignToolStripMenuItem
 
ToolStripMenuItem assignNoMoveToolStripMenuItem
 
ToolStripMenuItem unlinkToolStripMenuItem
 
ToolStripMenuItem unlinkNoMoveToolStripMenuItem
 
ToolStripMenuItem snapToolStripMenuItem1
 
ToolStripSeparator toolStripSeparator2
 
ToolStripButton btnResetSnap
 
ToolStripButton btnUndo
 
ToolStripButton btnRedo
 
ToolStripSeparator toolStripSeparator3
 
CheckBox chkObjModule
 
CheckBox chkObjUnk
 
CheckBox chkObjSSEUnk
 
Button btnPlayAnims
 
Panel panel4
 
Panel panel3
 
Button btnPrevFrame
 
Button btnNextFrame
 
ToolStripButton btnHelp
 
CheckedListBox lstObjects
 
ToolStripSeparator toolStripSeparatorCamera
 
ToolStripButton btnPerspectiveCam
 
ToolStripButton btnFlipColl
 
ToolStripButton btnOrthographicCam
 
ToolStripButton btnBoundaries
 
ToolStripButton btnSpawns
 
ToolStripButton btnItems
 
ToolStripSeparator toolStripSeparatorOverlays
 
CollisionNode _targetNode
 
bool _updating
 
CollisionObject _selectedObject
 
Matrix _snapMatrix
 
bool _hovering
 
List< CollisionLink_selectedLinks = new List<CollisionLink>()
 
List< CollisionPlane_selectedPlanes = new List<CollisionPlane>()
 
bool _selecting
 
bool _selectInverse
 
Vector3 _selectStart
 
Vector3 _selectLast
 
Vector3 _selectEnd
 
bool _creating
 
CollisionState save
 
List< CollisionStateundoSaves = new List<CollisionState>()
 
List< CollisionStateredoSaves = new List<CollisionState>()
 
int saveIndex
 
bool hasMoved
 
List< IModel_models = new List<IModel>()
 
- Static Protected Attributes inherited from BrawlCrate.UI.CollisionEditor
const float SelectWidth = 7.0f
 
const float PointSelectRadius = 1.5f
 
const float SmallIncrement = 0.5f
 
const float LargeIncrement = 3.0f
 

Constructor & Destructor Documentation

◆ AdvancedCollisionEditor()

BrawlCrate.UI.AdvancedCollisionEditor.AdvancedCollisionEditor ( )
inline
523 {
524 InitializeComponent();
525 cboMaterial.DataSource = CollisionTerrain.Terrains.ToList();
526 }
Definition: CollisionDef.cs:213
static readonly CollisionTerrain[] Terrains
Definition: CollisionDef.cs:335

Member Function Documentation

◆ Dispose()

override void BrawlCrate.UI.AdvancedCollisionEditor.Dispose ( bool  disposing)
inlineprotected

Clean up any resources being used.

Parameters
disposingtrue if managed resources should be disposed; otherwise, false.
25 {
26 if (disposing)
27 {
28 components?.Dispose();
29 }
30
31 base.Dispose(disposing);
32 }

◆ SelectionModified()

override void BrawlCrate.UI.AdvancedCollisionEditor.SelectionModified ( )
inlineprotectedvirtual

Reimplemented from BrawlCrate.UI.CollisionEditor.

529 {
530 _selectedPlanes.Clear();
531 foreach (CollisionLink l in _selectedLinks)
532 {
533 foreach (CollisionPlane p in l._members)
534 {
535 if (_selectedLinks.Contains(p._linkLeft) &&
536 _selectedLinks.Contains(p._linkRight) &&
537 !_selectedPlanes.Contains(p))
538 {
539 _selectedPlanes.Add(p);
540 }
541 }
542 }
543
544 pnlPlaneProps.Visible = false;
545 pnlObjProps.Visible = false;
546 pnlPointProps.Visible = false;
547 panel3.Height = 0;
548
549 if (_selectedPlanes.Count > 0)
550 {
551 pnlPlaneProps.Visible = true;
552 panel3.Height = 280; //230;
553 }
554 else if (_selectedLinks.Count == 1)
555 {
556 pnlPointProps.Visible = true;
557 panel3.Height = 70;
558 }
559
561 }
override void UpdatePropPanels()
Definition: AdvancedCollisionEditor.cs:563
List< CollisionPlane > _selectedPlanes
Definition: CollisionEditor.cs:1348
List< CollisionLink > _selectedLinks
Definition: CollisionEditor.cs:1347
Definition: CollisionNode.cs:914
CollisionLink _linkRight
Definition: CollisionNode.cs:917
CollisionLink _linkLeft
Definition: CollisionNode.cs:917

◆ UpdatePropPanels()

override void BrawlCrate.UI.AdvancedCollisionEditor.UpdatePropPanels ( )
inlineprotectedvirtual

Reimplemented from BrawlCrate.UI.CollisionEditor.

564 {
565 _updating = true;
566
567 if (pnlPlaneProps.Visible)
568 {
569 if (_selectedPlanes.Count <= 0)
570 {
571 pnlPlaneProps.Visible = false;
572 return;
573 }
574
576
577 //Material
578 cboMaterial.SelectedItem = cboMaterial.Items[p._material];
579 //Type
580 chkTypeFloor.Checked = p.IsFloor;
581 chkTypeCeiling.Checked = p.IsCeiling;
582 chkTypeLeftWall.Checked = p.IsLeftWall;
583 chkTypeRightWall.Checked = p.IsRightWall;
584 //Flags
585 chkFallThrough.Checked = p.IsFallThrough;
586 chkLeftLedge.Checked = p.IsLeftLedge;
587 chkRightLedge.Checked = p.IsRightLedge;
588 chkNoWalljump.Checked = p.IsNoWalljump;
589 chkTypeCharacters.Checked = p.IsCharacters;
590 chkTypeItems.Checked = p.IsItems;
591 chkTypePokemonTrainer.Checked = p.IsPokemonTrainer;
592 chkTypeRotating.Checked = p.IsRotating;
593 chkFlagCrush.Checked = p.IsCrush;
594 chkFlagSuperSoft.Checked = p.IsSuperSoft;
595 chkFlagBucculus.Checked = p.IsBucculusBury;
596 //UnknownFlags
597 chkFlagsMatUnk0x02.Checked = p.IsMatUnknown0x02;
598 chkFlagsMatUnk0x10.Checked = p.IsMatUnknown0x10;
599 chkFlagsTypeUnk0x0200.Checked = p.IsTypeUnknown0x0200;
600 chkFlagsTypeUnk0x0400.Checked = p.IsTypeUnknown0x0400;
601 chkFlagsTypeUnk0x0800.Checked = p.IsTypeUnknown0x0800;
602 chkFlagsTypeUnk0x1000.Checked = p.IsTypeUnknown0x1000;
603 chkFlagsTypeUnk0x2000.Checked = p.IsTypeUnknown0x2000;
604 chkFlagsTypeUnk0x4000.Checked = p.IsTypeUnknown0x4000;
605 chkFlagsTypeUnk0x8000.Checked = p.IsTypeUnknown0x8000;
606 }
607 else if (pnlPointProps.Visible)
608 {
609 if (_selectedLinks.Count <= 0)
610 {
611 pnlPointProps.Visible = false;
612 return;
613 }
614
615 numX.Value = _selectedLinks[0].Value._x;
616 numY.Value = _selectedLinks[0].Value._y;
617 }
618 else if (pnlObjProps.Visible)
619 {
620 if (_selectedObject == null)
621 {
622 pnlObjProps.Visible = false;
623 return;
624 }
625
626 txtModel.Text = _selectedObject._modelName;
627 txtBone.Text = _selectedObject._boneName;
628 chkObjUnk.Checked = _selectedObject.UnknownFlag;
629 chkObjModule.Checked = _selectedObject.ModuleControlled;
630 chkObjSSEUnk.Checked = _selectedObject.UnknownSSEFlag;
631 }
632
633 _updating = false;
634 }
Panel pnlPlaneProps
Definition: CollisionEditor.cs:30
bool _updating
Definition: CollisionEditor.cs:1342
ComboBox cboMaterial
Definition: CollisionEditor.cs:33
Panel pnlObjProps
Definition: CollisionEditor.cs:34
Panel pnlPointProps
Definition: CollisionEditor.cs:62
CollisionObject _selectedObject
Definition: CollisionEditor.cs:1343
bool UnknownFlag
Definition: CollisionNode.cs:364
string _boneName
Definition: CollisionNode.cs:415
bool UnknownSSEFlag
Definition: CollisionNode.cs:398
bool ModuleControlled
Definition: CollisionNode.cs:387
string _modelName
Definition: CollisionNode.cs:415
bool IsCrush
Definition: CollisionNode.cs:1071
bool IsTypeUnknown0x2000
Definition: CollisionNode.cs:1108
bool IsLeftLedge
Definition: CollisionNode.cs:1141
bool IsMatUnknown0x02
Definition: CollisionNode.cs:1153
bool IsMatUnknown0x10
Definition: CollisionNode.cs:1171
bool IsRightWall
Definition: CollisionNode.cs:998
bool IsTypeUnknown0x0400
Definition: CollisionNode.cs:1090
bool IsRotating
Definition: CollisionNode.cs:1159
bool IsCeiling
Definition: CollisionNode.cs:986
bool IsFallThrough
Definition: CollisionNode.cs:1127
byte _material
Definition: CollisionNode.cs:924
bool IsNoWalljump
Definition: CollisionNode.cs:1147
bool IsLeftWall
Definition: CollisionNode.cs:992
bool IsTypeUnknown0x8000
Definition: CollisionNode.cs:1120
bool IsItems
Definition: CollisionNode.cs:1059
bool IsFloor
Definition: CollisionNode.cs:980
bool IsPokemonTrainer
Definition: CollisionNode.cs:1065
bool IsBucculusBury
Definition: CollisionNode.cs:1078
bool IsTypeUnknown0x0800
Definition: CollisionNode.cs:1096
bool IsRightLedge
Definition: CollisionNode.cs:1135
bool IsTypeUnknown0x4000
Definition: CollisionNode.cs:1114
bool IsTypeUnknown0x1000
Definition: CollisionNode.cs:1102
bool IsTypeUnknown0x0200
Definition: CollisionNode.cs:1084
bool IsSuperSoft
Definition: CollisionNode.cs:1165
bool IsCharacters
Definition: CollisionNode.cs:1052

Property Documentation

◆ ErrorChecking

override bool BrawlCrate.UI.AdvancedCollisionEditor.ErrorChecking
getprotected

The documentation for this class was generated from the following file: