Merge branch 'VerveMergeWIP' of https://github.com/Areloch/Torque3D into development
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
12
Templates/BaseGame/game/tools/VPathEditor/GUI/Profiles.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
singleton GuiControlProfile( VPathEditorProfile )
|
||||
{
|
||||
CanKeyFocus = true;
|
||||
|
||||
FontType = "Arial Bold";
|
||||
FontColor = "0 0 0";
|
||||
};
|
||||
434
Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditor.gui
Normal file
|
|
@ -0,0 +1,434 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new VPathEditor(EVPathEditor) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VPathEditorProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
Position = "0 0";
|
||||
Extent = "800 600";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Docking = "None";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "0";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "0";
|
||||
AnchorRight = "0";
|
||||
cameraZRot = "0";
|
||||
forceFOV = "0";
|
||||
renderMissionArea = "1";
|
||||
missionAreaFillColor = "255 0 0 20";
|
||||
missionAreaFrameColor = "255 0 0 128";
|
||||
allowBorderMove = "0";
|
||||
borderMovePixelSize = "20";
|
||||
borderMoveSpeed = "0.1";
|
||||
consoleFrameColor = "255 0 0 255";
|
||||
consoleFillColor = "0 0 0 0";
|
||||
consoleSphereLevel = "1";
|
||||
consoleCircleSegments = "32";
|
||||
consoleLineWidth = "1";
|
||||
GizmoProfile = "GlobalGizmoProfile";
|
||||
|
||||
new GuiWindowCollapseCtrl(VPathEditorTreeWindow) {
|
||||
internalName = "";
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "GuiWindowProfile";
|
||||
HorizSizing = "windowRelative";
|
||||
VertSizing = "windowRelative";
|
||||
Position = getWord($pref::Video::mode, 0) - 209
|
||||
SPC getWord(EditorGuiToolbar.extent, 1) - 1;
|
||||
Extent = "210 167";
|
||||
MinExtent = "210 100";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
closeCommand = "EditorGui.setEditor( WorldEditorInspectorPlugin );";
|
||||
EdgeSnap = "1";
|
||||
text = "Path Editor";
|
||||
|
||||
new GuiContainer(){
|
||||
profile = GuiDefaultProfile;
|
||||
Position = "5 25";
|
||||
Extent = "200 120";
|
||||
Docking = "Client";
|
||||
Margin = "3 1 3 3 ";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
isContainer = "1";
|
||||
|
||||
new GuiScrollCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "GuiEditorScrollProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
Position = "0 0";
|
||||
Extent = "200 118";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Docking = "Client";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "dynamic";
|
||||
lockHorizScroll = "true";
|
||||
lockVertScroll = "false";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
mouseWheelScrollSpeed = "-1";
|
||||
|
||||
new GuiTreeViewCtrl(VPathTreeView) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "ToolsGuiTreeViewProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "1 1";
|
||||
Extent = "193 21";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
tabSize = "16";
|
||||
textOffset = "2";
|
||||
fullRowSelect = "0";
|
||||
itemHeight = "21";
|
||||
destroyTreeOnSleep = "1";
|
||||
MouseDragging = "0";
|
||||
MultipleSelections = "0";
|
||||
DeleteObjectAllowed = "1";
|
||||
DragToItemAllowed = "0";
|
||||
showRoot = "1";
|
||||
internalNamesOnly = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
new GuiBitmapButtonCtrl() {
|
||||
bitmap = "tools/gui/images/delete";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "bottom";
|
||||
position = "193 4";
|
||||
Extent = "16 16";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "VPathTreeView.DeleteSelectedPaths();";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
ToolTip = "Delete Selected Path";
|
||||
hovertime = "1000";
|
||||
internalName = "deleteSelection";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapButtonCtrl() {
|
||||
bitmap = "core/art/gui/images/new";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "bottom";
|
||||
position = "176 3";
|
||||
Extent = "17 17";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "VPathTreeView.CreatePath();";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltip = "Create New Path";
|
||||
hovertime = "1000";
|
||||
internalName = "CreateSelection";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiWindowCollapseCtrl(VPathEditorOptionsWindow) {
|
||||
internalName = "Window";
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "GuiWindowProfile";
|
||||
HorizSizing = "windowRelative";
|
||||
VertSizing = "windowRelative";
|
||||
Position = getWord($pref::Video::mode, 0) - 209
|
||||
SPC getWord(EditorGuiToolbar.extent, 1) + getWord(VPathEditorTreeWindow.extent, 1) - 2;
|
||||
Extent = "210 530";
|
||||
MinExtent = "210 298";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
closeCommand = "EditorGui.setEditor( WorldEditorPlugin );";
|
||||
EdgeSnap = "1";
|
||||
text = "Properties";
|
||||
|
||||
new GuiContainer(){ //Node Properties
|
||||
isContainer = "1";
|
||||
Profile = "inspectorStyleRolloutDarkProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "4 24";
|
||||
Extent = "202 127";
|
||||
Docking = "Top";
|
||||
Margin = "3 3 3 3";
|
||||
|
||||
new GuiTextCtrl(){
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "5 0";
|
||||
Extent = "86 18";
|
||||
text = "Node Properties";
|
||||
};
|
||||
new GuiTextCtrl(){
|
||||
Profile = "GuiTextRightProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "7 21";
|
||||
Extent = "46 18";
|
||||
text = "Position";
|
||||
};
|
||||
new GuiTextEditCtrl(){
|
||||
internalName = "position";
|
||||
Profile = "GuiTextEditProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "57 21";
|
||||
Extent = "141 18";
|
||||
text = "";
|
||||
AltCommand = "EVPathEditor.setNodePosition( $ThisControl.getValue() );";
|
||||
};
|
||||
new GuiTextCtrl(){
|
||||
Profile = "GuiTextRightProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "7 42";
|
||||
Extent = "46 18";
|
||||
text = "Rotation";
|
||||
};
|
||||
new GuiTextEditCtrl(){
|
||||
internalName = "rotation";
|
||||
Profile = "GuiTextEditProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "57 42";
|
||||
Extent = "141 18";
|
||||
text = "";
|
||||
AltCommand = "EVPathEditor.setNodeRotation( $ThisControl.getValue() );";
|
||||
};
|
||||
new GuiTextCtrl(){
|
||||
Profile = "GuiTextRightProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "7 63";
|
||||
Extent = "46 18";
|
||||
text = "Weight";
|
||||
};
|
||||
new GuiTextEditCtrl(){
|
||||
internalName = "weight";
|
||||
Profile = "GuiTextEditProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "57 63";
|
||||
Extent = "52 18";
|
||||
text = "";
|
||||
AltCommand = "EVPathEditor.setNodeWeight( $ThisControl.getValue() );";
|
||||
};
|
||||
new GuiTextCtrl(){
|
||||
Profile = "GuiTextRightProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "7 84";
|
||||
Extent = "46 18";
|
||||
text = "Orientation";
|
||||
};
|
||||
new GuiPopUpMenuCtrl(EPathEditorNodeOrientationMode){
|
||||
internalName = "weight";
|
||||
Profile = "GuiPopUpMenuProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "57 84";
|
||||
Extent = "141 18";
|
||||
text = "";
|
||||
Command = "OnOrientationChanged();";
|
||||
};
|
||||
new GuiTextCtrl(){
|
||||
Profile = "GuiTextRightProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "7 105";
|
||||
Extent = "46 18";
|
||||
text = "Lookat Pt";
|
||||
};
|
||||
new GuiTextEditCtrl(EPathEditorNodeOrientationData){
|
||||
internalName = "weight";
|
||||
Profile = "GuiTextEditProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "57 105";
|
||||
Extent = "141 18";
|
||||
text = "";
|
||||
AltCommand = "OnOrientationChanged();";
|
||||
};
|
||||
};
|
||||
new GuiContainer(){ // Path Properties
|
||||
isContainer = "1";
|
||||
Profile = "inspectorStyleRolloutDarkProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "4 112";
|
||||
Extent = "202 31";
|
||||
Docking = "Top";
|
||||
Margin = "0 0 3 3";
|
||||
|
||||
new GuiTextCtrl(){
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "5 0";
|
||||
Extent = "121 18";
|
||||
text = "Path Properties";
|
||||
};
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "GuiEditorScrollProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
Position = "4 150";
|
||||
Extent = "223 315";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Docking = "Client";
|
||||
Margin = "-14 41 3 3";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "dynamic";
|
||||
lockHorizScroll = "true";
|
||||
lockVertScroll = "false";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
|
||||
new GuiInspector(VPathInspector) {
|
||||
StackingType = "Vertical";
|
||||
HorizStacking = "Left to Right";
|
||||
VertStacking = "Top to Bottom";
|
||||
Padding = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "GuiTransparentProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "1 1";
|
||||
Extent = "179 16";
|
||||
MinExtent = "16 16";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
dividerMargin = "5";
|
||||
};
|
||||
};
|
||||
new GuiMLTextCtrl(VPathFieldInfoControl) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "GuiInspectorFieldInfoMLTextProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "top";
|
||||
Position = "1 485";
|
||||
Extent = "202 42";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
useURLMouseCursor = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
function EPathEditorNodeOrientationMode::onWake( %this )
|
||||
{
|
||||
if ( %this.size() == 0 )
|
||||
{
|
||||
%this.add( "FREE", 0 );
|
||||
%this.add( "TOPOINT", 1 );
|
||||
}
|
||||
}
|
||||
|
||||
function OnOrientationChanged()
|
||||
{
|
||||
%mode = EPathEditorNodeOrientationMode.getText();
|
||||
%data = EPathEditorNodeOrientationData.getText();
|
||||
EVPathEditor.setNodeOrientationMode( %mode, %data );
|
||||
}
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
%paletteId = new GuiControl(VPathEditorPalette) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "1024 768";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiBitmapButtonCtrl(EVPathEditorSelectButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
internalName = "";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "25 19";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
ToolTip = "Select Path / Node (1)";
|
||||
hovertime = "1000";
|
||||
bitmap = "tools/gui/images/menubar/arrow";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(EVPathEditorMoveButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
internalName = "";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "25 19";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
ToolTip = "Move Point (2)";
|
||||
hovertime = "1000";
|
||||
bitmap = "tools/worldEditor/images/road-river/move-point";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(EVPathEditorRotateButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
internalName = "";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "28 0";
|
||||
Extent = "25 19";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
ToolTip = "Rotate Point (3)";
|
||||
hovertime = "1000";
|
||||
bitmap = "tools/worldEditor/images/road-river/rotate-point";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(EVPathEditorScaleButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
internalName = "";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "56 0";
|
||||
Extent = "25 19";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
ToolTip = "Scale Point (4)";
|
||||
hovertime = "1000";
|
||||
bitmap = "tools/worldEditor/images/road-river/scale-point";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(EVPathEditorAddNodeButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
internalName = "";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "28 0";
|
||||
Extent = "25 19";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
ToolTip = "Add Node (5)";
|
||||
hovertime = "1000";
|
||||
bitmap = "tools/worldEditor/images/road-river/add-point";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(EVPathEditorDeleteNodeButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
internalName = "";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "56 0";
|
||||
Extent = "25 19";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
ToolTip = "Delete Node (6)";
|
||||
hovertime = "1000";
|
||||
bitmap = "tools/worldEditor/images/road-river/subtract-point";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function EVPathEditorSelectButton::onClick( %this )
|
||||
{
|
||||
EVPathEditor.EditMode = "Gizmo";
|
||||
GlobalGizmoProfile.Mode = "Select";
|
||||
}
|
||||
|
||||
function EVPathEditorMoveButton::onClick( %this )
|
||||
{
|
||||
EVPathEditor.EditMode = "Gizmo";
|
||||
GlobalGizmoProfile.Mode = "Move";
|
||||
}
|
||||
|
||||
function EVPathEditorRotateButton::onClick( %this )
|
||||
{
|
||||
EVPathEditor.EditMode = "Gizmo";
|
||||
GlobalGizmoProfile.Mode = "Rotate";
|
||||
}
|
||||
|
||||
function EVPathEditorScaleButton::onClick( %this )
|
||||
{
|
||||
EVPathEditor.EditMode = "Gizmo";
|
||||
GlobalGizmoProfile.Mode = "Scale";
|
||||
}
|
||||
|
||||
function EVPathEditorAddNodeButton::onClick( %this )
|
||||
{
|
||||
EVPathEditor.EditMode = "AddNode";
|
||||
}
|
||||
|
||||
function EVPathEditorDeleteNodeButton::onClick( %this )
|
||||
{
|
||||
EVPathEditor.EditMode = "DeleteNode";
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
%guiContent = new GuiControl(VPathEditorToolbar)
|
||||
{
|
||||
canSaveDynamicFields = "0";
|
||||
internalName = "VPathEditorToolbar";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "306 0";
|
||||
Extent = "800 32";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "0";
|
||||
hovertime = "1000";
|
||||
canMove = "0";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
EdgeSnap = "0";
|
||||
text ="";
|
||||
|
||||
new GuiTextCtrl()
|
||||
{
|
||||
internalName = "ToolbarLabel";
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "2 7";
|
||||
extent = "77 16";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
text = " VPath Settings";
|
||||
maxLength = "255";
|
||||
helpTag = "0";
|
||||
};
|
||||
|
||||
new GuiPopUpMenuCtrl(VPathEditorToolbarPathTypeMenu)
|
||||
{
|
||||
canSaveDynamicFields = "0";
|
||||
internalName = "PathTypeMenu";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "GuiPopUpMenuProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "85 7";
|
||||
Extent = "70 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
maxLength = "1024";
|
||||
maxPopupHeight = "200";
|
||||
sbUsesNAColor = "0";
|
||||
reverseTextList = "0";
|
||||
bitmapBounds = "16 16";
|
||||
};
|
||||
};
|
||||
228
Templates/BaseGame/game/tools/VPathEditor/Scripts/Editor.cs
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function EVPathEditor::onDeleteKey( %this )
|
||||
{
|
||||
%editPath = EVPathEditor.getSelectedPath();
|
||||
%editNode = EVPathEditor.getSelectedNode();
|
||||
if ( isObject( %editPath ) && %editNode != -1 )
|
||||
{
|
||||
// Delete the Node.
|
||||
%this.deleteSelection();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Clear Selection.
|
||||
%this.clearSelection();
|
||||
|
||||
// Delete the Path.
|
||||
MEDeleteUndoAction::submit( %editPath );
|
||||
}
|
||||
}
|
||||
|
||||
function EVPathEditor::onUpdateSelection( %this, %editPath, %editNode )
|
||||
{
|
||||
// Clear World Editor Selection.
|
||||
EWorldEditor.clearSelection();
|
||||
|
||||
%clearNode = true;
|
||||
if ( isObject( %editPath ) )
|
||||
{
|
||||
// Reset Type.
|
||||
VPathEditorToolbarPathTypeMenu.setText( %editPath.PathType );
|
||||
|
||||
// Set World Editor Selection.
|
||||
EWorldEditor.selectObject( %editPath );
|
||||
|
||||
// Inspect.
|
||||
VPathInspector.inspect( %editPath );
|
||||
|
||||
// Update the Node Inspector.
|
||||
if ( %editNode != -1 )
|
||||
{
|
||||
// Valid Node.
|
||||
%clearNode = false;
|
||||
|
||||
VPathEditorOptionsWindow-->position.setActive( true );
|
||||
VPathEditorOptionsWindow-->position.setValue( %editPath.getNodeLocalPosition( %editNode ) );
|
||||
|
||||
VPathEditorOptionsWindow-->rotation.setActive( true );
|
||||
VPathEditorOptionsWindow-->rotation.setValue( %editPath.getNodeLocalRotation( %editNode ) );
|
||||
|
||||
VPathEditorOptionsWindow-->weight.setActive( true );
|
||||
VPathEditorOptionsWindow-->weight.setValue( %editPath.getNodeWeight( %editNode ) );
|
||||
|
||||
%orientationMode = %editPath.getNodeOrientationMode( %editNode );
|
||||
%orientationType = EPathEditorNodeOrientationMode.findText( strupr( getField( %orientationMode, 0 ) ) );
|
||||
%orientationData = getField( %orientationMode, 1 );
|
||||
|
||||
EPathEditorNodeOrientationMode.setSelected( %orientationType, false );
|
||||
EPathEditorNodeOrientationData.Text = %orientationData;
|
||||
}
|
||||
}
|
||||
|
||||
// Invalid Node?
|
||||
if ( %clearNode )
|
||||
{
|
||||
VPathEditorOptionsWindow-->position.setActive( false );
|
||||
VPathEditorOptionsWindow-->position.setValue( "" );
|
||||
|
||||
VPathEditorOptionsWindow-->rotation.setActive( true );
|
||||
VPathEditorOptionsWindow-->rotation.setValue( "" );
|
||||
|
||||
VPathEditorOptionsWindow-->weight.setActive( true );
|
||||
VPathEditorOptionsWindow-->weight.setValue( "" );
|
||||
}
|
||||
}
|
||||
|
||||
function VPathEditorToolbarPathTypeMenu::onSelect( %this )
|
||||
{
|
||||
%editPath = EVPathEditor.getSelectedPath();
|
||||
if ( isObject( %editPath ) )
|
||||
{
|
||||
// Apply Type.
|
||||
%editPath.PathType = %this.getText();
|
||||
}
|
||||
}
|
||||
|
||||
function VPathTreeView::onInspect( %this, %object )
|
||||
{
|
||||
// VPath?
|
||||
if ( !%object.isMemberOfClass( "VPath" ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Select Object.
|
||||
EVPathEditor.setSelection( %object );
|
||||
}
|
||||
|
||||
function VPathTreeView::DeleteSelectedPaths( %this )
|
||||
{
|
||||
// Clear the Selection.
|
||||
EVPathEditor.clearSelection();
|
||||
|
||||
// Iterate over Selection.
|
||||
%selectionList = %this.getSelectedItemList();
|
||||
%selectionCount = getWordCount( %selectionList );
|
||||
for ( %i = 0; %i < %selectionCount; %i++ )
|
||||
{
|
||||
// Fetch Index.
|
||||
%itemIndex = getWord( %selectionList, %i );
|
||||
|
||||
// Fetch Object.
|
||||
%itemObject = %this.getItemValue( %itemIndex );
|
||||
|
||||
// Skip Non-Path Objects.
|
||||
if ( !%itemObject.isMemberOfClass( "VPath" ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Delete the Object.
|
||||
MEDeleteUndoAction::submit( %itemObject );
|
||||
}
|
||||
|
||||
// Clear the Selection.
|
||||
%this.clearSelection();
|
||||
EVPathEditor.clearSelection();
|
||||
|
||||
// Build the Tree.
|
||||
%this.open( GetServerPathSet(), true );
|
||||
}
|
||||
|
||||
function VPathTreeView::CreatePath( %this )
|
||||
{
|
||||
// Create Path Object.
|
||||
EWCreatorWindow.createObject( "ObjectBuilderGui.buildObject( \"VPath\" );" );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Node Editing
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function EVPathEditor::onUpdateNode( %this, %editPath, %editNode, %selected )
|
||||
{
|
||||
if ( %selected )
|
||||
{
|
||||
%this.onUpdateNodePosition( %editPath, %editNode, %selected );
|
||||
%this.onUpdateNodeRotation( %editPath, %editNode, %selected );
|
||||
%this.onUpdateNodeWeight( %editPath, %editNode, %selected );
|
||||
%this.onUpdateNodeOrientation( %editPath, %editNode, %selected );
|
||||
}
|
||||
}
|
||||
|
||||
function EVPathEditor::onUpdateNodePosition( %this, %editPath, %editNode, %selected )
|
||||
{
|
||||
if ( %selected )
|
||||
{
|
||||
VPathEditorOptionsWindow-->position.setValue( %editPath.getNodeLocalPosition( %editNode ) );
|
||||
}
|
||||
}
|
||||
|
||||
function EVPathEditor::onUpdateNodeRotation( %this, %editPath, %editNode, %selected )
|
||||
{
|
||||
if ( %selected )
|
||||
{
|
||||
VPathEditorOptionsWindow-->rotation.setValue( %editPath.getNodeLocalRotation( %editNode ) );
|
||||
}
|
||||
}
|
||||
|
||||
function EVPathEditor::onUpdateNodeWeight( %this, %editPath, %editNode, %selected )
|
||||
{
|
||||
if ( %selected )
|
||||
{
|
||||
VPathEditorOptionsWindow-->weight.setValue( %editPath.getNodeWeight( %editNode ) );
|
||||
}
|
||||
}
|
||||
|
||||
function EVPathEditor::onUpdateNodeOrientation( %this, %editPath, %editNode, %selected )
|
||||
{
|
||||
if ( %selected )
|
||||
{
|
||||
%orientationMode = %editPath.getNodeOrientationMode( %editNode );
|
||||
%orientationType = EPathEditorNodeOrientationMode.findText( strupr( getField( %orientationMode, 0 ) ) );
|
||||
%orientationData = getField( %orientationMode, 1 );
|
||||
|
||||
// Change?
|
||||
if ( EPathEditorNodeOrientationMode.getSelected() != %orientationType )
|
||||
{
|
||||
// Update.
|
||||
EPathEditorNodeOrientationMode.setSelected( %orientationType );
|
||||
}
|
||||
|
||||
// Change?
|
||||
if ( EPathEditorNodeOrientationData.getText() !$= %orientationData )
|
||||
{
|
||||
// Update.
|
||||
EPathEditorNodeOrientationData.setText( %orientationData );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Inspector
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VPathInspector::inspect( %this, %obj )
|
||||
{
|
||||
VPathFieldInfoControl.setText( "" );
|
||||
Parent::inspect( %this, %obj );
|
||||
}
|
||||
|
||||
function VPathInspector::onInspectorFieldModified( %this, %object, %fieldName, %arrayIndex, %oldValue, %newValue )
|
||||
{
|
||||
// Same work to do as for the regular WorldEditor Inspector.
|
||||
Inspector::onInspectorFieldModified( %this, %object, %fieldName, %arrayIndex, %oldValue, %newValue );
|
||||
}
|
||||
|
||||
function VPathInspector::onFieldSelected( %this, %fieldName, %fieldTypeStr, %fieldDoc )
|
||||
{
|
||||
VPathFieldInfoControl.setText( "<font:ArialBold:14>" @ %fieldName @ "<font:ArialItalic:14> (" @ %fieldTypeStr @ ") " NL "<font:Arial:14>" @ %fieldDoc );
|
||||
}
|
||||
178
Templates/BaseGame/game/tools/VPathEditor/Scripts/Plugin.cs
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VPathEditorPlugin )
|
||||
{
|
||||
SuperClass = "EditorPlugin";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VPathEditorPlugin::onWorldEditorStartup( %this )
|
||||
{
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
// Editor Init
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
EditorGui.add( EVPathEditor );
|
||||
EVPathEditor.setVisible( false );
|
||||
|
||||
%this.EditorMap = new ActionMap();
|
||||
%this.EditorMap.bindCmd( keyboard, "backspace", "EVPathEditor.onDeleteKey();", "" );
|
||||
%this.EditorMap.bindCmd( keyboard, "delete", "EVPathEditor.onDeleteKey();", "" );
|
||||
%this.EditorMap.bindCmd( keyboard, "1", "EVPathEditorSelectButton.performClick();", "" );
|
||||
%this.EditorMap.bindCmd( keyboard, "2", "EVPathEditorMoveButton.performClick();", "" );
|
||||
%this.EditorMap.bindCmd( keyboard, "3", "EVPathEditorRotateButton.performClick();", "" );
|
||||
%this.EditorMap.bindCmd( keyboard, "4", "EVPathEditorScaleButton.performClick();", "" );
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
// Editor Toggles
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// Add ourselves to the window menu.
|
||||
%accel = EditorGui.addToEditorsMenu( "Path Editor", "", VPathEditorPlugin );
|
||||
|
||||
// Add ourselves to the ToolsToolbar
|
||||
%tooltip = "Path Editor (" @ %accel @ ")";
|
||||
EditorGui.addToToolsToolbar( "VPathEditorPlugin", "VPathEditorPalette", expandFilename( "tools/VPathEditor/GUI/Images/btn_Palette" ), %tooltip );
|
||||
|
||||
// Find and Store the Button.
|
||||
%this.ToolbarButton = ToolsToolbarArray.findObjectByInternalName( "VPathEditorPalette", false );
|
||||
|
||||
// Extend Width.
|
||||
%extent = EWToolsToolbar.getExtent();
|
||||
EWToolsToolbar.setExtent( ( getWord( %extent, 0 ) + 33 ) SPC getWord( %extent, 1 ) );
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
// Initialise Toolbar
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
if ( !isObject( VPathEditorToolbar ) )
|
||||
{
|
||||
exec( "~/VPathEditor/GUI/VPathEditorToolbar.gui" );
|
||||
}
|
||||
|
||||
// Add Toolbar.
|
||||
EditorGuiToolbar.add( VPathEditorToolbar );
|
||||
|
||||
// Populate Type Menu.
|
||||
VPathEditorToolbarPathTypeMenu.clear();
|
||||
VPathEditorToolbarPathTypeMenu.add( "BEZIER", 0 );
|
||||
VPathEditorToolbarPathTypeMenu.add( "LINEAR", 1 );
|
||||
VPathEditorToolbarPathTypeMenu.setFirstSelected();
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
// Initialise Editor Palette
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
if ( !isObject( VPathEditorPalette ) )
|
||||
{
|
||||
exec( "~/VPathEditor/GUI/VPathEditorPalette.gui" );
|
||||
}
|
||||
|
||||
// Use Existing Group Number + 1.
|
||||
%groupNum = ToolsPaletteArray.getObject( ToolsPaletteArray.getCount() - 1 ).GroupNum + 1;
|
||||
|
||||
%paletteGroup = VPathEditorPalette;
|
||||
while ( VPathEditorPalette.getCount() > 0 )
|
||||
{
|
||||
// Fetch Button.
|
||||
%paletteButton = %paletteGroup.getObject( 0 );
|
||||
|
||||
// Setup.
|
||||
%paletteButton.Visible = false;
|
||||
%paletteButton.GroupNum = %groupNum;
|
||||
%paletteButton.PaletteName = VPathEditorPalette;
|
||||
|
||||
// Add To Palette Array.
|
||||
ToolsPaletteArray.addGuiControl( %paletteButton );
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
// Initialise Library
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
EWCreatorWindow.registerMissionObject( "VPath", "VPath", "", "Level" );
|
||||
}
|
||||
|
||||
//EditorGui.setEditor(\"VPathEditorPlugin\");
|
||||
function VPathEditorPlugin::onActivated( %this )
|
||||
{
|
||||
if ( !isObject( EVPathEditor ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Display Editor.
|
||||
EVPathEditor.setVisible( true );
|
||||
EVPathEditor.makeFirstResponder( true );
|
||||
EditorGui.bringToFront( EVPathEditor );
|
||||
VPathEditorToolbar.setVisible( true );
|
||||
VPathTreeView.open( GetServerPathSet(), true );
|
||||
|
||||
// Sync Gizmo.
|
||||
%this.syncGizmo();
|
||||
|
||||
// Enable Map.
|
||||
%this.EditorMap.push();
|
||||
|
||||
// Valid Selection?
|
||||
if ( EWorldEditor.getSelectionSize() )
|
||||
{
|
||||
%selection = EWorldEditor.getSelectedObject( 0 );
|
||||
if ( isObject( %selection ) && %selection.isMemberOfClass( "VPath" ) )
|
||||
{
|
||||
// Select Object.
|
||||
EVPathEditor.setSelection( %selection );
|
||||
}
|
||||
}
|
||||
|
||||
// Parent Call.
|
||||
Parent::onActivated( %this );
|
||||
}
|
||||
|
||||
function VPathEditorPlugin::onDeactivated( %this )
|
||||
{
|
||||
// Hide Editor.
|
||||
EVPathEditor.setVisible( false );
|
||||
VPathEditorToolbar.setVisible( false );
|
||||
|
||||
// Disable Map.
|
||||
%this.EditorMap.pop();
|
||||
|
||||
// Parent Call.
|
||||
Parent::onDeactivated( %this );
|
||||
}
|
||||
|
||||
function VPathEditorPlugin::isDirty( %this )
|
||||
{
|
||||
return EVPathEditor.isDirty;
|
||||
}
|
||||
|
||||
function VPathEditorPlugin::clearDirty( %this )
|
||||
{
|
||||
EVPathEditor.isDirty = false;
|
||||
}
|
||||
|
||||
function VPathEditorPlugin::syncGizmo( %this )
|
||||
{
|
||||
switch$( GlobalGizmoProfile.Mode )
|
||||
{
|
||||
case "None" : EVPathEditorSelectButton.performClick();
|
||||
case "Move" : EVPathEditorMoveButton.performClick();
|
||||
case "Rotate" : EVPathEditorRotateButton.performClick();
|
||||
case "Scale" : EVPathEditorScaleButton.performClick();
|
||||
}
|
||||
}
|
||||
20
Templates/BaseGame/game/tools/VPathEditor/main.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function InitializeVPathEditor()
|
||||
{
|
||||
// Gui.
|
||||
exec( "./GUI/Profiles.cs" );
|
||||
exec( "./GUI/VPathEditor.gui" );
|
||||
|
||||
// Scripts.
|
||||
exec( "./Scripts/Plugin.cs" );
|
||||
exec( "./Scripts/Editor.cs" );
|
||||
}
|
||||
|
||||
function DestroyVPathEditor()
|
||||
{
|
||||
// Void.
|
||||
}
|
||||
23
Templates/BaseGame/game/tools/VerveEditor/DefaultPrefs.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Recent Files
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$Pref::VerveEditor::RecentFileSize = 10;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Event Snap
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$Pref::VerveEditor::Event::SnapToTime = true;
|
||||
$Pref::VerveEditor::Event::SnapToTimeThreshold = 100;
|
||||
$Pref::VerveEditor::Event::SnapToSiblings = true;
|
||||
$Pref::VerveEditor::Event::SnapToSiblingThreshold = 100;
|
||||
BIN
Templates/BaseGame/game/tools/VerveEditor/GUI/Buttons.psd
Normal file
213
Templates/BaseGame/game/tools/VerveEditor/GUI/GuiProfiles.cs
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
singleton GuiControlProfile( VEditorDefaultProfile )
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "70 70 70";
|
||||
fillColorHL = "90 90 90";
|
||||
fillColorNA = "70 70 70";
|
||||
|
||||
border = 1;
|
||||
borderColor = "120 120 120";
|
||||
borderColorHL = "100 100 100";
|
||||
borderColorNA = "240 240 240";
|
||||
|
||||
fontType = "Arial";
|
||||
fontSize = 12;
|
||||
fontCharset = ANSI;
|
||||
|
||||
fontColor = "255 255 255";
|
||||
fontColorHL = "255 255 255";
|
||||
fontColorNA = "255 255 255";
|
||||
fontColorSEL = "255 255 255";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorTestProfile )
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "255 255 0";
|
||||
fillColorHL = "255 255 0";
|
||||
fillColorNA = "255 255 0";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorNoFillProfile : VEditorDefaultProfile )
|
||||
{
|
||||
opaque = false;
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorNoBorderProfile : VEditorDefaultProfile )
|
||||
{
|
||||
border = false;
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorTransparentProfile : VEditorDefaultProfile )
|
||||
{
|
||||
opaque = false;
|
||||
border = false;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
singleton GuiControlProfile( VEditorTextProfile : VEditorDefaultProfile )
|
||||
{
|
||||
border = false;
|
||||
opaque = false;
|
||||
|
||||
fontType = "Arial Bold";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorTextEditProfile : VEditorDefaultProfile )
|
||||
{
|
||||
fillColor = "70 70 70";
|
||||
fillColorHL = "90 90 90";
|
||||
fillColorSEL = "0 0 0";
|
||||
fillColorNA = "70 70 70";
|
||||
|
||||
fontColor = "255 255 255";
|
||||
fontColorHL = "0 0 0";
|
||||
fontColorSEL = "128 128 128";
|
||||
fontColorNA = "128 128 128";
|
||||
|
||||
textOffset = "4 2";
|
||||
autoSizeWidth = false;
|
||||
autoSizeHeight = false;
|
||||
justify = "left";
|
||||
tab = true;
|
||||
canKeyFocus = true;
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorPopupMenuProfile : GuiPopUpMenuProfile )
|
||||
{
|
||||
FillColorHL = "90 90 90";
|
||||
FillColorSEL = "0 0 0";
|
||||
|
||||
FontColorHL = "255 255 255";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile ( VEditorBitmapButtonProfile : VEditorDefaultProfile )
|
||||
{
|
||||
justify = "center";
|
||||
|
||||
hasBitmapArray = true;
|
||||
bitmap = "./Images/Button";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
singleton GuiControlProfile( VEditorGroupHeaderProfile : VEditorDefaultProfile )
|
||||
{
|
||||
CanKeyFocus = true;
|
||||
TextOffset = "23 0";
|
||||
|
||||
fontColor = "70 70 70";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorGroupHeaderErrorProfile : VEditorGroupHeaderProfile )
|
||||
{
|
||||
fontColor = "255 70 70";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorGroupTrackProfile : VEditorTransparentProfile )
|
||||
{
|
||||
CanKeyFocus = true;
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorTrackProfile : VEditorDefaultProfile )
|
||||
{
|
||||
CanKeyFocus = true;
|
||||
TextOffset = "33 0";
|
||||
|
||||
opaque = true;
|
||||
fillColor = "255 255 255 15";
|
||||
fillColorHL = "151 166 191 60";
|
||||
|
||||
borderColor = "100 100 100";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorTrackErrorProfile : VEditorTrackProfile )
|
||||
{
|
||||
fontColor = "255 70 70";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorEventProfile : VEditorDefaultProfile )
|
||||
{
|
||||
CanKeyFocus = true;
|
||||
Justify = "left";
|
||||
TextOffset = "6 1";
|
||||
|
||||
fillColor = "81 81 81";
|
||||
fillColorHL = "102 102 102";
|
||||
|
||||
borderColor = "255 255 255";
|
||||
borderColorHL = "255 255 255";
|
||||
borderColorNA = "100 100 100";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorTimeLineProfile : VEditorDefaultProfile )
|
||||
{
|
||||
CanKeyFocus = true;
|
||||
|
||||
opaque = false;
|
||||
fillColorHL = "255 255 255 15";
|
||||
|
||||
border = false;
|
||||
borderColor = "100 100 100";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorPropertyProfile : VEditorDefaultProfile )
|
||||
{
|
||||
fillColor = "102 102 102";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
singleton GuiControlProfile ( VEditorScrollProfile : VEditorDefaultProfile )
|
||||
{
|
||||
opaque = false;
|
||||
border = false;
|
||||
|
||||
hasBitmapArray = true;
|
||||
bitmap = "./Images/ScrollBar";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile ( VEditorCheckBoxProfile : GuiCheckBoxProfile )
|
||||
{
|
||||
// Void.
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
singleton GuiControlProfile( VEditorPropertyRolloutProfile : GuiRolloutProfile )
|
||||
{
|
||||
border = 0;
|
||||
hasBitmapArray = true;
|
||||
bitmap = "./Images/PropertyRollout";
|
||||
|
||||
fontType = "Arial";
|
||||
fontSize = 12;
|
||||
fontCharset = ANSI;
|
||||
|
||||
fontColor = "255 255 255";
|
||||
fontColorHL = "255 255 255";
|
||||
fontColorNA = "255 255 255";
|
||||
fontColorSEL = "255 255 255";
|
||||
};
|
||||
|
||||
singleton GuiControlProfile( VEditorPropertyLabelProfile : VEditorTextProfile )
|
||||
{
|
||||
border = "1";
|
||||
justify = "center";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
singleton GuiControlProfile( VEditorPreferenceLabelProfile : GuiTextProfile )
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "242 241 240";
|
||||
fillColorHL = "242 241 240";
|
||||
fillColorNA = "242 241 240";
|
||||
};
|
||||
BIN
Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Button.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 272 B |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
BIN
Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Spacer.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
764
Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditor.gui
Normal file
|
|
@ -0,0 +1,764 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(VerveEditorGui) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "1024 768";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
Position = "0 0";
|
||||
Extent = "728 714";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "VEditorDefaultProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new VEditorScrollControl(VerveEditorGroupScroll) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorScrollProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "height";
|
||||
Position = "1 1";
|
||||
Extent = "212 663";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "alwaysOff";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
|
||||
new GuiScriptNotifyCtrl(VerveEditorGroupNotify) {
|
||||
onChildAdded = "0";
|
||||
onChildRemoved = "0";
|
||||
onChildResized = "0";
|
||||
onParentResized = "1";
|
||||
onResize = "1";
|
||||
onLoseFirstResponder = "0";
|
||||
onGainFirstResponder = "0";
|
||||
canSaveDynamicFields = "0";
|
||||
class = "VerveEditorScrollNotifyV";
|
||||
className = "VerveEditorScrollNotifyV";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "212 1";
|
||||
MinExtent = "210 1";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new VEditorButton() {
|
||||
class = "VerveEditorTimeLineBackground";
|
||||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 0";
|
||||
Extent = "212 1";
|
||||
MinExtent = "210 1";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
text = "";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
Context = "1";
|
||||
};
|
||||
new GuiStackControl(VerveEditorGroupStack) {
|
||||
class = "VerveEditorStack";
|
||||
StackingType = "Vertical";
|
||||
HorizStacking = "Left to Right";
|
||||
VertStacking = "Top to Bottom";
|
||||
Padding = "-1";
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "212 1";
|
||||
MinExtent = "210 1";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
};
|
||||
};
|
||||
};
|
||||
new VEditorScrollControl(VerveEditorTrackScroll) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorScrollProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
Position = "210 1";
|
||||
Extent = "516 663";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
|
||||
new GuiScriptNotifyCtrl(VerveEditorTrackNotify) {
|
||||
onChildAdded = "0";
|
||||
onChildRemoved = "0";
|
||||
onChildResized = "0";
|
||||
onParentResized = "1";
|
||||
onResize = "1";
|
||||
onLoseFirstResponder = "0";
|
||||
onGainFirstResponder = "0";
|
||||
canSaveDynamicFields = "0";
|
||||
class = "VerveEditorScrollNotify";
|
||||
className = "VerveEditorScrollNotify";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "516 32";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new VTimeLineControl(VerveEditorTrackTimeLine) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorTimeLineProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
Position = "0 0";
|
||||
Extent = "1100 32";
|
||||
MinExtent = "1100 32";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
IsController = "0";
|
||||
Controller = "VerveEditorController";
|
||||
Zoom = "0";
|
||||
|
||||
new VEditorButton() {
|
||||
class = "VerveEditorTimeLineBackground";
|
||||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 0";
|
||||
Extent = "516 32";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
text = "";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
Context = "0";
|
||||
};
|
||||
new GuiStackControl(VerveEditorTrackStack) {
|
||||
class = "VerveEditorStack";
|
||||
StackingType = "Vertical";
|
||||
HorizStacking = "Left to Right";
|
||||
VertStacking = "Top to Bottom";
|
||||
Padding = "-1";
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "516 32";
|
||||
MinExtent = "8 32";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
new VEditorScrollControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorScrollProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "top";
|
||||
Position = "1 661";
|
||||
Extent = "212 56";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiDefaultProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOn";
|
||||
vScrollBar = "alwaysOff";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "1 1";
|
||||
|
||||
new GuiControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "1 1";
|
||||
Extent = "208 36";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiBitmapButtonCtrl(VerveEditorAddGroupButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
class = "VEditorAddGroupButton";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "3 3";
|
||||
Extent = "30 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltip = "Add New Group";
|
||||
command = "$ThisControl.DisplayContextMenu();";
|
||||
hovertime = "1000";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
bitmap = "./Images/btn_AddGroup";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(VerveEditorAddTrackButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
class = "VEditorAddTrackButton";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "36 3";
|
||||
Extent = "30 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltip = "Add New Track";
|
||||
command = "$ThisControl.DisplayContextMenu();";
|
||||
hovertime = "1000";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
bitmap = "./Images/btn_AddTrack";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(VerveEditorAddEventButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "69 3";
|
||||
Extent = "30 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltip = "Add New Event";
|
||||
command = "VerveEditor::AddEvent();";
|
||||
hovertime = "1000";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
bitmap = "./Images/btn_AddEvent";
|
||||
};
|
||||
new GuiBitmapButtonCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorBitmapButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "bottom";
|
||||
Position = "175 3";
|
||||
Extent = "30 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltip = "Delete Selected Object(s)";
|
||||
command = "VerveEditor::DeleteSelection();";
|
||||
hovertime = "1000";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
bitmap = "./Images/btn_Delete";
|
||||
};
|
||||
};
|
||||
};
|
||||
new VEditorScrollControl(VerveEditorTimeScroll) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorScrollProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "top";
|
||||
Position = "210 661";
|
||||
Extent = "516 56";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOn";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
|
||||
new GuiScriptNotifyCtrl(VerveEditorTimeNotify) {
|
||||
onChildAdded = "0";
|
||||
onChildRemoved = "0";
|
||||
onChildResized = "0";
|
||||
onParentResized = "1";
|
||||
onResize = "1";
|
||||
onLoseFirstResponder = "0";
|
||||
onGainFirstResponder = "0";
|
||||
canSaveDynamicFields = "0";
|
||||
class = "VerveEditorScrollNotifyH";
|
||||
className = "VerveEditorScrollNotifyH";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "1 1";
|
||||
Extent = "516 41";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new VTimeLineControl(VerveEditorTimeLine) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorTimeLineProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "1100 41";
|
||||
MinExtent = "1100 41";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
IsController = "1";
|
||||
Controller = "VerveEditorController";
|
||||
Zoom = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
new VEditorScrollControl(VerveEditorPropertyScroll) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorScrollProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "height";
|
||||
Position = "723 1";
|
||||
Extent = "300 766";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "3 3";
|
||||
|
||||
new GuiStackControl(VerveEditorPropertyStack) {
|
||||
StackingType = "Vertical";
|
||||
HorizStacking = "Left to Right";
|
||||
VertStacking = "Top to Bottom";
|
||||
Padding = "2";
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "3 3";
|
||||
Extent = "279 256";
|
||||
MinExtent = "16 16";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
};
|
||||
};
|
||||
new VEditorScrollControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorScrollProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "top";
|
||||
Position = "1 713";
|
||||
Extent = "212 54";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiDefaultProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "alwaysOff";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "1 1";
|
||||
|
||||
new GuiControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "1 1";
|
||||
Extent = "208 36";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
};
|
||||
};
|
||||
new VEditorScrollControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorScrollProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "top";
|
||||
Position = "210 713";
|
||||
Extent = "516 54";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiDefaultProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "1 1";
|
||||
|
||||
new GuiControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
Position = "2 2";
|
||||
Extent = "500 50";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "center";
|
||||
VertSizing = "bottom";
|
||||
Position = "114 10";
|
||||
Extent = "258 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiBitmapButtonCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorBitmapButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "50 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltip = "Jump Backwards";
|
||||
command = "VerveEditor::Rewind();";
|
||||
hovertime = "1000";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
bitmap = "./Images/btn_Rewind";
|
||||
};
|
||||
new GuiBitmapButtonCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "52 0";
|
||||
Extent = "50 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltip = "Step Backwards 1 Frame";
|
||||
command = "VerveEditor::StepB();";
|
||||
hovertime = "1000";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
bitmap = "./Images/btn_StepB";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(VerveEditorPlayButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "104 0";
|
||||
Extent = "50 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltip = "Play / Pause";
|
||||
command = "VerveEditor::TogglePlay( $ThisControl );";
|
||||
hovertime = "1000";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
bitmap = "./Images/btn_Play";
|
||||
};
|
||||
new GuiBitmapButtonCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "156 0";
|
||||
Extent = "50 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltip = "Step Forward 1 Frame";
|
||||
command = "VerveEditor::StepF();";
|
||||
hovertime = "1000";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
bitmap = "./Images/btn_StepF";
|
||||
};
|
||||
new GuiBitmapButtonCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorBitmapButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "208 0";
|
||||
Extent = "50 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltip = "Jump Forward";
|
||||
command = "VerveEditor::Forward();";
|
||||
hovertime = "1000";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
bitmap = "./Images/btn_Forward";
|
||||
};
|
||||
};
|
||||
new GuiBitmapButtonCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "10 10";
|
||||
Extent = "30 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltip = "Insert Time (Front)";
|
||||
command = "VerveEditor::InsertTimeFront();";
|
||||
hovertime = "1000";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
bitmap = "./Images/btn_AddL";
|
||||
};
|
||||
new GuiBitmapButtonCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorTransparentProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "bottom";
|
||||
Position = "460 10";
|
||||
Extent = "30 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltip = "Insert Time (Back)";
|
||||
command = "VerveEditor::InsertTimeBack();";
|
||||
hovertime = "1000";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
bitmap = "./Images/btn_AddR";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -0,0 +1,434 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
||||
isContainer = "1";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "0 0";
|
||||
Extent = "1024 768";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiWindowCtrl(VerveEditorGroupBuilderWindow) {
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "1";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
EdgeSnap = "1";
|
||||
text = "Create Group";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiWindowProfile";
|
||||
HorizSizing = "center";
|
||||
VertSizing = "center";
|
||||
position = "268 181";
|
||||
Extent = "280 178";
|
||||
MinExtent = "256 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "Label:";
|
||||
maxLength = "1024";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "14 30";
|
||||
Extent = "84 16";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextEditCtrl(VerveEditorGroupBuilderNameField) {
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
passwordMask = "*";
|
||||
maxLength = "1024";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextEditProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
position = "79 29";
|
||||
Extent = "191 18";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapBorderCtrl() {
|
||||
isContainer = "0";
|
||||
Profile = "GuiGroupBorderProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
position = "7 55";
|
||||
Extent = "267 70";
|
||||
MinExtent = "1 1";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiStackControl(VerveEditorGroupBuilderFieldStack) {
|
||||
StackingType = "Vertical";
|
||||
HorizStacking = "Left to Right";
|
||||
VertStacking = "Top to Bottom";
|
||||
Padding = "2";
|
||||
ChangeChildSizeToFit = "1";
|
||||
ChangeChildPosition = "1";
|
||||
isContainer = "1";
|
||||
Profile = "GuiTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "3 3";
|
||||
Extent = "261 20";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiControl() {
|
||||
isContainer = "1";
|
||||
Profile = "GuiTransparentProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "0 0";
|
||||
Extent = "261 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "Scene Object:";
|
||||
maxLength = "1024";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "center";
|
||||
position = "4 1";
|
||||
Extent = "100 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiPopUpMenuCtrl() {
|
||||
maxPopupHeight = "200";
|
||||
sbUsesNAColor = "0";
|
||||
reverseTextList = "0";
|
||||
bitmapBounds = "16 16";
|
||||
maxLength = "1024";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "0";
|
||||
Profile = "VEditorPopupMenuProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "center";
|
||||
position = "104 1";
|
||||
Extent = "156 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
internalName = "SceneObjectList";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "Create";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "top";
|
||||
position = "66 139";
|
||||
Extent = "96 24";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "VerveEditorGroupBuilderGUI._Build( VerveEditorGroupBuilderNameField.getText() );";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "Cancel";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "top";
|
||||
position = "174 139";
|
||||
Extent = "96 24";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "VerveEditorGroupBuilderGUI.Close();";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
function VerveEditorGroupBuilderGUI::Build( %this, %groupType, %callbackMethod )
|
||||
{
|
||||
if ( %callbackMethod $= "" )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Store Info.
|
||||
%this.GroupType = %groupType;
|
||||
%this.CallbackMethod = %callbackMethod;
|
||||
|
||||
// Clear Text.
|
||||
VerveEditorGroupBuilderNameField.setText( "" );
|
||||
|
||||
// Clear Stack.
|
||||
VerveEditorGroupBuilderFieldStack.clear();
|
||||
|
||||
// Populate the Field Stack.
|
||||
eval( %groupType @ "::PopulateBuildStack( 0, " @ VerveEditorGroupBuilderFieldStack @ ");" );
|
||||
|
||||
// Display.
|
||||
if($Verve::UseSeparateWindow)
|
||||
VerveEditorWindow.pushDialog( %this );
|
||||
else
|
||||
Canvas.pushDialog( %this );
|
||||
|
||||
|
||||
// Resize Everything.
|
||||
%container = VerveEditorGroupBuilderFieldStack.getParent();
|
||||
%stackExtent = VerveEditorGroupBuilderFieldStack.getExtent();
|
||||
%stackPosition = VerveEditorGroupBuilderFieldStack.getPosition();
|
||||
%containerExtent = %container.getExtent();
|
||||
%containerHeight = ( VerveEditorGroupBuilderFieldStack.getCount() > 0 ) ? getWord( %stackExtent, 1 ) + 2 * getWord( %stackPosition, 1 ) : 1;
|
||||
%containerHeightDelta = %containerHeight - getWord( %containerExtent, 1 );
|
||||
%container.setExtent( getWord( %containerExtent, 0 ), %containerHeight );
|
||||
|
||||
%windowExtent = VerveEditorGroupBuilderWindow.getExtent();
|
||||
VerveEditorGroupBuilderWindow.setExtent( getWord( %windowExtent, 0 ), getWord( %windowExtent, 1 ) + %containerHeightDelta );
|
||||
}
|
||||
|
||||
function VerveEditorGroupBuilderGUI::Close( %this )
|
||||
{
|
||||
if($Verve::UseSeparateWindow)
|
||||
VerveEditorWindow.popDialog( %this );
|
||||
else
|
||||
Canvas.popDialog( %this );
|
||||
}
|
||||
|
||||
function VerveEditorGroupBuilderGUI::_Build( %this, %groupLabel )
|
||||
{
|
||||
if ( %groupLabel $= "" )
|
||||
{
|
||||
messageBox( "Warning", "You must provide a Valid Group Label.", "Ok" );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( %this.CallbackMethod $= "" )
|
||||
{
|
||||
// Close Dialog.
|
||||
if($Verve::UseSeparateWindow)
|
||||
VerveEditorWindow.popDialog( %this );
|
||||
else
|
||||
Canvas.popDialog( %this );
|
||||
return;
|
||||
}
|
||||
|
||||
// Eval Method.
|
||||
eval( %this.CallbackMethod @ "(" @ %this.GroupType @ "," @ %groupLabel @ ");" );
|
||||
|
||||
// Clear.
|
||||
%this.CallbackMethod = "";
|
||||
|
||||
// Close Dialog.
|
||||
if($Verve::UseSeparateWindow)
|
||||
VerveEditorWindow.popDialog( %this );
|
||||
else
|
||||
Canvas.popDialog( %this );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorGroupBuilderFieldStack::CreateObjectList( %this, %objectType, %internalName, %label )
|
||||
{
|
||||
%container = new GuiControl()
|
||||
{
|
||||
Profile = "GuiTransparentProfile";
|
||||
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "261 20";
|
||||
};
|
||||
|
||||
%label = new GuiTextCtrl()
|
||||
{
|
||||
Profile = "GuiTextProfile";
|
||||
|
||||
HorizSizing = "right";
|
||||
VertSizing = "center";
|
||||
Position = "4 1";
|
||||
Extent = "100 18";
|
||||
|
||||
Text = %label;
|
||||
};
|
||||
%container.add( %label );
|
||||
|
||||
%listObject = new GuiPopUpMenuCtrl()
|
||||
{
|
||||
Class = "VerveEditorGroupBuilderObjectList";
|
||||
Profile = "VEditorPopupMenuProfile";
|
||||
|
||||
HorizSizing = "left";
|
||||
VertSizing = "center";
|
||||
Position = "104 1";
|
||||
Extent = "156 18";
|
||||
|
||||
InternalName = %internalName;
|
||||
};
|
||||
%container.add( %listObject );
|
||||
|
||||
// Create NULL Entry.
|
||||
%listObject.add( "", 0 );
|
||||
|
||||
// Populate List.
|
||||
%listObject.CheckGroup( MissionGroup, %objectType );
|
||||
|
||||
// Sort the List.
|
||||
%listObject.sort();
|
||||
|
||||
%this.add( %container );
|
||||
|
||||
return %listObject;
|
||||
}
|
||||
|
||||
function VerveEditorGroupBuilderObjectList::CheckGroup( %this, %group, %objectType )
|
||||
{
|
||||
// Populate List.
|
||||
%groupSize = %group.getCount();
|
||||
for ( %i = 0; %i < %groupSize; %i++ )
|
||||
{
|
||||
%groupObject = %group.getObject( %i );
|
||||
if ( %groupObject.getName() $= "" )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( %groupObject.isMemberOfClass( %objectType ) )
|
||||
{
|
||||
%this.add( %groupObject.getName(), %this.size() );
|
||||
}
|
||||
else if ( %groupObject.isMemberOfClass( "SimSet" ) )
|
||||
{
|
||||
%this.CheckGroup( %groupObject, %objectType );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditorGroupBuilderFieldStack::CreateCheckbox( %this, %internalName, %label )
|
||||
{
|
||||
%container = new GuiControl()
|
||||
{
|
||||
Profile = "GuiTransparentProfile";
|
||||
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "261 20";
|
||||
};
|
||||
|
||||
%label = new GuiTextCtrl()
|
||||
{
|
||||
Profile = "GuiTextProfile";
|
||||
|
||||
HorizSizing = "right";
|
||||
VertSizing = "center";
|
||||
Position = "4 1";
|
||||
Extent = "100 18";
|
||||
|
||||
Text = %label;
|
||||
};
|
||||
%container.add( %label );
|
||||
|
||||
%checkBox = new GuiCheckBoxCtrl()
|
||||
{
|
||||
Profile = "GuiCheckboxProfile";
|
||||
|
||||
HorizSizing = "left";
|
||||
VertSizing = "center";
|
||||
Position = "104 1";
|
||||
Extent = "156 18";
|
||||
|
||||
InternalName = %internalName;
|
||||
|
||||
Text = "";
|
||||
};
|
||||
%container.add( %checkBox );
|
||||
|
||||
%this.add( %container );
|
||||
|
||||
return %checkBox;
|
||||
}
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
||||
isContainer = "1";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = "1024 768";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "1";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "1";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
EdgeSnap = "1";
|
||||
text = "Import Path Nodes";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiWindowProfile";
|
||||
HorizSizing = "center";
|
||||
VertSizing = "center";
|
||||
Position = "268 181";
|
||||
Extent = "280 98";
|
||||
MinExtent = "256 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "Speed:";
|
||||
maxLength = "1024";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "14 30";
|
||||
Extent = "84 16";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextEditCtrl(VerveEditorImportPathNodesSpeed) {
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
passwordMask = "*";
|
||||
maxLength = "1024";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextEditProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "79 29";
|
||||
Extent = "191 18";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "Create";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "top";
|
||||
Position = "66 62";
|
||||
Extent = "96 24";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "VMotionTrack::_ImportPathNodes( VerveEditorImportPathNodesSpeed.getText() );";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "Cancel";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "top";
|
||||
Position = "174 62";
|
||||
Extent = "96 24";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "VerveEditorWindow.popDialog( VerveEditorImportPathNodesGUI );";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -0,0 +1,367 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "0 0";
|
||||
Extent = "1024 768";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiWindowProfile";
|
||||
HorizSizing = "center";
|
||||
VertSizing = "center";
|
||||
position = "392 253";
|
||||
Extent = "240 262";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Docking = "None";
|
||||
Margin = "4 24 4 4";
|
||||
Padding = "4 24 4 4";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "0";
|
||||
canClose = "1";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
closeCommand = "VerveEditor::CloseEditorPreferences();";
|
||||
EdgeSnap = "1";
|
||||
canCollapse = "0";
|
||||
CollapseGroup = "-1";
|
||||
CollapseGroupNum = "-1";
|
||||
text = "Verve Editor - Preferences";
|
||||
|
||||
new GuiControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "10 93";
|
||||
Extent = "220 125";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiBitmapBorderCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiBitmapBorderProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 10";
|
||||
Extent = "221 116";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
class = "VerveEditorPreferenceLabel";
|
||||
Profile = "VEditorPreferenceLabelProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "10 2";
|
||||
Extent = "66 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
text = " Event Snap ";
|
||||
maxLength = "1024";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "30 50";
|
||||
Extent = "110 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
text = "Threshold:";
|
||||
maxLength = "1024";
|
||||
};
|
||||
new GuiCheckBoxCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiCheckBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "6 30";
|
||||
Extent = "128 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Variable = "$Pref::VerveEditor::Event::SnapToTime";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
text = " Snap to Time";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
useInactiveState = "0";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextEditProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "150 50";
|
||||
Extent = "64 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Variable = "$Pref::VerveEditor::Event::SnapToTimeThreshold";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
maxLength = "1024";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
passwordMask = "*";
|
||||
};
|
||||
new GuiCheckBoxCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiCheckBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "6 80";
|
||||
Extent = "128 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Variable = "$Pref::VerveEditor::Event::SnapToSiblings";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
text = " Snap to Siblings";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
useInactiveState = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "30 100";
|
||||
Extent = "110 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
text = "Threshold:";
|
||||
maxLength = "1024";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextEditProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "150 100";
|
||||
Extent = "64 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Variable = "$Pref::VerveEditor::Event::SnapToSiblingThreshold";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
maxLength = "1024";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
passwordMask = "*";
|
||||
};
|
||||
};
|
||||
new GuiControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "10 30";
|
||||
Extent = "220 53";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiBitmapBorderCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiBitmapBorderProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 10";
|
||||
Extent = "221 44";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
class = "VerveEditorPreferenceLabel";
|
||||
Profile = "VEditorPreferenceLabelProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "10 2";
|
||||
Extent = "70 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
text = " Recent Files ";
|
||||
maxLength = "1024";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextEditProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "6 30";
|
||||
Extent = "40 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Variable = "$Pref::VerveEditor::RecentFileSize";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
maxLength = "1024";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
passwordMask = "*";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "56 30";
|
||||
Extent = "158 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
text = "items shown in Window Menu";
|
||||
maxLength = "1024";
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "151 228";
|
||||
Extent = "80 24";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "VerveEditor::CloseEditorPreferences();";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
text = "OK";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
function VerveEditorPreferenceLabel::onWake( %this )
|
||||
{
|
||||
%this.setActive( false );
|
||||
}
|
||||
BIN
Templates/BaseGame/game/tools/VerveEditor/GUI/btn_AddSml.psd
Normal file
BIN
Templates/BaseGame/game/tools/VerveEditor/GUI/btn_Palette.psd
Normal file
|
|
@ -0,0 +1,362 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VControllerPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
|
||||
Group[0] = "VController";
|
||||
Field[0, 0] = "Duration";
|
||||
Field[0, 1] = "TimeScale";
|
||||
|
||||
Field[0, 2] = "SPACER 6";
|
||||
|
||||
Field[0, 3] = "Loop";
|
||||
Field[0, 4] = "LoopBackwards";
|
||||
Field[0, 5] = "LoopCount";
|
||||
Field[0, 6] = "LoopDelay";
|
||||
|
||||
Field[0, 7] = "SPACER 6";
|
||||
|
||||
Field[0, 8] = "ResetOnCompletion";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::TogglePlay()
|
||||
{
|
||||
if ( !isObject( $VerveEditor::Controller ) )
|
||||
{
|
||||
// No Controller.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !$VerveEditor::Controller.isPlaying() )
|
||||
{
|
||||
// Play.
|
||||
VerveEditor::Play();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pause.
|
||||
VerveEditor::Pause();
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditor::Play()
|
||||
{
|
||||
// Start Playing.
|
||||
$VerveEditor::Controller.play();
|
||||
}
|
||||
|
||||
function VerveEditor::Pause()
|
||||
{
|
||||
// Stop but do not Reset.
|
||||
$VerveEditor::Controller.stop( false );
|
||||
}
|
||||
|
||||
function VerveEditor::StepF()
|
||||
{
|
||||
// Determine the time to step towards.
|
||||
%time = mClamp( $VerveEditor::Controller.Time + ( 32 * $VerveEditor::Controller.TimeScale ), 0.0, $VerveEditor::Controller.Duration );
|
||||
// Reset.
|
||||
$VerveEditor::Controller.reset( %time );
|
||||
}
|
||||
|
||||
function VerveEditor::StepB()
|
||||
{
|
||||
// Switch TimeScale.
|
||||
$VerveEditor::Controller.TimeScale *= -1.0;
|
||||
// Step.
|
||||
VerveEditor::StepF();
|
||||
// Switch Back TimeScale.
|
||||
$VerveEditor::Controller.TimeScale *= -1.0;
|
||||
}
|
||||
|
||||
function VerveEditor::Rewind()
|
||||
{
|
||||
if ( $VerveEditor::Controller.TimeScale > 0 )
|
||||
{
|
||||
// Front.
|
||||
$VerveEditor::Controller.reset( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Back.
|
||||
$VerveEditor::Controller.reset( $VerveEditor::Controller.Duration );
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditor::Forward()
|
||||
{
|
||||
if ( $VerveEditor::Controller.TimeScale < 0 )
|
||||
{
|
||||
// Front.
|
||||
$VerveEditor::Controller.reset( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Back.
|
||||
$VerveEditor::Controller.reset( $VerveEditor::Controller.Duration );
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditor::InsertTimeFront()
|
||||
{
|
||||
%time = 0;
|
||||
%length = 1000;
|
||||
|
||||
VerveEditor::InsertTime( %time, %length );
|
||||
}
|
||||
|
||||
function VerveEditor::InsertTimeBack()
|
||||
{
|
||||
%time = $VerveEditor::Controller.Duration;
|
||||
%length = 1000;
|
||||
|
||||
VerveEditor::InsertTime( %time, %length );
|
||||
}
|
||||
|
||||
function VerveEditor::InsertTime( %time, %length )
|
||||
{
|
||||
if ( %length <= 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Group History Actions.
|
||||
VerveEditor::ToggleHistoryGroup();
|
||||
|
||||
// Increase Duration.
|
||||
$VerveEditor::Controller.setFieldValue( "Duration", $VerveEditor::Controller.Duration + %length );
|
||||
|
||||
%groupSet = $VerveEditor::Controller;
|
||||
%groupCount = %groupSet.getCount();
|
||||
for ( %i = 0; %i < %groupCount; %i++ )
|
||||
{
|
||||
%trackSet = %groupSet.getObject( %i );
|
||||
%trackCount = %trackSet.getCount();
|
||||
for ( %j = 0; %j < %trackCount; %j++ )
|
||||
{
|
||||
%eventSet = %trackSet.getObject( %j );
|
||||
%eventCount = %eventSet.getCount();
|
||||
for ( %k = 0; %k < %eventCount; %k++ )
|
||||
{
|
||||
%eventSet.getObject( %k ).InsertTime( %time, %length );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( %time < $VerveEditor::Controller.Time )
|
||||
{
|
||||
// Update Time.
|
||||
$VerveEditor::Controller.setFieldValue( "Time", $VerveEditor::Controller.Time + %length );
|
||||
}
|
||||
|
||||
// Finish Up.
|
||||
VerveEditor::ToggleHistoryGroup();
|
||||
}
|
||||
|
||||
function VerveEditor::DeleteTime( %time, %length )
|
||||
{
|
||||
if ( %length <= 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Group History Actions.
|
||||
VerveEditor::ToggleHistoryGroup();
|
||||
|
||||
%groupSet = $VerveEditor::Controller;
|
||||
%groupCount = %groupSet.getCount();
|
||||
for ( %i = 0; %i < %groupCount; %i++ )
|
||||
{
|
||||
%trackSet = %groupSet.getObject( %i );
|
||||
%trackCount = %trackSet.getCount();
|
||||
for ( %j = 0; %j < %trackCount; %j++ )
|
||||
{
|
||||
%eventSet = %trackSet.getObject( %j );
|
||||
%eventCount = %eventSet.getCount();
|
||||
for ( %k = 0; %k < %eventCount; %k++ )
|
||||
{
|
||||
%eventObject = %eventSet.getObject( %k );
|
||||
if ( %eventObject.DeleteTime( %time, %length ) )
|
||||
{
|
||||
// Delete.
|
||||
%eventObject.delete();
|
||||
|
||||
// Backstep.
|
||||
%k -= 1;
|
||||
%eventCount -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Decrease Duration.
|
||||
$VerveEditor::Controller.setFieldValue( "Duration", $VerveEditor::Controller.Duration - %length );
|
||||
|
||||
if ( $VerveEditor::Controller.Time > %time && $VerveEditor::Controller.Time < ( %time + %length ) )
|
||||
{
|
||||
// Clamp.
|
||||
$VerveEditor::Controller.setFieldValue( "Time", %time );
|
||||
}
|
||||
else if ( $VerveEditor::Controller.Time >= ( %time + %length ) )
|
||||
{
|
||||
// Push Back.
|
||||
$VerveEditor::Controller.setFieldValue( "Time", $VerveEditor::Controller.Time - %length );
|
||||
}
|
||||
|
||||
// Finish Up.
|
||||
VerveEditor::ToggleHistoryGroup();
|
||||
|
||||
// Refresh Editor.
|
||||
VerveEditor::Refresh();
|
||||
}
|
||||
|
||||
function VEvent::InsertTime( %this, %time, %length )
|
||||
{
|
||||
%triggerTime = %this.getFieldValue( "TriggerTime" );
|
||||
%triggerDuration = %this.getFieldValue( "Duration" );
|
||||
|
||||
if ( %time <= %triggerTime )
|
||||
{
|
||||
%this.setFieldValue( "TriggerTime", %triggerTime + %length );
|
||||
}
|
||||
else if ( %time > %triggerTime && %time < %triggerTime + %triggerDuration )
|
||||
{
|
||||
%this.setFieldValue( "Duration", %triggerDuration + %length );
|
||||
}
|
||||
}
|
||||
|
||||
function VEvent::DeleteTime( %this, %time, %length )
|
||||
{
|
||||
%triggerTime = %this.getFieldValue( "TriggerTime" );
|
||||
%triggerDuration = %this.getFieldValue( "Duration" );
|
||||
|
||||
if ( %triggerTime >= %time && %triggerTime <= ( %time + %length ) )
|
||||
{
|
||||
%tail = ( %triggerTime + %triggerDuration ) - ( %time + %length );
|
||||
if ( %tail > 0 )
|
||||
{
|
||||
// Trim Duration.
|
||||
%this.setFieldValue( "TriggerTime", %time );
|
||||
%this.setFieldValue( "Duration", %tail );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Delete This Event.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( %triggerTime > %time )
|
||||
{
|
||||
// Shuffle Back.
|
||||
%this.setFieldValue( "TriggerTime", %triggerTime - %length );
|
||||
}
|
||||
else if ( %triggerTime < %time && ( %triggerTime + %triggerDuration ) > %time )
|
||||
{
|
||||
// Trim Duration.
|
||||
%this.setFieldValue( "Duration", ( %triggerTime + %triggerDuration ) - %time );
|
||||
}
|
||||
|
||||
// No Delete.
|
||||
return false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorController::CanPaste( %this, %targetObject )
|
||||
{
|
||||
if ( !isObject( %targetObject ) )
|
||||
{
|
||||
// Nope!
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !%this.CanAdd( %targetObject.getClassName() ) )
|
||||
{
|
||||
// Nope!
|
||||
return false;
|
||||
}
|
||||
|
||||
return %targetObject.isMemberOfClass( "VGroup" );
|
||||
}
|
||||
|
||||
function VerveEditorController::CanAdd( %this, %targetClass )
|
||||
{
|
||||
if ( !isWordInList( %targetClass, $VerveEditor::UniqueGroupList ) )
|
||||
{
|
||||
// Not a Unique Group.
|
||||
return true;
|
||||
}
|
||||
|
||||
%groupCount = %this.getCount();
|
||||
for ( %i = 0; %i < %groupCount; %i++ )
|
||||
{
|
||||
%groupObject = %this.getObject( %i );
|
||||
if ( %groupObject.isMemberOfClass( %targetClass ) )
|
||||
{
|
||||
// Invalid.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// All Good.
|
||||
return true;
|
||||
}
|
||||
|
||||
function VerveEditorController::onPlay( %this )
|
||||
{
|
||||
// Update Play Button.
|
||||
VerveEditorPlayButton.setBitmap( "tools/VerveEditor/GUI/Images/btn_Pause" );
|
||||
|
||||
// Start Update Event.
|
||||
VerveEditorTimeLine.ControllerUpdate();
|
||||
}
|
||||
|
||||
function VerveEditorController::onPause( %this )
|
||||
{
|
||||
// Update Play Button.
|
||||
VerveEditorPlayButton.setBitmap( "tools/VerveEditor/GUI/Images/btn_Play" );
|
||||
|
||||
// Stop Update Event.
|
||||
VerveEditorTimeLine.StopUpdate();
|
||||
}
|
||||
|
||||
function VerveEditorController::onStop( %this )
|
||||
{
|
||||
// Update Play Button.
|
||||
VerveEditorPlayButton.setBitmap( "tools/VerveEditor/GUI/Images/btn_Play" );
|
||||
|
||||
// Stop Update Event.
|
||||
VerveEditorTimeLine.StopUpdate();
|
||||
}
|
||||
|
||||
function VerveEditorController::OnFieldChange( %this, %fieldName, %oldValue, %newValue )
|
||||
{
|
||||
if ( !VerveEditorHistoryManager.Locked )
|
||||
{
|
||||
// Add History Item.
|
||||
%historyObject = new UndoScriptAction()
|
||||
{
|
||||
Class = "VerveEditorHistoryChangeProperty";
|
||||
SuperClass = "VerveEditorHistoryObject";
|
||||
|
||||
ActionName = "Change Property (" @ %fieldName @ ")";
|
||||
|
||||
// Store References.
|
||||
Object = %this;
|
||||
FieldName = %fieldName;
|
||||
OldValue = %oldValue;
|
||||
NewValue = %newValue;
|
||||
};
|
||||
}
|
||||
|
||||
switch$ ( %fieldName )
|
||||
{
|
||||
case "Duration" : VerveEditor::UpdateDuration();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,217 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VControllerPropertyList::CreateInspectorGroup( %this, %targetStack )
|
||||
{
|
||||
%baseGroup = Parent::CreateInspectorGroup( %this, %targetStack );
|
||||
if ( %baseGroup.getClassName() !$= "ScriptGroup" )
|
||||
{
|
||||
// Temp Store.
|
||||
%temp = %baseGroup;
|
||||
|
||||
// Create SimSet.
|
||||
%baseGroup = new SimSet();
|
||||
|
||||
// Add Original Control.
|
||||
%baseGroup.add( %temp );
|
||||
}
|
||||
|
||||
// Create Data Table Group.
|
||||
%groupRollout = %targetStack.CreatePropertyRollout( "VController DataTable" );
|
||||
%propertyStack = %groupRollout.Stack;
|
||||
|
||||
// Reference.
|
||||
%propertyStack.InternalName = "DataTableStack";
|
||||
|
||||
// Store.
|
||||
%baseGroup.add( %groupRollout );
|
||||
|
||||
// Return.
|
||||
return %baseGroup;
|
||||
}
|
||||
|
||||
function VControllerPropertyList::InspectObject( %this, %object )
|
||||
{
|
||||
if ( !%object.isMemberOfClass( "VController" ) )
|
||||
{
|
||||
// Invalid Object.
|
||||
return;
|
||||
}
|
||||
|
||||
// Default Inspect.
|
||||
Parent::InspectObject( %this, %object );
|
||||
|
||||
// Update Data Table.
|
||||
%dataTableStack = %this.ControlCache.findObjectByInternalName( "DataTableStack", true );
|
||||
if ( !isObject( %dataTableStack ) )
|
||||
{
|
||||
// Invalid Table.
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear Stack.
|
||||
while ( %dataTableStack.getCount() > 1 )
|
||||
{
|
||||
// Delete Object.
|
||||
%dataTableStack.getObject( 1 ).delete();
|
||||
}
|
||||
|
||||
%dataFieldCount = %object.getDataFieldCount();
|
||||
for ( %i = 0; %i < %dataFieldCount; %i++ )
|
||||
{
|
||||
// Add To List.
|
||||
%dataFieldList = trim( %dataFieldList SPC %object.getDataFieldName( %i ) );
|
||||
}
|
||||
|
||||
// Sort Word List.
|
||||
%dataFieldList = sortWordList( %dataFieldList );
|
||||
|
||||
for ( %i = 0; %i < %dataFieldCount; %i++ )
|
||||
{
|
||||
// Fetch Field Name.
|
||||
%dataFieldName = getWord( %dataFieldList, %i );
|
||||
|
||||
// Create Field.
|
||||
VerveEditor::CreateField( %dataTableStack, %dataFieldName, "Data" );
|
||||
}
|
||||
|
||||
// Create Add Field.
|
||||
VerveEditor::CreateAddDataField( %dataTableStack );
|
||||
|
||||
// Update.
|
||||
%dataTableStack.InspectObject( %object );
|
||||
}
|
||||
|
||||
function VController::DisplayContextMenu( %this, %x, %y )
|
||||
{
|
||||
%contextMenu = $VerveEditor::VController::ContextMenu;
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
%contextMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VControllerContextMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "Add Group" TAB "";
|
||||
|
||||
Item[1] = "" TAB "";
|
||||
|
||||
Item[2] = "Cu&t" TAB "" TAB "";
|
||||
Item[3] = "&Copy" TAB "" TAB "";
|
||||
Item[4] = "&Paste" TAB "" TAB "VerveEditor::Paste();";
|
||||
|
||||
Item[5] = "" TAB "";
|
||||
|
||||
Item[6] = "&Delete" TAB "" TAB "";
|
||||
|
||||
PasteIndex = 4;
|
||||
};
|
||||
%contextMenu.Init();
|
||||
|
||||
// Disable Cut, Copy & Delete.
|
||||
%contextMenu.enableItem( 2, false );
|
||||
%contextMenu.enableItem( 3, false );
|
||||
%contextMenu.enableItem( 6, false );
|
||||
|
||||
// Cache.
|
||||
$VerveEditor::VController::ContextMenu = %contextMenu;
|
||||
}
|
||||
|
||||
// Remove Add Menu.
|
||||
%contextMenu.removeItem( %contextMenu.AddIndex );
|
||||
|
||||
// Insert Menu.
|
||||
%contextMenu.insertSubMenu( %contextMenu.AddIndex, getField( %contextMenu.Item[0], 0 ), %this.GetAddGroupMenu() );
|
||||
|
||||
// Enable/Disable Pasting.
|
||||
%contextMenu.enableItem( %contextMenu.PasteIndex, VerveEditor::CanPaste() );
|
||||
|
||||
if ( %x $= "" || %y $= "" )
|
||||
{
|
||||
%position = %this.getGlobalPosition();
|
||||
%extent = %this.getExtent();
|
||||
|
||||
%x = getWord( %position, 0 ) + getWord( %extent, 0 );
|
||||
%y = getWord( %position, 1 );
|
||||
}
|
||||
|
||||
// Display.
|
||||
if($Verve::UseSeparateWindow)
|
||||
%contextMenu.showPopup( VerveEditorWindow, %x, %y );
|
||||
else
|
||||
%contextMenu.showPopup( Canvas, %x, %y );
|
||||
}
|
||||
|
||||
function VController::GetAddGroupMenu( %this )
|
||||
{
|
||||
%contextMenu = $VerveEditor::VController::ContextMenu[%this.getClassName()];
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
%customTemplateMenu = new PopupMenu()
|
||||
{
|
||||
Class = "VerveCustomTemplateMenu";
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VGroupAddGroupMenu";
|
||||
Position = 0;
|
||||
};
|
||||
%customTemplateMenu.Init();
|
||||
|
||||
%contextMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VGroupAddGroupMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "Add Camera Group" TAB "" TAB "VerveEditor::AddGroup(\"VCameraGroup\");";
|
||||
Item[1] = "Add Director Group" TAB "" TAB "VerveEditor::AddGroup(\"VDirectorGroup\");";
|
||||
Item[2] = "Add Light Object Group" TAB "" TAB "VerveEditor::AddGroup(\"VLightObjectGroup\");";
|
||||
Item[3] = "Add Particle Effect Group" TAB "" TAB "VerveEditor::AddGroup(\"VParticleEffectGroup\");";
|
||||
Item[4] = "Add Scene Object Group" TAB "" TAB "VerveEditor::AddGroup(\"VSceneObjectGroup\");";
|
||||
Item[5] = "Add Spawn Sphere Group" TAB "" TAB "VerveEditor::AddGroup(\"VSpawnSphereGroup\");";
|
||||
|
||||
Item[6] = "" TAB "";
|
||||
|
||||
Item[7] = "Add Custom Group" TAB %customTemplateMenu;
|
||||
|
||||
DirectorIndex = 1;
|
||||
CustomIndex = 7;
|
||||
CustomMenu = %customTemplateMenu;
|
||||
};
|
||||
%contextMenu.Init();
|
||||
|
||||
// Refresh Menu.
|
||||
%customTemplateMenu = %contextMenu.CustomMenu;
|
||||
if ( %customTemplateMenu.getItemCount() == 0 )
|
||||
{
|
||||
// Remove Item.
|
||||
%contextMenu.removeItem( %contextMenu.CustomIndex );
|
||||
|
||||
// Add Dummy.
|
||||
%contextMenu.insertItem( %contextMenu.CustomIndex, getField( %contextMenu.Item[%contextMenu.CustomIndex], 0 ) );
|
||||
|
||||
// Disable Custom Menu.
|
||||
%contextMenu.enableItem( %contextMenu.CustomIndex, false );
|
||||
}
|
||||
|
||||
// Cache.
|
||||
$VerveEditor::VController::ContextMenu[%this.getClassName()] = %contextMenu;
|
||||
}
|
||||
|
||||
// Enable / Disable Director Group.
|
||||
%contextMenu.enableItem( %contextMenu.DirectorIndex, %this.CanAdd( "VDirectorGroup" ) );
|
||||
|
||||
// Return Menu.
|
||||
return %contextMenu;
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::InitControllerScripts()
|
||||
{
|
||||
// Core.
|
||||
exec( "./VController.cs" );
|
||||
exec( "./VControllerProperties.cs" );
|
||||
|
||||
// Custom.
|
||||
// Exec Custom Controller Scripts.
|
||||
}
|
||||
VerveEditor::InitControllerScripts();
|
||||
|
|
@ -0,0 +1,241 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::DeleteControls()
|
||||
{
|
||||
while ( VerveEditorGroupStack.getCount() > 0 )
|
||||
{
|
||||
VerveEditorGroupStack.getObject( 0 ).delete();
|
||||
}
|
||||
|
||||
while ( VerveEditorTrackStack.getCount() > 0 )
|
||||
{
|
||||
VerveEditorTrackStack.getObject( 0 ).delete();
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditorStack::FindControl( %this, %object )
|
||||
{
|
||||
%trackCount = %this.getCount();
|
||||
for ( %i = 0; %i < %trackCount; %i++ )
|
||||
{
|
||||
%track = %this.getObject( %i );
|
||||
if ( %track.Proxy.getId() == %object.getId() )
|
||||
{
|
||||
return %track;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
function VerveEditorStack::FindControlIndex( %this, %object )
|
||||
{
|
||||
%trackCount = %this.getCount();
|
||||
for ( %i = 0; %i < %trackCount; %i++ )
|
||||
{
|
||||
%track = %this.getObject( %i );
|
||||
if ( %track.Proxy.getId() == %object.getId() )
|
||||
{
|
||||
return %i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorTimeLine::onLoseFirstResponder( %this )
|
||||
{
|
||||
// Clear Selection.
|
||||
%this.setSelection( false );
|
||||
|
||||
// Force OnSelectionUpdate.
|
||||
%this.onSelectionUpdate();
|
||||
}
|
||||
|
||||
function VerveEditorTimeLine::StopUpdate( %this )
|
||||
{
|
||||
// Cancel Event.
|
||||
cancel( $VerveEditor::Controller::TickEvent );
|
||||
}
|
||||
|
||||
function VerveEditorTimeLine::ControllerUpdate( %this )
|
||||
{
|
||||
// Cancel Event.
|
||||
cancel( $VerveEditor::Controller::TickEvent );
|
||||
|
||||
%scrollParent = %this.getParentOfType( "VEditorScrollControl" );
|
||||
if ( !isObject( %scrollParent ) )
|
||||
{
|
||||
// Woops!
|
||||
return;
|
||||
}
|
||||
|
||||
// Fetch Point.
|
||||
%point = %this.toPoint( $VerveEditor::Controller.Time );
|
||||
|
||||
// Fetch Scroll Point.
|
||||
%scrollPoint = %scrollParent.getScrollPositionX();
|
||||
%scrollWidth = getWord( %scrollParent.getExtent(), 0 ) - 19;
|
||||
|
||||
if ( ( %point < %scrollPoint ) || ( %point > ( %scrollPoint + %scrollWidth ) ) )
|
||||
{
|
||||
// Scroll To View Time.
|
||||
%scrollParent.setScrollPosition( %point - %scrollWidth * 0.50, 0 );
|
||||
}
|
||||
|
||||
// Schedule Next Event.
|
||||
$VerveEditor::Controller::TickEvent = %this.schedule( 100, "ControllerUpdate" );
|
||||
}
|
||||
|
||||
function VerveEditorTimeLine::onSelectionUpdate( %this )
|
||||
{
|
||||
// Fetch Selection.
|
||||
%selectionString = %this.getSelection();
|
||||
|
||||
%selectionActive = getWord( %selectionString, 0 );
|
||||
if ( !%selectionActive )
|
||||
{
|
||||
// Clear Selection.
|
||||
VerveEditorTrackTimeLine.setSelection( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !getWord( VerveEditorTrackTimeLine.getSelection(), 0 ) )
|
||||
{
|
||||
// Clear Editor Selection.
|
||||
VerveEditor::ClearSelection();
|
||||
}
|
||||
|
||||
// Set Selection.
|
||||
VerveEditorTrackTimeLine.setSelection( true, getWord( %selectionString, 1 ), getWord( %selectionString, 2 ) );
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditorTimeLine::onSelectionRightClick( %this, %point, %modifiers, %clickCount )
|
||||
{
|
||||
%this.DisplayContextMenu( getWord( %point, 0 ), getWord( %point, 1 ) );
|
||||
}
|
||||
|
||||
function VerveEditorTimeLine::DisplayContextMenu( %this, %x, %y )
|
||||
{
|
||||
%contextMenu = $VerveEditor::VTimeLine::ContextMenu;
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
%contextMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VTimeLineMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "Insert Time Before" TAB "" TAB "VerveEditorTimeLine.InsertTimeBefore();";
|
||||
Item[1] = "Insert Time After" TAB "" TAB "VerveEditorTimeLine.InsertTimeAfter();";
|
||||
|
||||
Item[2] = "" TAB "";
|
||||
|
||||
Item[3] = "Delete Time" TAB "" TAB "VerveEditorTimeLine.DeleteTime();";
|
||||
|
||||
};
|
||||
%contextMenu.Init();
|
||||
|
||||
// Cache.
|
||||
$VerveEditor::VTimeLine::ContextMenu = %contextMenu;
|
||||
}
|
||||
|
||||
// Display.
|
||||
if($Verve::UseSeparateWindow)
|
||||
%contextMenu.showPopup( VerveEditorWindow, %x, %y );
|
||||
else
|
||||
%contextMenu.showPopup( Canvas, %x, %y );
|
||||
|
||||
}
|
||||
|
||||
function VerveEditorTimeLine::InsertTimeBefore( %this )
|
||||
{
|
||||
// Fetch Selection.
|
||||
%selectionString = %this.getSelection();
|
||||
%selectionActive = getWord( %selectionString, 0 );
|
||||
if ( !%selectionActive )
|
||||
{
|
||||
// Woops!
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine Position.
|
||||
%selectionPosition = getWord( %selectionString, 1 );
|
||||
|
||||
// Insert Time.
|
||||
VerveEditor::InsertTime( %selectionPosition, getWord( %selectionString, 2 ) );
|
||||
}
|
||||
|
||||
function VerveEditorTimeLine::InsertTimeAfter( %this )
|
||||
{
|
||||
// Fetch Selection.
|
||||
%selectionString = %this.getSelection();
|
||||
%selectionActive = getWord( %selectionString, 0 );
|
||||
if ( !%selectionActive )
|
||||
{
|
||||
// Woops!
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine Position.
|
||||
%selectionPosition = getWord( %selectionString, 1 ) + getWord( %selectionString, 2 );
|
||||
|
||||
// Insert Time.
|
||||
VerveEditor::InsertTime( %selectionPosition, getWord( %selectionString, 2 ) );
|
||||
}
|
||||
|
||||
function VerveEditorTimeLine::DeleteTime( %this )
|
||||
{
|
||||
// Fetch Selection.
|
||||
%selectionString = %this.getSelection();
|
||||
%selectionActive = getWord( %selectionString, 0 );
|
||||
if ( !%selectionActive )
|
||||
{
|
||||
// Woops!
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine Position.
|
||||
%selectionPosition = getWord( %selectionString, 1 );
|
||||
|
||||
// Delete Time.
|
||||
VerveEditor::DeleteTime( %selectionPosition, getWord( %selectionString, 2 ) );
|
||||
|
||||
// Clear Selection.
|
||||
%this.setSelection( false );
|
||||
|
||||
// Force OnSelectionUpdate.
|
||||
%this.onSelectionUpdate();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorTimeLineBackground::onMouseUp( %this, %point, %modifiers, %clickCount )
|
||||
{
|
||||
// Clear Selection.
|
||||
VerveEditor::ClearSelection();
|
||||
}
|
||||
|
||||
function VerveEditorTimeLineBackground::onRightMouseUp( %this, %point, %modifiers, %clickCount )
|
||||
{
|
||||
// Clear Selection.
|
||||
VerveEditor::ClearSelection();
|
||||
|
||||
if ( !%this.Context )
|
||||
{
|
||||
// Return.
|
||||
return;
|
||||
}
|
||||
|
||||
// Display Context Menu.
|
||||
$VerveEditor::Controller.schedule( 32, "DisplayContextMenu", getWord( %point, 0 ), getWord( %point, 1 ) );
|
||||
}
|
||||
|
|
@ -0,0 +1,265 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$VerveEditor::HistoryManager = new UndoManager( VerveEditorHistoryManager );
|
||||
$VerveEditor::UndoCount = 0;
|
||||
$VerveEditor::RedoCount = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::IsDirty()
|
||||
{
|
||||
if ( !isObject( VerveEditorHistoryManager ) )
|
||||
{
|
||||
// Woops!
|
||||
return false;
|
||||
}
|
||||
|
||||
return !( ( VerveEditorHistoryManager.getUndoCount() == $VerveEditor::UndoCount )
|
||||
&& ( VerveEditorHistoryManager.getRedoCount() == $VerveEditor::RedoCount ) );
|
||||
}
|
||||
|
||||
function VerveEditor::ClearDirty()
|
||||
{
|
||||
// Reset.
|
||||
$VerveEditor::UndoCount = VerveEditorHistoryManager.getUndoCount();
|
||||
$VerveEditor::RedoCount = VerveEditorHistoryManager.getRedoCount();
|
||||
}
|
||||
|
||||
function VerveEditor::ClearHistory()
|
||||
{
|
||||
// Clear History.
|
||||
VerveEditorHistoryManager.clearAll();
|
||||
|
||||
// Clear Dirty.
|
||||
VerveEditor::ClearDirty();
|
||||
}
|
||||
|
||||
function VerveEditor::CanUndo()
|
||||
{
|
||||
return ( VerveEditorHistoryManager.getUndoCount() > 0 );
|
||||
}
|
||||
|
||||
function VerveEditor::Undo()
|
||||
{
|
||||
VerveEditorHistoryManager.Undo();
|
||||
|
||||
// Refresh.
|
||||
VerveEditor::Refresh();
|
||||
}
|
||||
|
||||
function VerveEditor::CanRedo()
|
||||
{
|
||||
return ( VerveEditorHistoryManager.getRedoCount() > 0 );
|
||||
}
|
||||
|
||||
function VerveEditor::Redo()
|
||||
{
|
||||
VerveEditorHistoryManager.Redo();
|
||||
|
||||
// Refresh.
|
||||
VerveEditor::Refresh();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorHistoryObject::onAdd( %this )
|
||||
{
|
||||
%historyManager = VerveEditorHistoryManager;
|
||||
if ( %historyManager.Locked )
|
||||
{
|
||||
// Delete.
|
||||
%this.schedule( 0, delete );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( isObject( %historyManager.HistoryGroup ) )
|
||||
{
|
||||
// Add To Group.
|
||||
%historyManager.HistoryGroup.Group.add( %this );
|
||||
return;
|
||||
}
|
||||
|
||||
// Add To Manager.
|
||||
%this.addToManager( %historyManager );
|
||||
|
||||
// Update Window.
|
||||
VerveEditorWindow.UpdateWindowTitle();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::ToggleHistoryGroup()
|
||||
{
|
||||
%historyManager = VerveEditorHistoryManager;
|
||||
if ( isObject( %historyManager.HistoryGroup ) )
|
||||
{
|
||||
// Clear.
|
||||
%historyManager.HistoryGroup = 0;
|
||||
|
||||
// Update Window.
|
||||
VerveEditorWindow.UpdateWindowTitle();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( VerveEditorHistoryManager.Locked )
|
||||
{
|
||||
// Locked.
|
||||
return;
|
||||
}
|
||||
|
||||
%historyManager.HistoryGroup = new UndoScriptAction()
|
||||
{
|
||||
Class = "VerveEditorHistoryGroup";
|
||||
|
||||
ActionName = "History Group";
|
||||
|
||||
// Store Object References.
|
||||
Group = new SimGroup();
|
||||
};
|
||||
|
||||
// Add To Manager.
|
||||
%historyManager.HistoryGroup.addToManager( %historyManager );
|
||||
}
|
||||
|
||||
function VerveEditorHistoryGroup::onRemove( %this )
|
||||
{
|
||||
if ( isObject( %this.Group ) )
|
||||
{
|
||||
// Delete Group.
|
||||
%this.Group.delete();
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditorHistoryGroup::Undo( %this )
|
||||
{
|
||||
// Undo In Reverse Order.
|
||||
|
||||
%undoCount = %this.Group.getCount();
|
||||
for ( %i = ( %undoCount - 1 ); %i >= 0; %i-- )
|
||||
{
|
||||
%this.Group.getObject( %i ).Undo();
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditorHistoryGroup::Redo( %this )
|
||||
{
|
||||
%undoCount = %this.Group.getCount();
|
||||
for ( %i = 0; %i < %undoCount; %i++ )
|
||||
{
|
||||
%this.Group.getObject( %i ).Redo();
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorHistoryCreateObject::Undo( %this )
|
||||
{
|
||||
// Undo Delete.
|
||||
%parentObject = %this.Parent;
|
||||
%object = %this.Object;
|
||||
|
||||
// Detach Object.
|
||||
%parentObject.removeObject( %object );
|
||||
}
|
||||
|
||||
function VerveEditorHistoryCreateObject::Redo( %this )
|
||||
{
|
||||
// Redo Delete.
|
||||
%parentObject = %this.Parent;
|
||||
%object = %this.Object;
|
||||
|
||||
// Attach Object.
|
||||
%parentObject.addObject( %object );
|
||||
}
|
||||
|
||||
function VerveEditorHistoryCreateObject::onRemove( %this )
|
||||
{
|
||||
/*
|
||||
if ( !isObject( %this.Object.getParent() ) || %this.Object.getParent().getId() != %this.Parent.getId() )
|
||||
{
|
||||
SimObject::Delete( %this.Object );
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorHistoryDeleteObject::Undo( %this )
|
||||
{
|
||||
// Undo Delete.
|
||||
%parentObject = %this.Parent;
|
||||
%object = %this.Object;
|
||||
|
||||
// Attach Object.
|
||||
%parentObject.addObject( %object );
|
||||
}
|
||||
|
||||
function VerveEditorHistoryDeleteObject::Redo( %this )
|
||||
{
|
||||
// Redo Delete.
|
||||
%parentObject = %this.Parent;
|
||||
%object = %this.Object;
|
||||
|
||||
// Detach Object.
|
||||
%parentObject.removeObject( %object );
|
||||
}
|
||||
|
||||
function VerveEditorHistoryDeleteObject::onRemove( %this )
|
||||
{
|
||||
/*
|
||||
if ( !isObject( %this.Object.getParent() ) || %this.Object.getParent().getId() != %this.Parent.getId() )
|
||||
{
|
||||
SimObject::Delete( %this.Object );
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorHistoryChangeProperty::Undo( %this )
|
||||
{
|
||||
// Undo Change.
|
||||
%object = %this.Object;
|
||||
%fieldName = %this.FieldName;
|
||||
%oldValue = %this.OldValue;
|
||||
|
||||
// Lock History.
|
||||
VerveEditorHistoryManager.Locked = true;
|
||||
|
||||
// Attach Object.
|
||||
%object.setFieldValue( %fieldName, %oldValue, false );
|
||||
|
||||
// Unlock History.
|
||||
VerveEditorHistoryManager.Locked = false;
|
||||
}
|
||||
|
||||
function VerveEditorHistoryChangeProperty::Redo( %this )
|
||||
{
|
||||
// Redo Change.
|
||||
%object = %this.Object;
|
||||
%fieldName = %this.FieldName;
|
||||
%newValue = %this.NewValue;
|
||||
|
||||
// Lock History.
|
||||
VerveEditorHistoryManager.Locked = true;
|
||||
|
||||
// Attach Object.
|
||||
%object.setFieldValue( %fieldName, %newValue, false );
|
||||
|
||||
// Unlock History.
|
||||
VerveEditorHistoryManager.Locked = false;
|
||||
}
|
||||
|
||||
function VerveEditorHistoryManager::Lock( %this )
|
||||
{
|
||||
%this.Locked = true;
|
||||
}
|
||||
|
||||
function VerveEditorHistoryManager::UnLock( %this )
|
||||
{
|
||||
%this.Locked = false;
|
||||
}
|
||||
261
Templates/BaseGame/game/tools/VerveEditor/Scripts/EditorMenu.cs
Normal file
|
|
@ -0,0 +1,261 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveWindowMenu::Clear( %this )
|
||||
{
|
||||
while ( %this.getItemCount() > 0 )
|
||||
{
|
||||
%this.removeItem( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
function VerveWindowMenu::Init( %this )
|
||||
{
|
||||
// Clear Items.
|
||||
%this.Clear();
|
||||
|
||||
%i = 0;
|
||||
while ( %this.Item[%i] !$= "" )
|
||||
{
|
||||
%itemString = %this.Item[%i];
|
||||
%itemLabel = getField( %itemString, 0 );
|
||||
%itemAccel = getField( %itemString, 1 );
|
||||
%itemMethod = getField( %itemString, 2 );
|
||||
%itemMap = getField( %itemString, 3 );
|
||||
|
||||
if ( !isObject( %itemMap ) )
|
||||
{
|
||||
%itemMap = VerveEditorMap;
|
||||
}
|
||||
|
||||
if ( isObject( %itemAccel ) )
|
||||
{
|
||||
%this.insertSubMenu( %i, %itemLabel, %itemAccel );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Insert Item.
|
||||
%this.insertItem( %i, %itemLabel, %itemAccel );
|
||||
|
||||
if ( !%this.IsPopup && %itemAccel !$= "" && isObject( %itemMap ) )
|
||||
{
|
||||
// Label Hack...
|
||||
switch$( %itemAccel )
|
||||
{
|
||||
case "DEL" : %itemAccel = "DELETE";
|
||||
case "ESC" : %itemAccel = "ESCAPE";
|
||||
}
|
||||
|
||||
// Perform Keybind.
|
||||
%itemMap.bindCmd( "keyboard", strreplace( %itemAccel, "+", " " ), %itemMethod, "" );
|
||||
}
|
||||
}
|
||||
|
||||
%i++;
|
||||
}
|
||||
}
|
||||
|
||||
function VerveWindowMenu::onSelectItem( %this, %id, %text )
|
||||
{
|
||||
%command = getField( %this.item[%id], 2 );
|
||||
if ( %command !$= "" )
|
||||
{
|
||||
eval( %command );
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorWindow::onCreateMenu( %this )
|
||||
{
|
||||
// Store Menu Bars.
|
||||
if ( !isObject( %this.MenuSet ) )
|
||||
{
|
||||
%this.MenuSet = new SimSet();
|
||||
}
|
||||
|
||||
// CMD Key.
|
||||
%cmdKey = $platform $= "macos" ? "Cmd" : "Ctrl";
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//
|
||||
// File Menu
|
||||
//
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
%recentSequenceMenu = new PopupMenu()
|
||||
{
|
||||
Class = "VerveRecentFileMenu";
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
Label = "Recent Files";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "None";
|
||||
};
|
||||
|
||||
%fileMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
Label = "&File";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "&New" TAB %cmdKey @ "+N" TAB "VerveEditor::NewFile();";
|
||||
Item[1] = "&Open" TAB %cmdKey @ "+O" TAB "VerveEditor::LoadFile();";
|
||||
Item[2] = "" TAB "";
|
||||
Item[3] = "&Save" TAB %cmdKey @ "+S" TAB "VerveEditor::SaveFile();";
|
||||
Item[4] = "Save &As" TAB %cmdKey @ "-Shift+S" TAB "VerveEditor::SaveFile( true );";
|
||||
Item[5] = "" TAB "";
|
||||
Item[6] = "Recent Files" TAB %recentSequenceMenu;
|
||||
};
|
||||
%this.MenuSet.add( %fileMenu );
|
||||
|
||||
if ( $platform !$= "macos" )
|
||||
{
|
||||
%fileMenu.Item[7] = "" TAB "";
|
||||
%fileMenu.Item[8] = "&Close" TAB %cmdKey @ "+F4" TAB "ToggleVerveEditor( true );";
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//
|
||||
// Edit Menu
|
||||
//
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
%editMenu = new PopupMenu()
|
||||
{
|
||||
Class = "VerveWindowEditMenu";
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
Label = "&Edit";
|
||||
Position = 1;
|
||||
|
||||
Item[0] = "&Undo" TAB %cmdKey @ "+Z" TAB "VerveEditor::Undo();";
|
||||
Item[1] = "&Redo" TAB %cmdKey @ "+Y" TAB "VerveEditor::Redo();";
|
||||
Item[2] = "" TAB "";
|
||||
Item[3] = "Cu&t" TAB %cmdKey @ "+X" TAB "VerveEditor::CutSelection();" TAB VerveEditorEditMap;
|
||||
Item[4] = "&Copy" TAB %cmdKey @ "+C" TAB "VerveEditor::CopySelection();" TAB VerveEditorEditMap;
|
||||
Item[5] = "&Paste" TAB %cmdKey @ "+V" TAB "VerveEditor::Paste();" TAB VerveEditorEditMap;
|
||||
|
||||
Item[6] = "" TAB "";
|
||||
Item[7] = "&Delete" TAB "Del" TAB "VerveEditor::DeleteSelection();" TAB VerveEditorEditMap;
|
||||
|
||||
Item[8] = "" TAB "";
|
||||
Item[9] = "&Clear Selection" TAB "Esc" TAB "VerveEditor::ClearSelection();";
|
||||
|
||||
Item[10] = "" TAB "";
|
||||
Item[11] = "&Preferences" TAB %cmdKey @ "+P" TAB "VerveEditor::LaunchEditorPreferences();";
|
||||
};
|
||||
%this.MenuSet.add( %editMenu );
|
||||
|
||||
// Init Popups.
|
||||
%fileMenu.Init();
|
||||
%editMenu.Init();
|
||||
|
||||
// Attach.
|
||||
%fileMenu.attachToMenuBar( %this, %fileMenu.Position, %fileMenu.Label );
|
||||
%editMenu.attachToMenuBar( %this, %editMenu.Position, %editMenu.Label );
|
||||
}
|
||||
|
||||
function VerveEditorWindow::ClearMenu( %this )
|
||||
{
|
||||
if ( isObject( %this.MenuSet ) )
|
||||
{
|
||||
while( %this.MenuSet.getCount() > 0 )
|
||||
{
|
||||
// Fetch Object.
|
||||
%menuObject = %this.MenuSet.getObject( 0 );
|
||||
|
||||
// Detach.
|
||||
%menuObject.removeFromMenuBar();
|
||||
|
||||
// Delete.
|
||||
%menuObject.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditorWindow::onDestroyMenu( %this )
|
||||
{
|
||||
// Clear the Menu.
|
||||
%this.ClearMenu();
|
||||
|
||||
// Delete the Menu Set.
|
||||
if ( isObject( %this.MenuSet ) )
|
||||
{
|
||||
%this.MenuSet.delete();
|
||||
}
|
||||
}
|
||||
|
||||
function VerveRecentFileMenu::onMenuSelect( %this )
|
||||
{
|
||||
%this.Refresh();
|
||||
}
|
||||
|
||||
function VerveRecentFileMenu::onSelectItem( %this, %index, %text )
|
||||
{
|
||||
// Load the File.
|
||||
VerveEditor::LoadFile( $Pref::VerveEditor::RecentFile[ %index ] );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function VerveRecentFileMenu::Refresh( %this )
|
||||
{
|
||||
// Clear The List.
|
||||
%this.Clear();
|
||||
|
||||
// Populate Menu.
|
||||
if ( $Pref::VerveEditor::RecentFileSize == 0 || $Pref::VerveEditor::RecentFile[0] $= "" )
|
||||
{
|
||||
// Insert Default Item.
|
||||
%this.insertItem( 0, %this.Item[0], "" );
|
||||
|
||||
// Disable.
|
||||
%this.enableItem( 0, false );
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( %i = 0; %i < $Pref::VerveEditor::RecentFileSize; %i++ )
|
||||
{
|
||||
// Valid?
|
||||
if ( $Pref::VerveEditor::RecentFile[%i] $= "" )
|
||||
{
|
||||
// Nope!
|
||||
break;
|
||||
}
|
||||
|
||||
// Insert Item.
|
||||
%this.insertItem( %i, makeRelativePath( $Pref::VerveEditor::RecentFile[%i], $VerveEditor::FilePath ), "" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function VerveWindowEditMenu::onMenuSelect( %this )
|
||||
{
|
||||
%this.Refresh();
|
||||
}
|
||||
|
||||
function VerveWindowEditMenu::Refresh( %this )
|
||||
{
|
||||
// Undo & Redo.
|
||||
%this.enableItem( 0, VerveEditor::CanUndo() );
|
||||
%this.enableItem( 1, VerveEditor::CanRedo() );
|
||||
|
||||
// Cut, Copy & Paste.
|
||||
%this.enableItem( 3, VerveEditor::CanCopy() );
|
||||
%this.enableItem( 4, VerveEditor::CanCopy() );
|
||||
%this.enableItem( 5, VerveEditor::CanPaste() );
|
||||
|
||||
// Delete.
|
||||
%this.enableItem( 7, VerveEditor::CanCopy() );
|
||||
|
||||
// Clear Selection.
|
||||
%this.enableItem( 9, VerveEditor::CanCopy() );
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::LaunchEditorPreferences()
|
||||
{
|
||||
if ( !isObject( VerveEditorPreferenceGui ) )
|
||||
{
|
||||
// Load the GUI.
|
||||
exec ( "~/VerveEditor/GUI/VerveEditorPreferences.gui" );
|
||||
}
|
||||
|
||||
// Awake?
|
||||
if ( VerveEditorPreferenceGui.isAwake() )
|
||||
{
|
||||
// Sanity!.
|
||||
return;
|
||||
}
|
||||
|
||||
// Launch.
|
||||
VerveEditorWindow.pushDialog( VerveEditorPreferenceGui );
|
||||
}
|
||||
|
||||
function VerveEditor::CloseEditorPreferences()
|
||||
{
|
||||
// Close.
|
||||
VerveEditorWindow.popDialog( VerveEditorPreferenceGui );
|
||||
}
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$VerveEditor::MapStore = new SimSet();
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorWindow::Open()
|
||||
{
|
||||
if ( isObject( VerveEditorWindow ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Create the Controller.
|
||||
VerveEditor::CreateController();
|
||||
|
||||
// Create ActionMap.
|
||||
%actionMap = new ActionMap( VerveEditorMap );
|
||||
%actionMap.pop();
|
||||
|
||||
// Create Edit ActionMap.
|
||||
%editActionMap = new ActionMap( VerveEditorEditMap );
|
||||
%editActionMap.pop();
|
||||
|
||||
// Create Window.
|
||||
if($Verve::UseSeparateWindow)
|
||||
{
|
||||
%editorWindow = new VEditorWindow( VerveEditorWindow );
|
||||
|
||||
// Init Window?
|
||||
if ( $Pref::VerveEditor::WindowSize $= "" )
|
||||
{
|
||||
// Default Window Size.
|
||||
%editorWindow.setVideoMode( 800, 253, false );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Last Known Window Size.
|
||||
%editorWindow.setVideoMode( getWord( $Pref::VerveEditor::WindowSize, 0 ),
|
||||
getWord( $Pref::VerveEditor::WindowSize, 1 ),
|
||||
false );
|
||||
}
|
||||
|
||||
return %editorWindow;
|
||||
}
|
||||
else
|
||||
{
|
||||
%editorWindow = new guiWindowCtrl(VerveEditorWindow)
|
||||
{
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
};
|
||||
return %editorWindow;
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditorWindow::UpdateWindowTitle( %this )
|
||||
{
|
||||
%fileName = fileName( $VerveEditor::Controller.FileName );
|
||||
if ( %fileName $= "" )
|
||||
{
|
||||
%fileName = "Untitled.vsf";
|
||||
}
|
||||
|
||||
if ( VerveEditor::IsDirty() )
|
||||
{
|
||||
// Signify Unsaved Work.
|
||||
%fileName = %fileName @ "*";
|
||||
}
|
||||
|
||||
// Set Title.
|
||||
%this.setWindowTitle( %fileName SPC "- Verve" );
|
||||
}
|
||||
|
||||
function VerveEditorWindow::onGainFocus( %this )
|
||||
{
|
||||
if($Verve::UseSeparateWindow)
|
||||
return;
|
||||
|
||||
%activeSet = ActiveActionMapSet;
|
||||
while ( %activeSet.getCount() > 0 )
|
||||
{
|
||||
// Get Object.
|
||||
%activeMap = %activeSet.getObject( 0 );
|
||||
|
||||
// Pop It.
|
||||
%activeMap.pop();
|
||||
|
||||
if ( %activeMap != GlobalActionMap.getId() )
|
||||
{
|
||||
// Store It.
|
||||
$VerveEditor::MapStore.add( %activeMap );
|
||||
}
|
||||
}
|
||||
|
||||
// Give Our Commands Preference.
|
||||
GlobalActionMap.pop();
|
||||
VerveEditorMap.push();
|
||||
VerveEditorEditMap.push();
|
||||
GlobalActionMap.push();
|
||||
|
||||
// Reset Cursor.
|
||||
%this.resetCursor();
|
||||
}
|
||||
|
||||
function VerveEditorWindow::onLoseFocus( %this )
|
||||
{
|
||||
%activeSet = $VerveEditor::MapStore;
|
||||
// Active Set?
|
||||
if ( isObject( %activeSet ) )
|
||||
{
|
||||
while ( %activeSet.getCount() > 0 )
|
||||
{
|
||||
// Get Object.
|
||||
%activeMap = %activeSet.getObject( 0 );
|
||||
|
||||
// Push It.
|
||||
%activeMap.push();
|
||||
|
||||
// Remove It.
|
||||
$VerveEditor::MapStore.remove( %activeMap );
|
||||
}
|
||||
}
|
||||
|
||||
// Valid Map?
|
||||
if ( isObject( VerveEditorMap ) )
|
||||
{
|
||||
VerveEditorMap.pop();
|
||||
}
|
||||
|
||||
// Valid Map?
|
||||
if ( isObject( VerveEditorEditMap ) )
|
||||
{
|
||||
VerveEditorEditMap.pop();
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditorWindow::onRemove( %this )
|
||||
{
|
||||
// Save?
|
||||
// Note: This crashes the game!
|
||||
// At this stage, if the editor is dirty a save prompt should have
|
||||
// been made already... Lets hope!
|
||||
//VerveEditor::SavePrompt();
|
||||
|
||||
// Clear Inspector.
|
||||
VerveEditorPropertyStack.ClearStack();
|
||||
|
||||
if ( isObject( VerveEditorMap ) )
|
||||
{
|
||||
VerveEditorMap.delete();
|
||||
}
|
||||
|
||||
if ( isObject( VerveEditorEditMap ) )
|
||||
{
|
||||
VerveEditorEditMap.delete();
|
||||
}
|
||||
|
||||
// Clear the Menu.
|
||||
%this.ClearMenu();
|
||||
|
||||
// Force Reset.
|
||||
%this.onLoseFocus();
|
||||
|
||||
// Store the Window Extents on Shutdown.
|
||||
$Pref::VerveEditor::WindowSize = getWords( %this.getVideoMode(), 0, 1 );
|
||||
|
||||
// Playing?
|
||||
if ( $VerveEditor::Controller.isPlaying() )
|
||||
{
|
||||
// Stop, but do not reset.
|
||||
$VerveEditor::Controller.stop( false );
|
||||
}
|
||||
|
||||
// Clear the Current Sequence.
|
||||
$VerveEditor::Controller.clear();
|
||||
// Clear the File Name.
|
||||
$VerveEditor::Controller.FileName = "";
|
||||
|
||||
/*
|
||||
// Delete the Controller.
|
||||
VerveEditor::DeleteController();
|
||||
*/
|
||||
|
||||
if ( isFile( $VerveEditor::TemplateVClipboard ) )
|
||||
{
|
||||
// Clear Clipboard.
|
||||
fileDelete( $VerveEditor::TemplateVClipboard );
|
||||
}
|
||||
|
||||
// World Editor Initialised?
|
||||
if ( isObject( VerveEditorPlugin.ToolbarButton ) )
|
||||
{
|
||||
// Toggle Off the Plugin Button.
|
||||
VerveEditorPlugin.ToolbarButton.setStateOn( false );
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditorWindow::onWindowClose( %this )
|
||||
{
|
||||
if ( !VerveEditor::SavePromptCancel() )
|
||||
{
|
||||
// Don't Close.
|
||||
return;
|
||||
}
|
||||
|
||||
// Delete Window.
|
||||
%this.schedule( 0, delete );
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VCameraShakeEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventDPropertyList";
|
||||
|
||||
Group[0] = "VCameraShakeEvent";
|
||||
Field[0, 0] = "Falloff";
|
||||
Field[0, 1] = "Amplitude";
|
||||
Field[0, 2] = "Frequency";
|
||||
};
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VDirectorEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventPropertyList";
|
||||
|
||||
Group[0] = "VDirectorEvent";
|
||||
Field[0, 0] = "Label";
|
||||
Field[0, 1] = "Target";
|
||||
Type[0, 1] = "VCameraGroupEnum";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VDirectorEvent::onRemove( %this )
|
||||
{
|
||||
// Schedule Update.
|
||||
%this.getParent().schedule( 0, "update" );
|
||||
}
|
||||
|
||||
function VDirectorEvent::Refresh( %this, %trackContainer )
|
||||
{
|
||||
// Create Control.
|
||||
%eventButton = Parent::Refresh( %this, %trackContainer );
|
||||
|
||||
// Reference Label.
|
||||
%eventButton.LabelField = "EventLabel";
|
||||
|
||||
// Add Field Notify.
|
||||
%this.AddFieldNotify( "EventLabel", %eventButton );
|
||||
|
||||
// Update Label.
|
||||
%this.UpdateLabel();
|
||||
}
|
||||
|
||||
function VDirectorEvent::OnFieldChange( %this, %fieldName, %oldValue, %newValue )
|
||||
{
|
||||
// Parent Callback.
|
||||
Parent::OnFieldChange( %this, %fieldName, %oldValue, %newValue );
|
||||
|
||||
// Fetch Parent.
|
||||
%parent = %this.getParent();
|
||||
if ( !isObject( %parent ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch$( %fieldName )
|
||||
{
|
||||
case "TriggerTime" : %parent.Update();
|
||||
|
||||
case "Duration" : %parent.Update();
|
||||
|
||||
case "Target" : %this.UpdateLabel();
|
||||
|
||||
case "Label" : %this.UpdateLabel();
|
||||
}
|
||||
}
|
||||
|
||||
function VDirectorEvent::UpdateLabel( %this )
|
||||
{
|
||||
// Valid Target Camera?
|
||||
%targetLabel = %this.Target;
|
||||
if ( %targetLabel $= "" )
|
||||
{
|
||||
%targetLabel = "Invalid Target";
|
||||
}
|
||||
|
||||
// Valid Scene Label?
|
||||
if ( %this.Label !$= "" )
|
||||
{
|
||||
%eventLabel = %this.Label @ ": " @ %targetLabel;
|
||||
}
|
||||
else
|
||||
{
|
||||
%eventLabel = %targetLabel;
|
||||
}
|
||||
|
||||
// Set Value.
|
||||
%this.setFieldValue( "EventLabel", %eventLabel );
|
||||
}
|
||||
|
||||
function VDirectorEvent::getSnapTime( %this, %targetTime )
|
||||
{
|
||||
// Don't Snap to Other Events.
|
||||
|
||||
if ( $VerveEditor::Event::SnapTime > 0 )
|
||||
{
|
||||
// Snap.
|
||||
return mRound( %targetTime, $VerveEditor::Event::SnapTime );
|
||||
}
|
||||
|
||||
// No Snap!
|
||||
return %targetTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,314 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
//Parent = "VObjectPropertyList";
|
||||
|
||||
Group[0] = "VEvent";
|
||||
Field[0, 0] = "TriggerTime";
|
||||
};
|
||||
|
||||
new ScriptObject( VEventDPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
//Parent = "VObjectPropertyList";
|
||||
|
||||
Group[0] = "VEvent";
|
||||
Field[0, 0] = "TriggerTime";
|
||||
Field[0, 1] = "Duration";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VEvent::CanCopy( %this, %targetObject )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
function VEvent::CanPaste( %this, %targetObject )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
function VEvent::Refresh( %this, %trackContainer )
|
||||
{
|
||||
// Store Container Reference.
|
||||
%this.TrackContainer = %trackContainer;
|
||||
|
||||
// Create Control.
|
||||
return VerveEditor::CreateEventControl( %this );
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::CreateEventControl( %object )
|
||||
{
|
||||
%eventButton = new VEditorButton()
|
||||
{
|
||||
SuperClass = "VEditorSelectable";
|
||||
Class = "VEditorSelectableEvent";
|
||||
Profile = "VEditorEventProfile";
|
||||
|
||||
HorizSizing = "right";
|
||||
VertSizing = "center";
|
||||
Position = "0 2";
|
||||
Extent = "5 22";
|
||||
MinExtent = "1 22";
|
||||
|
||||
ButtonType = "ToggleButton";
|
||||
GroupNum = "-1";
|
||||
|
||||
// No Text.
|
||||
Text = "";
|
||||
|
||||
// Draggable.
|
||||
IsDraggable = "1";
|
||||
};
|
||||
%object.TrackContainer.add( %eventButton );
|
||||
|
||||
// Reference Proxy.
|
||||
%eventButton.Proxy = %object;
|
||||
|
||||
// Reference Control.
|
||||
%object.Control = %eventButton;
|
||||
|
||||
// Field Notify.
|
||||
%object.AddFieldNotify( "TriggerTime", %eventButton );
|
||||
%object.AddFieldNotify( "Duration", %eventButton );
|
||||
|
||||
return %eventButton;
|
||||
}
|
||||
|
||||
function VEditorSelectableEvent::onMouseDown( %this, %point, %modifiers, %clickCount )
|
||||
{
|
||||
// Fetch Global Position.
|
||||
%globalPosition = %this.getGlobalPosition();
|
||||
|
||||
// Get Local Points.
|
||||
%x = getWord( %point, 0 ) - getWord( %globalPosition, 0 );
|
||||
%y = getWord( %point, 1 ) - getWord( %globalPosition, 1 );
|
||||
|
||||
// Store Mouse Down Point.
|
||||
%this.MouseDown = %x SPC %y;
|
||||
|
||||
// Reset.
|
||||
%this.Proxy.DragModify = false;
|
||||
}
|
||||
|
||||
function VEditorSelectableEvent::onMouseDragged( %this, %point, %modifiers, %clickCount )
|
||||
{
|
||||
if ( !%this.Proxy.DragModify )
|
||||
{
|
||||
// Store Original Time.
|
||||
%this.Proxy.DragTime = %this.Proxy.TriggerTime;
|
||||
|
||||
// Set Selection.
|
||||
VerveEditor::SetSelection( %this );
|
||||
}
|
||||
|
||||
// Fetch Track.
|
||||
%trackControl = %this.Proxy.getParent().Control.SiblingControl;
|
||||
|
||||
// Mouse Position.
|
||||
%mousePosition = getWord( %point, 0 ) - getWord( %trackControl.getGlobalPosition(), 0 ) - getWord( %this.MouseDown, 0 );
|
||||
|
||||
// Fetch Time.
|
||||
%time = mClamp( VerveEditorTimeLine.toTime( %mousePosition ), 0, $VerveEditor::Controller.Duration );
|
||||
|
||||
// Apply.
|
||||
%this.Proxy.SnapToTime( %time, true );
|
||||
}
|
||||
|
||||
function VEditorSelectableEvent::onMouseUp( %this, %point, %modifiers, %clickCount )
|
||||
{
|
||||
Parent::onMouseUp( %this, %point, %modifiers, %clickCount );
|
||||
|
||||
if ( %this.Proxy.DragModify )
|
||||
{
|
||||
// Store New Time.
|
||||
%newTime = %this.Proxy.TriggerTime;
|
||||
|
||||
// Reset Value.
|
||||
%this.Proxy.TriggerTime = %this.Proxy.DragTime;
|
||||
|
||||
// Set Value.
|
||||
%this.Proxy.setFieldValue( "TriggerTime", %newTime );
|
||||
|
||||
// Clear Modify.
|
||||
%this.Proxy.DragModify = false;
|
||||
}
|
||||
}
|
||||
|
||||
function VEvent::getSnapTime( %this, %targetTime )
|
||||
{
|
||||
if ( $Pref::VerveEditor::Event::SnapToSiblings && $Pref::VerveEditor::Event::SnapToSiblingThreshold > 0 )
|
||||
{
|
||||
// Iterate Over Sibling Events.
|
||||
%trackObject = %this.getParent();
|
||||
%eventCount = %trackObject.getCount();
|
||||
for ( %i = 0; %i < %eventCount; %i++ )
|
||||
{
|
||||
%eventObject = %trackObject.getObject( %i );
|
||||
if ( %eventObject.getId() == %this.getId() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Snap Back -> Front.
|
||||
%snapTime = %eventObject.TriggerTime - %this.Duration;
|
||||
if ( mAbs( %targetTime - %snapTime ) < $Pref::VerveEditor::Event::SnapToSiblingThreshold / 2 )
|
||||
{
|
||||
// Snap.
|
||||
return %snapTime;
|
||||
}
|
||||
|
||||
/*
|
||||
// Overlaping?
|
||||
if ( ( %this.TriggerTime + %this.Duration ) > %eventObject.TriggerTime )
|
||||
{
|
||||
// Snap.
|
||||
return %snapTime;
|
||||
}
|
||||
*/
|
||||
|
||||
// Snap Front -> Back
|
||||
%snapTime = %eventObject.TriggerTime + %eventObject.Duration;
|
||||
if ( mAbs( %targetTime - %snapTime ) < $Pref::VerveEditor::Event::SnapToSiblingThreshold / 2 )
|
||||
{
|
||||
// Snap.
|
||||
return %snapTime;
|
||||
}
|
||||
|
||||
/*
|
||||
// Overlaping?
|
||||
if ( %this.TriggerTime < ( %eventObject.TriggerTime + %eventObject.Duration ) )
|
||||
{
|
||||
// Snap.
|
||||
return %snapTime;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
if ( $Pref::VerveEditor::Event::SnapToTime && $Pref::VerveEditor::Event::SnapToTimeThreshold > 0 )
|
||||
{
|
||||
// Snap.
|
||||
return mRound( %targetTime, $Pref::VerveEditor::Event::SnapToTimeThreshold );
|
||||
}
|
||||
|
||||
// No Snap!
|
||||
return %targetTime;
|
||||
}
|
||||
|
||||
function VEvent::SnapToTime( %this, %targetTime, %dragged )
|
||||
{
|
||||
// Fetch Duration.
|
||||
%duration = %this.Duration;
|
||||
|
||||
// Nasty Hack.
|
||||
if ( %this.isMemberOfClass( "VDirectorEvent" )
|
||||
|| %this.isMemberOfClass( "VShapeAnimationEvent" ) )
|
||||
{
|
||||
// Clear Duration.
|
||||
%duration = 0;
|
||||
}
|
||||
|
||||
// Snap.
|
||||
%targetTime = %this.getSnapTime( %targetTime );
|
||||
|
||||
if ( %dragged )
|
||||
{
|
||||
if ( %targetTime != %this.TriggerTime )
|
||||
{
|
||||
// Flag Modified.
|
||||
%this.DragModify = true;
|
||||
}
|
||||
|
||||
// Lock History.
|
||||
VerveEditorHistoryManager.Locked = true;
|
||||
|
||||
// Set Time.
|
||||
%this.setFieldValue( "TriggerTime", %targetTime );
|
||||
|
||||
// UnLock History.
|
||||
VerveEditorHistoryManager.Locked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set Time.
|
||||
%this.setFieldValue( "TriggerTime", %targetTime );
|
||||
}
|
||||
}
|
||||
|
||||
function VEditorSelectableEvent::Update( %this, %fieldName, %fieldValue )
|
||||
{
|
||||
if ( %this.LabelField !$= "" && %this.LabelField $= %fieldName )
|
||||
{
|
||||
// Apply Text.
|
||||
%this.Text = %fieldValue;
|
||||
|
||||
// Return.
|
||||
return;
|
||||
}
|
||||
|
||||
%eventTime = %this.Proxy.getFieldValue( "TriggerTime" );
|
||||
%eventDuration = %this.Proxy.getFieldValue( "Duration" );
|
||||
switch$ ( %fieldName )
|
||||
{
|
||||
case "TriggerTime" : %eventTime = %fieldValue;
|
||||
|
||||
case "Duration" : %eventDuration = %fieldValue;
|
||||
}
|
||||
|
||||
// Update Position
|
||||
%controlPositionX = VerveEditorTimeLine.toPoint( %eventTime );
|
||||
%controlPositionX += ( %eventDuration == 0 ) ? ( -2 ) : 0;
|
||||
|
||||
// Update Extent.
|
||||
%controlExtentX = ( %eventDuration == 0 ) ? 5 : ( VerveEditorTimeLine.toPoint( %eventTime + %eventDuration ) - %controlPositionX );
|
||||
|
||||
%this.setPosition( %controlPositionX, getWord( %this.getPosition(), 1 ) );
|
||||
%this.setExtent( %controlExtentX, getWord( %this.getExtent(), 1 ) );
|
||||
}
|
||||
|
||||
function VEvent::DisplayContextMenu( %this, %x, %y )
|
||||
{
|
||||
%contextMenu = $VerveEditor::VEvent::ContextMenu;
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
%contextMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VEventContextMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "Cu&t" TAB "" TAB "VerveEditor::CutSelection();";
|
||||
Item[1] = "&Copy" TAB "" TAB "VerveEditor::CopySelection( true );";
|
||||
|
||||
Item[2] = "" TAB "";
|
||||
|
||||
Item[3] = "&Delete" TAB "" TAB "VerveEditor::DeleteSelection();";
|
||||
};
|
||||
%contextMenu.Init();
|
||||
|
||||
// Cache.
|
||||
$VerveEditor::VEvent::ContextMenu = %contextMenu;
|
||||
}
|
||||
|
||||
// Enable/Disable Cut & Copy.
|
||||
%contextMenu.enableItem( 0, VerveEditor::CanCopy() );
|
||||
%contextMenu.enableItem( 1, VerveEditor::CanCopy() );
|
||||
|
||||
// Display.
|
||||
if($Verve::UseSeparateWindow)
|
||||
%contextMenu.showPopup( VerveEditorWindow, %x, %y );
|
||||
else
|
||||
%contextMenu.showPopup( Canvas, %x, %y );
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VFadeEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventDPropertyList";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VFadeEvent::OnFieldChange( %this, %fieldName, %oldValue, %newValue )
|
||||
{
|
||||
// Parent Callback.
|
||||
Parent::OnFieldChange( %this, %fieldName, %oldValue, %newValue );
|
||||
|
||||
// Fetch Parent.
|
||||
%parent = %this.getParent();
|
||||
if ( !isObject( %parent ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch$( %fieldName )
|
||||
{
|
||||
case "TriggerTime" : %parent.Update();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VLightObjectAnimationEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventDPropertyList";
|
||||
|
||||
Group[0] = "VLightObjectAnimationEvent";
|
||||
Field[0, 0] = "AnimationData";
|
||||
Type[0, 0] = "VLightAnimationDataEnum";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VLightObjectAnimationEvent::Refresh( %this, %trackContainer )
|
||||
{
|
||||
// Create Control.
|
||||
%eventButton = Parent::Refresh( %this, %trackContainer );
|
||||
|
||||
// Reference Label.
|
||||
%eventButton.LabelField = "AnimationData";
|
||||
|
||||
// Add Field Notify.
|
||||
%this.AddFieldNotify( "AnimationData", %eventButton );
|
||||
|
||||
// Return Button.
|
||||
return %eventButton;
|
||||
}
|
||||
|
||||
function VLightObjectAnimationEvent::OnFieldChange( %this, %fieldName, %oldValue, %newValue )
|
||||
{
|
||||
// Parent Callback.
|
||||
Parent::OnFieldChange( %this, %fieldName, %oldValue, %newValue );
|
||||
|
||||
// Fetch Parent.
|
||||
%parent = %this.getParent();
|
||||
if ( !isObject( %parent ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch$( %fieldName )
|
||||
{
|
||||
case "AnimationData" : %parent.Update();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VLightObjectToggleEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventPropertyList";
|
||||
|
||||
Group[0] = "VLightObjectToggleEvent";
|
||||
Field[0, 0] = "Action";
|
||||
Type[0, 0] = "ToggleEnum";
|
||||
};
|
||||
|
|
@ -0,0 +1,183 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VMotionEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventPropertyList";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VMotionEvent::CreatePathNode( %this, %transform )
|
||||
{
|
||||
// Fetch Track & Group.
|
||||
%track = %this.getParent();
|
||||
%group = %track.getParent();
|
||||
|
||||
// Fetch Object References.
|
||||
%object = %group.getSceneObject();
|
||||
%path = %track.getPath();
|
||||
|
||||
// Fetch Index.
|
||||
%nodeIndex = %this.getIndex();
|
||||
|
||||
// Create New Node.
|
||||
%path.addNode( %transform, 10, %nodeIndex );
|
||||
|
||||
// Update Transform.
|
||||
%object.setTransform( %transform );
|
||||
|
||||
if ( !VerveEditorHistoryManager.Locked )
|
||||
{
|
||||
// Add History Item.
|
||||
%historyObject = new UndoScriptAction()
|
||||
{
|
||||
Class = "VerveEditorHistoryCreateMotionEvent";
|
||||
SuperClass = "VerveEditorHistoryCreateObject";
|
||||
|
||||
ActionName = "Create Object";
|
||||
|
||||
// Store Object References.
|
||||
Parent = %track;
|
||||
Object = %this;
|
||||
|
||||
// Store Node Information.
|
||||
PathObject = %path;
|
||||
NodeIndex = %nodeIndex;
|
||||
NodeTransform = %path.getNodeWorldTransform( %nodeIndex );
|
||||
NodeWeight = %path.getNodeWeight( %nodeIndex );
|
||||
};
|
||||
|
||||
// Force OnAdd.
|
||||
VerveEditorHistoryObject::onAdd( %historyObject );
|
||||
}
|
||||
|
||||
// Reset the Controller.
|
||||
$VerveEditor::Controller.reset( $VerveEditor::Controller.Time );
|
||||
}
|
||||
|
||||
function VMotionEvent::Delete( %this )
|
||||
{
|
||||
// Fetch Parent.
|
||||
%parentObject = %this.getParent();
|
||||
%rootObject = %this.getRoot();
|
||||
if ( !%parentObject || ( %rootObject.getId() != $VerveEditor::Controller.getId() ) )
|
||||
{
|
||||
// Not Editing, Delete.
|
||||
Parent::delete( %this );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !VerveEditorHistoryManager.Locked )
|
||||
{
|
||||
%path = %parentObject.getPath();
|
||||
%nodeIndex = %this.getIndex();
|
||||
|
||||
// Add History Item.
|
||||
%historyObject = new UndoScriptAction()
|
||||
{
|
||||
Class = "VerveEditorHistoryDeleteMotionEvent";
|
||||
SuperClass = "VerveEditorHistoryDeleteObject";
|
||||
|
||||
ActionName = "Delete Object";
|
||||
|
||||
// Store Object References.
|
||||
Parent = %parentObject;
|
||||
Object = %this;
|
||||
|
||||
// Store Node Information.
|
||||
PathObject = %path;
|
||||
NodeIndex = %nodeIndex;
|
||||
NodeTransform = %path.getNodeWorldTransform( %nodeIndex );
|
||||
NodeWeight = %path.getNodeWeight( %nodeIndex );
|
||||
};
|
||||
|
||||
// Force OnAdd.
|
||||
VerveEditorHistoryObject::onAdd( %historyObject );
|
||||
}
|
||||
|
||||
// Detach Object.
|
||||
%parentObject.removeObject( %this );
|
||||
}
|
||||
|
||||
function VMotionEvent::OnRemove( %this )
|
||||
{
|
||||
// Fetch Path.
|
||||
%path = %this.getParent().getPath();
|
||||
if ( !isObject( %path ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Delete Node.
|
||||
%path.deleteNode( %this.getIndex() );
|
||||
}
|
||||
|
||||
function VMotionEvent::OnSelect( %this )
|
||||
{
|
||||
// Fetch Path.
|
||||
%path = %this.getParent().getPath();
|
||||
if ( !isObject( EVPathEditor ) || !isObject( %path ) )
|
||||
{
|
||||
// No Editor.
|
||||
return;
|
||||
}
|
||||
|
||||
// Update Selection.
|
||||
EVPathEditor.setSelection( %path, %this.getIndex() );
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorHistoryCreateMotionEvent::Undo( %this )
|
||||
{
|
||||
// Delete Node.
|
||||
%this.PathObject.DeleteNode( %this.NodeIndex );
|
||||
|
||||
// Dirty.
|
||||
EVPathEditor.isDirty = true;
|
||||
|
||||
// Regular Undo.
|
||||
Parent::Undo( %this );
|
||||
}
|
||||
|
||||
function VerveEditorHistoryCreateMotionEvent::Redo( %this )
|
||||
{
|
||||
// Create Node.
|
||||
%this.PathObject.AddNode( %this.NodeTransform, %this.NodeWeight, %this.NodeIndex );
|
||||
|
||||
// Dirty.
|
||||
EVPathEditor.isDirty = true;
|
||||
|
||||
// Regular Redo.
|
||||
Parent::Redo( %this );
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorHistoryDeleteMotionEvent::Undo( %this )
|
||||
{
|
||||
// Create Node.
|
||||
%this.PathObject.AddNode( %this.NodeTransform, %this.NodeWeight, %this.NodeIndex );
|
||||
|
||||
// Dirty.
|
||||
EVPathEditor.isDirty = true;
|
||||
|
||||
// Regular Undo.
|
||||
Parent::Undo( %this );
|
||||
}
|
||||
|
||||
function VerveEditorHistoryDeleteMotionEvent::Redo( %this )
|
||||
{
|
||||
// Delete Node.
|
||||
%this.PathObject.DeleteNode( %this.NodeIndex );
|
||||
|
||||
// Dirty.
|
||||
EVPathEditor.isDirty = true;
|
||||
|
||||
// Regular Redo.
|
||||
Parent::Redo( %this );
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VParticleEffectToggleEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventPropertyList";
|
||||
|
||||
Group[0] = "VParticleEffectToggleEvent";
|
||||
Field[0, 0] = "Action";
|
||||
Type[0, 0] = "ToggleEnum";
|
||||
};
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VPostEffectToggleEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventPropertyList";
|
||||
|
||||
Group[0] = "VPostEffectToggleEvent";
|
||||
Field[0, 0] = "Action";
|
||||
Type[0, 0] = "ToggleEnum";
|
||||
};
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VSceneJumpEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventPropertyList";
|
||||
|
||||
Group[0] = "VSceneJumpEvent";
|
||||
Field[0, 0] = "Target";
|
||||
Type[0, 0] = "VSceneEnum";
|
||||
};
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VScriptEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventPropertyList";
|
||||
|
||||
Group[0] = "VScriptEvent";
|
||||
Field[0, 0] = "CommandType";
|
||||
Type[0, 0] = "VCommandEnum";
|
||||
Field[0, 1] = "Command";
|
||||
};
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VShapeAnimationEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventDPropertyList";
|
||||
|
||||
Group[0] = "VShapeAnimationEvent";
|
||||
Field[0, 0] = "AnimationData";
|
||||
Type[0, 0] = "VShapeAnimationEnum";
|
||||
Field[0, 1] = "AutoDuration";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VShapeAnimationEvent::Refresh( %this, %trackContainer )
|
||||
{
|
||||
// Create Control.
|
||||
%eventButton = Parent::Refresh( %this, %trackContainer );
|
||||
|
||||
// Reference Label.
|
||||
%eventButton.LabelField = "AnimationData";
|
||||
|
||||
// Add Field Notify.
|
||||
%this.AddFieldNotify( "AnimationData", %eventButton );
|
||||
%this.AddFieldNotify( "AutoDuration", %eventButton );
|
||||
|
||||
// Return Button.
|
||||
return %eventButton;
|
||||
}
|
||||
|
||||
function VShapeAnimationEvent::OnFieldChange( %this, %fieldName, %oldValue, %newValue )
|
||||
{
|
||||
// Parent Callback.
|
||||
Parent::OnFieldChange( %this, %fieldName, %oldValue, %newValue );
|
||||
|
||||
// Fetch Parent.
|
||||
%parent = %this.getParent();
|
||||
if ( !isObject( %parent ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch$( %fieldName )
|
||||
{
|
||||
case "AnimationData" : %parent.Update();
|
||||
|
||||
case "AutoDuration" : %parent.Update();
|
||||
|
||||
case "TriggerTime" : %parent.Update();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VSlowMoEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventDPropertyList";
|
||||
|
||||
Group[0] = "VSlowMoEvent";
|
||||
Field[0, 0] = "TimeScale";
|
||||
};
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VSoundEffectEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventPropertyList";
|
||||
|
||||
Group[0] = "VSoundEffectEvent";
|
||||
Field[0, 0] = "SoundEffect";
|
||||
Type[0, 0] = "VSFXProfileEnum";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VSoundEffectEvent::Refresh( %this, %trackContainer )
|
||||
{
|
||||
// Create Control.
|
||||
%eventButton = Parent::Refresh( %this, %trackContainer );
|
||||
|
||||
// Reference Label.
|
||||
%eventButton.LabelField = "SoundEffect";
|
||||
|
||||
// Add Field Notify.
|
||||
%this.AddFieldNotify( "SoundEffect", %eventButton );
|
||||
|
||||
// Return Button.
|
||||
return %eventButton;
|
||||
}
|
||||
|
||||
function VSoundEffectEvent::OnFieldChange( %this, %fieldName, %oldValue, %newValue )
|
||||
{
|
||||
switch$ ( %fieldName )
|
||||
{
|
||||
case "SoundEffect" : %this.NotifyFieldChange( "Duration", 0 );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VSpawnSphereSpawnTargetEventPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VEventPropertyList";
|
||||
};
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::InitEventScripts()
|
||||
{
|
||||
// Core.
|
||||
exec( "./VEvent.cs" );
|
||||
|
||||
// Built-In.
|
||||
exec( "./VCameraShakeEvent.cs" );
|
||||
exec( "./VDirectorEvent.cs" );
|
||||
exec( "./VFadeEvent.cs" );
|
||||
exec( "./VLightObjectAnimationEvent.cs" );
|
||||
exec( "./VLightObjectToggleEvent.cs" );
|
||||
exec( "./VMotionEvent.cs" );
|
||||
exec( "./VParticleEffectToggleEvent.cs" );
|
||||
exec( "./VPostEffectToggleEvent.cs" );
|
||||
exec( "./VSceneJumpEvent.cs" );
|
||||
exec( "./VScriptEvent.cs" );
|
||||
exec( "./VShapeAnimationEvent.cs" );
|
||||
exec( "./VSlowMoEvent.cs" );
|
||||
exec( "./VSoundEffectEvent.cs" );
|
||||
exec( "./VSpawnSphereSpawnTargetEvent.cs" );
|
||||
|
||||
// Custom.
|
||||
// Exec Custom Event Scripts.
|
||||
}
|
||||
VerveEditor::InitEventScripts();
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VCameraGroupPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VSceneObjectGroupPropertyList";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VCameraGroup::GetAddTrackMenu( %this )
|
||||
{
|
||||
%contextMenu = $VerveEditor::VGroup::ContextMenu[%this.getClassName()];
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
%contextMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VCameraGroupAddTrackMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "Add Animation Track" TAB "" TAB "VerveEditor::AddTrack( \"VShapeAnimationTrack\" );";
|
||||
Item[1] = "Add Camera Shake Track" TAB "" TAB "VerveEditor::AddTrack( \"VCameraShakeTrack\" );";
|
||||
Item[2] = "Add Motion Track" TAB "" TAB "VerveEditor::AddTrack( \"VMotionTrack\" );";
|
||||
Item[3] = "Add Post Effect Track" TAB "" TAB "VerveEditor::AddTrack( \"VPostEffectToggleTrack\" );";
|
||||
Item[4] = "Add Script Event Track" TAB "" TAB "VerveEditor::AddTrack( \"VScriptEventTrack\" );";
|
||||
Item[5] = "Add Sound Effect Track" TAB "" TAB "VerveEditor::AddTrack( \"VSoundEffectTrack\" );";
|
||||
};
|
||||
%contextMenu.Init();
|
||||
|
||||
// Cache.
|
||||
$VerveEditor::VGroup::ContextMenu[%this.getClassName()] = %contextMenu;
|
||||
}
|
||||
|
||||
// Enable/Disable Adding Tracks.
|
||||
%contextMenu.enableItem( 0, %this.CanAdd( "VShapeAnimationTrack" ) );
|
||||
%contextMenu.enableItem( 1, %this.CanAdd( "VCameraShakeTrack" ) );
|
||||
%contextMenu.enableItem( 2, %this.CanAdd( "VMotionTrack" ) );
|
||||
%contextMenu.enableItem( 3, %this.CanAdd( "VPostEffectToggleTrack" ) );
|
||||
%contextMenu.enableItem( 4, %this.CanAdd( "VScriptEventTrack" ) );
|
||||
%contextMenu.enableItem( 5, %this.CanAdd( "VSoundEffectTrack" ) );
|
||||
|
||||
// Return Menu.
|
||||
return %contextMenu;
|
||||
}
|
||||
|
||||
function VCameraGroup::isValid( %this )
|
||||
{
|
||||
// Valid?
|
||||
return VTorque::isCameraObject( %this.getSceneObject() );
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VDirectorGroupPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VGroupPropertyList";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VDirectorGroup::PopulateBuildStack( %this, %stack )
|
||||
{
|
||||
Parent::PopulateBuildStack( %this, %stack );
|
||||
|
||||
// Create Director Track Checkbox.
|
||||
%directorTrackCheckBox = %stack.CreateCheckbox( "DirectorTrackToggle", "Add Director Track:" );
|
||||
%directorTrackCheckBox.setStateOn( true );
|
||||
}
|
||||
|
||||
function VDirectorGroup::ResolveBuildStack( %this, %stack )
|
||||
{
|
||||
Parent::ResolveBuildStack( %this, %stack, %groupObject );
|
||||
|
||||
// Find the Track Toggle.
|
||||
%directorTrackCheckBox = %stack.findObjectByInternalName( "DirectorTrackToggle", true );
|
||||
if ( isObject( %directorTrackCheckBox ) && %directorTrackCheckBox.getValue() == true )
|
||||
{
|
||||
// Create the Director Track.
|
||||
%directorTrackCheckBox = VerveEditor::AddTrack( "VDirectorTrack", %this, false );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VDirectorGroup::GetAddTrackMenu( %this )
|
||||
{
|
||||
%contextMenu = $VerveEditor::VGroup::ContextMenu[%this.getClassName()];
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
%contextMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VGroupAddTrackMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "Add Director Track" TAB "" TAB "VerveEditor::AddTrack( \"VDirectorTrack\" );";
|
||||
Item[1] = "Add Fade Track" TAB "" TAB "VerveEditor::AddTrack( \"VFadeTrack\" );";
|
||||
Item[2] = "Add Scene Jump Track" TAB "" TAB "VerveEditor::AddTrack( \"VSceneJumpTrack\" );";
|
||||
Item[3] = "Add Script Event Track" TAB "" TAB "VerveEditor::AddTrack( \"VScriptEventTrack\" );";
|
||||
Item[4] = "Add Slow Mo Track" TAB "" TAB "VerveEditor::AddTrack( \"VSlowMoTrack\" );";
|
||||
Item[5] = "Add Sound Effect Track" TAB "" TAB "VerveEditor::AddTrack( \"VSoundEffectTrack\" );";
|
||||
};
|
||||
%contextMenu.Init();
|
||||
|
||||
// Cache.
|
||||
$VerveEditor::VGroup::ContextMenu[%this.getClassName()] = %contextMenu;
|
||||
}
|
||||
|
||||
// Enable/Disable Adding Tracks.
|
||||
%contextMenu.enableItem( 0, %this.CanAdd( "VDirectorTrack" ) );
|
||||
%contextMenu.enableItem( 1, %this.CanAdd( "VFadeTrack" ) );
|
||||
%contextMenu.enableItem( 2, %this.CanAdd( "VSceneJumpTrack" ) );
|
||||
%contextMenu.enableItem( 3, %this.CanAdd( "VScriptEventTrack" ) );
|
||||
%contextMenu.enableItem( 4, %this.CanAdd( "VSlowMoTrack" ) );
|
||||
%contextMenu.enableItem( 5, %this.CanAdd( "VSoundEffectTrack" ) );
|
||||
|
||||
// Return Menu.
|
||||
return %contextMenu;
|
||||
}
|
||||
|
|
@ -0,0 +1,360 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VGroupPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VObjectPropertyList";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VGroup::OnAdd( %this )
|
||||
{
|
||||
%ourClass = %this.getClassName();
|
||||
if ( isWordInList( %ourClass, $VerveEditor::UniqueGroupList ) )
|
||||
{
|
||||
%controller = $VerveEditor::Controller;
|
||||
%groupCount = %controller.getCount();
|
||||
for ( %i = 0; %i < %groupCount; %i++ )
|
||||
{
|
||||
%groupObject = %controller.getObject( %i );
|
||||
if ( %groupObject.getId() == %this.getId() )
|
||||
{
|
||||
// Skip.
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( %groupObject.isMemberOfClass( %ourClass ) )
|
||||
{
|
||||
// Alert Message.
|
||||
messageBox( "Verve Editor", "You cannot have more than one \"" @ %ourClass @ "\" in your sequence.", "Ok", "Warning" );
|
||||
|
||||
// Invalid.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Regular Add.
|
||||
return Parent::OnAdd( %this );
|
||||
}
|
||||
|
||||
function VGroup::OnAttach( %this )
|
||||
{
|
||||
// Add Event Notify.
|
||||
VerveEditor::AddEventNotify( %this, "VGroupObjectUpdate", "OnGroupObjectUpdate" );
|
||||
}
|
||||
|
||||
function VGroup::OnDetach( %this )
|
||||
{
|
||||
// Remove Event Notify.
|
||||
VerveEditor::RemoveEventNotify( %this, "VGroupObjectUpdate" );
|
||||
}
|
||||
|
||||
function VGroup::CanPaste( %this, %targetObject )
|
||||
{
|
||||
if ( !isObject( %targetObject ) )
|
||||
{
|
||||
// Nope!
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !%this.CanAdd( %targetObject.getClassName() ) )
|
||||
{
|
||||
// Nope!
|
||||
return false;
|
||||
}
|
||||
|
||||
return %targetObject.isMemberOfClass( "VTrack" );
|
||||
}
|
||||
|
||||
function VGroup::CanAdd( %this, %targetClass )
|
||||
{
|
||||
if ( isWordInList( %targetClass, $VerveEditor::NonUniqueTrackList ) )
|
||||
{
|
||||
// Non-Unique Class.
|
||||
return true;
|
||||
}
|
||||
|
||||
// All Tracks are Unique.
|
||||
%trackCount = %this.getCount();
|
||||
for ( %i = 0; %i < %trackCount; %i++ )
|
||||
{
|
||||
%trackObject = %this.getObject( %i );
|
||||
if ( %trackObject.isMemberOfClass( %targetClass ) )
|
||||
{
|
||||
// Invalid.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// All Good.
|
||||
return true;
|
||||
}
|
||||
|
||||
function VGroup::isValid( %this )
|
||||
{
|
||||
// Yup.
|
||||
return true;
|
||||
}
|
||||
|
||||
function VGroup::Refresh( %this )
|
||||
{
|
||||
// Create Control.
|
||||
%groupControl = VerveEditor::CreateGroupControl( %this );
|
||||
|
||||
// Update Validity.
|
||||
%this.OnGroupObjectUpdate();
|
||||
|
||||
%trackCount = %this.getCount();
|
||||
for ( %i = 0; %i < %trackCount; %i++ )
|
||||
{
|
||||
%this.getObject( %i ).Refresh();
|
||||
}
|
||||
|
||||
// Return Control.
|
||||
return %groupControl;
|
||||
}
|
||||
|
||||
function VGroup::OnFieldChange( %this, %fieldName, %oldValue, %newValue )
|
||||
{
|
||||
// Parent Callback.
|
||||
Parent::OnFieldChange( %this, %fieldName, %oldValue, %newValue );
|
||||
|
||||
switch$ ( %fieldName )
|
||||
{
|
||||
case "Reference" :
|
||||
|
||||
if ( $VerveEditor::InspectorObject.getId() == %this.getId() )
|
||||
{
|
||||
// Post Event.
|
||||
VerveEditor::PostEvent( "VGroupObjectUpdate", %this );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function VGroup::OnGroupObjectUpdate( %this, %refObject )
|
||||
{
|
||||
if ( !isObject( %this.Control ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Update Validity.
|
||||
if ( %this.isValid() )
|
||||
{
|
||||
// Valid.
|
||||
%this.Control.setProfile( "VEditorGroupHeaderProfile" );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Invalid.
|
||||
%this.Control.setProfile( "VEditorGroupHeaderErrorProfile" );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VGroup::PopulateBuildStack( %this, %stack )
|
||||
{
|
||||
// Void.
|
||||
}
|
||||
|
||||
function VGroup::ResolveBuildStack( %this, %stack )
|
||||
{
|
||||
// Void.
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VGroup::DisplayContextMenu( %this, %x, %y )
|
||||
{
|
||||
%contextMenu = $VerveEditor::VGroup::ContextMenu;
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
%contextMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VGroupContextMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "Add Track" TAB "";
|
||||
|
||||
Item[1] = "" TAB "";
|
||||
|
||||
Item[2] = "Cu&t" TAB "" TAB "VerveEditor::CutSelection();";
|
||||
Item[3] = "&Copy" TAB "" TAB "VerveEditor::CopySelection();";
|
||||
Item[4] = "&Paste" TAB "" TAB "VerveEditor::Paste();";
|
||||
|
||||
Item[5] = "" TAB "";
|
||||
|
||||
Item[6] = "&Delete" TAB "" TAB "VerveEditor::DeleteSelection();";
|
||||
|
||||
AddIndex = 0;
|
||||
PasteIndex = 4;
|
||||
};
|
||||
%contextMenu.Init();
|
||||
|
||||
// Cache.
|
||||
$VerveEditor::VGroup::ContextMenu = %contextMenu;
|
||||
}
|
||||
|
||||
// Remove Add Menu.
|
||||
%contextMenu.removeItem( %contextMenu.AddIndex );
|
||||
|
||||
// Available Tracks Menu.
|
||||
%groupMenu = 0;
|
||||
if ( %this.isMethod( "GetAddTrackMenu" ) )
|
||||
{
|
||||
%groupMenu = %this.GetAddTrackMenu();
|
||||
}
|
||||
|
||||
if ( isObject( %groupMenu ) )
|
||||
{
|
||||
// Insert Menu.
|
||||
%contextMenu.insertSubMenu( %contextMenu.AddIndex, getField( %contextMenu.Item[0], 0 ), %groupMenu );
|
||||
|
||||
// Enable.
|
||||
%contextMenu.enableItem( %contextMenu.AddIndex, true );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add Dummy.
|
||||
%contextMenu.insertItem( %contextMenu.AddIndex, getField( %contextMenu.Item[0], 0 ) );
|
||||
|
||||
// Disable.
|
||||
%contextMenu.enableItem( %contextMenu.AddIndex, false );
|
||||
}
|
||||
|
||||
// Enable/Disable Pasting.
|
||||
%contextMenu.enableItem( %contextMenu.PasteIndex, VerveEditor::CanPaste() );
|
||||
|
||||
// Display.
|
||||
%contextMenu.showPopup( VerveEditorWindow, %x, %y );
|
||||
}
|
||||
|
||||
function VGroup::GetAddTrackMenu( %this )
|
||||
{
|
||||
%contextMenu = $VerveEditor::VGroup::ContextMenu[%this.getClassName()];
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
%contextMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VGroupAddTrackMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "Add Track" TAB "" TAB "VerveEditor::AddTrack( \"VTrack\" );";
|
||||
};
|
||||
%contextMenu.Init();
|
||||
|
||||
// Cache.
|
||||
$VerveEditor::VGroup::ContextMenu[%this.getClassName()] = %contextMenu;
|
||||
}
|
||||
|
||||
// Enable/Disable Adding Tracks.
|
||||
%contextMenu.enableItem( 0, %this.CanAdd( "VTrack" ) );
|
||||
|
||||
// Return Menu.
|
||||
return %contextMenu;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::CreateGroupControl( %object )
|
||||
{
|
||||
%groupWidth = getWord( VerveEditorGroupStack.getExtent(), 0 );
|
||||
%groupHeight = 26;
|
||||
%trackWidth = getWord( VerveEditorTrackStack.getExtent(), 0 );
|
||||
%trackHeight = %groupHeight;
|
||||
|
||||
%groupContainer = new VEditorButton()
|
||||
{
|
||||
SuperClass = "VEditorSelectable";
|
||||
Class = "VEditorSelectableGroup";
|
||||
Profile = "VEditorGroupHeaderProfile";
|
||||
|
||||
Bitmap = "~/VerveEditor/GUI/Images/GroupBackground";
|
||||
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = %groupWidth SPC %groupHeight;
|
||||
|
||||
ButtonType = "ToggleButton";
|
||||
GroupNum = "-1";
|
||||
|
||||
IsContainer = "1";
|
||||
};
|
||||
VerveEditorGroupStack.add( %groupContainer );
|
||||
|
||||
%groupCheckbox = new GuiCheckBoxCtrl()
|
||||
{
|
||||
Class = "VEditorBoolPropertyField";
|
||||
InternalName = "Enabled";
|
||||
Profile = "VEditorCheckBoxProfile";
|
||||
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "4 0";
|
||||
Extent = "14" SPC %groupHeight;
|
||||
|
||||
Object = %object;
|
||||
FieldName = "Enabled";
|
||||
Command = "$ThisControl.ApplyValue();";
|
||||
|
||||
Text = "";
|
||||
};
|
||||
%groupContainer.add( %groupCheckbox );
|
||||
|
||||
%trackContainer = new VEditorButton()
|
||||
{
|
||||
SuperClass = "VEditorSelectable";
|
||||
Class = "VEditorSelectableGroup";
|
||||
Profile = "VEditorGroupTrackProfile";
|
||||
|
||||
Bitmap = "~/VerveEditor/GUI/Images/GroupBackground";
|
||||
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = %trackWidth SPC %trackHeight;
|
||||
|
||||
ButtonType = "ToggleButton";
|
||||
GroupNum = "-1";
|
||||
|
||||
IsContainer = "1";
|
||||
};
|
||||
VerveEditorTrackStack.add( %trackContainer );
|
||||
|
||||
// Field Notify.
|
||||
%object.AddFieldNotify( "Label", %groupContainer );
|
||||
%object.AddFieldNotify( "Enabled", %groupCheckbox );
|
||||
|
||||
// Reference Siblings.
|
||||
%trackContainer.SiblingControl = %groupContainer;
|
||||
%groupContainer.SiblingControl = %trackContainer;
|
||||
|
||||
// Reference Proxy.
|
||||
%groupContainer.Proxy = %object;
|
||||
%trackContainer.Proxy = %object;
|
||||
|
||||
// Reference Control.
|
||||
%object.Control = %groupContainer;
|
||||
|
||||
return %trackContainer;
|
||||
}
|
||||
|
||||
function VEditorSelectableGroup::Update( %this, %fieldName, %fieldValue )
|
||||
{
|
||||
%this.setText( %fieldValue );
|
||||
}
|
||||