summaryrefslogtreecommitdiffstats
path: root/tools/trackeditor/code/main/trackeditor.h
diff options
context:
space:
mode:
authorSvxy <aidan61605@gmail.com>2023-05-31 23:31:32 +0200
committerSvxy <aidan61605@gmail.com>2023-05-31 23:31:32 +0200
commiteb4b3404aa00220d659e532151dab13d642c17a3 (patch)
tree7e1107c4995489a26c4007e41b53ea8d00ab2134 /tools/trackeditor/code/main/trackeditor.h
downloadThe-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.gz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.bz2
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.lz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.xz
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.tar.zst
The-Simpsons-Hit-and-Run-eb4b3404aa00220d659e532151dab13d642c17a3.zip
Diffstat (limited to 'tools/trackeditor/code/main/trackeditor.h')
-rw-r--r--tools/trackeditor/code/main/trackeditor.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/tools/trackeditor/code/main/trackeditor.h b/tools/trackeditor/code/main/trackeditor.h
new file mode 100644
index 0000000..d48cba1
--- /dev/null
+++ b/tools/trackeditor/code/main/trackeditor.h
@@ -0,0 +1,85 @@
+#include "precompiled/PCH.h"
+
+#ifndef TRACK_EDITOR
+#define TRACK_EDITOR
+
+//This node exists as the top node of all the other TrackEditor types.
+//See te_setup.mel for more details of how this is a node.
+//There should only ever be one of these in the Hypergraph.
+
+//This is the place where options will be stored also.
+
+class TrackEditor
+{
+public:
+ TrackEditor();
+ ~TrackEditor();
+
+ static const char* Name;
+
+ static bool Exists();
+ static MStatus AddChild( MObject& obj );
+
+ //These are the Track Editing functions and state.
+ enum EditMode
+ {
+ OFF,
+ EDIT,
+ DISPLAY
+ };
+
+ static EditMode GetEditMode();
+
+ static void SetDeleteTreelines( bool del );
+ static bool GetDeleteTreelines();
+
+protected:
+
+ friend class TEStateChangeCommand;
+ static EditMode sEditMode;
+ static void SetEditMode( EditMode mode );
+
+ static bool sDeleteTreelines;
+
+private:
+ static unsigned int sNodeAddedbackID;
+ static unsigned int sWindowClosedCallbackID;
+
+ static void NodeAddedCB( MObject& node, void* data );
+ static void WindowClosedCB( void* data );
+ static void CreateTrackEditorNode();
+ static void CreateTileDisplayNode();
+ static void RemoveTileDisplayNode();
+};
+
+//=============================================================================
+// TrackEditor::SetDeleteTreelines
+//=============================================================================
+// Description: Comment
+//
+// Parameters: ( bool del )
+//
+// Return: void
+//
+//=============================================================================
+inline void TrackEditor::SetDeleteTreelines( bool del )
+{
+ sDeleteTreelines = del;
+}
+
+//=============================================================================
+// TrackEditor::GetDeleteTreelines
+//=============================================================================
+// Description: Comment
+//
+// Parameters: ()
+//
+// Return: bool
+//
+//=============================================================================
+inline bool TrackEditor::GetDeleteTreelines()
+{
+ return sDeleteTreelines;
+}
+
+#endif \ No newline at end of file