(Mostly) updated verve implementation.
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 );
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VLightObjectGroupPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VSceneObjectGroupPropertyList";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VLightObjectGroup::PopulateBuildStack( %this, %stack )
|
||||
{
|
||||
// Ignore Parent Fields.
|
||||
//Parent::PopulateBuildStack( %this, %stack );
|
||||
|
||||
// Object Reference.
|
||||
%lightObjectList = %stack.CreateObjectList( VTorque::getLightObjectClass(), "LightObjectList", "Light Object:" );
|
||||
|
||||
if ( VTorque::GetSelectedCount() )
|
||||
{
|
||||
%selection = VTorque::GetSelectedObject();
|
||||
if ( %selection.getName() !$= "" && VTorque::isLightObject( %selection ) )
|
||||
{
|
||||
// Select Object.
|
||||
%lightObjectList.setText( %selection.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
// Create Toggle Track Checkbox.
|
||||
%toggleTrackCheckBox = %stack.CreateCheckbox( "ToggleTrackToggle", "Add Toggle Track:" );
|
||||
%toggleTrackCheckBox.setStateOn( true );
|
||||
}
|
||||
|
||||
function VLightObjectGroup::ResolveBuildStack( %this, %stack )
|
||||
{
|
||||
// Ignore Parent Fields.
|
||||
//Parent::ResolveBuildStack( %this, %stack, %groupObject );
|
||||
|
||||
// Fetch the Controller.
|
||||
%controller = %this.getRoot();
|
||||
|
||||
// Find the Particle Effect List.
|
||||
%lightObjectList = %stack.findObjectByInternalName( "LightObjectList", true );
|
||||
if ( isObject( %lightObjectList ) )
|
||||
{
|
||||
// Fetch Selected Object.
|
||||
%lightObject = %lightObjectList.getText();
|
||||
|
||||
// Data Field Name.
|
||||
%dataFieldName = strreplace( %this.Label, " ", "_" );
|
||||
|
||||
// Create a New Data Field.
|
||||
%controller.addDataField( "STATIC", %dataFieldName );
|
||||
|
||||
if ( %lightObject !$= "" )
|
||||
{
|
||||
// Set the Field Value.
|
||||
%controller.setFieldValue( %dataFieldName, %lightObject );
|
||||
}
|
||||
|
||||
// Reference the Data Field.
|
||||
%this.Reference = %dataFieldName;
|
||||
}
|
||||
|
||||
// Find the Track Toggle.
|
||||
%toggleTrackCheckBox = %stack.findObjectByInternalName( "ToggleTrackToggle", true );
|
||||
if ( %toggleTrackCheckBox.getValue() )
|
||||
{
|
||||
// Create the Toggle Track.
|
||||
%toggleTrackCheckBox = VerveEditor::AddTrack( "VLightObjectToggleTrack", %this, false );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VLightObjectGroup::GetAddTrackMenu( %this )
|
||||
{
|
||||
%contextMenu = $VerveEditor::VGroup::ContextMenu[%this.getClassName()];
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
%contextMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VLightObjectGroupAddTrackMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "Add Animation Track" TAB "" TAB "VerveEditor::AddTrack( \"VLightObjectAnimationTrack\" );";
|
||||
Item[1] = "Add Motion Track" TAB "" TAB "VerveEditor::AddTrack( \"VMotionTrack\" );";
|
||||
Item[2] = "Add Script Event Track" TAB "" TAB "VerveEditor::AddTrack( \"VScriptEventTrack\" );";
|
||||
Item[3] = "Add Sound Effect Track" TAB "" TAB "VerveEditor::AddTrack( \"VSoundEffectTrack\" );";
|
||||
Item[4] = "Add Toggle Track" TAB "" TAB "VerveEditor::AddTrack( \"VLightObjectToggleTrack\" );";
|
||||
};
|
||||
%contextMenu.Init();
|
||||
|
||||
// Cache.
|
||||
$VerveEditor::VGroup::ContextMenu[%this.getClassName()] = %contextMenu;
|
||||
}
|
||||
|
||||
// Enable/Disable Adding Tracks.
|
||||
%contextMenu.enableItem( 0, %this.CanAdd( "VLightObjectAnimationTrack" ) );
|
||||
%contextMenu.enableItem( 1, %this.CanAdd( "VMotionTrack" ) );
|
||||
%contextMenu.enableItem( 2, %this.CanAdd( "VScriptEventTrack" ) );
|
||||
%contextMenu.enableItem( 3, %this.CanAdd( "VSoundEffectTrack" ) );
|
||||
%contextMenu.enableItem( 4, %this.CanAdd( "VLightObjectToggleTrack" ) );
|
||||
|
||||
// Return Menu.
|
||||
return %contextMenu;
|
||||
}
|
||||
|
||||
function VLightObjectGroup::isValid( %this )
|
||||
{
|
||||
// Valid?
|
||||
return VTorque::isLightObject( %this.getSceneObject() );
|
||||
}
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VParticleEffectGroupPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VSceneObjectGroupPropertyList";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VParticleEffectGroup::PopulateBuildStack( %this, %stack )
|
||||
{
|
||||
// Ignore Parent Fields.
|
||||
//Parent::PopulateBuildStack( %this, %stack );
|
||||
|
||||
// Object Reference.
|
||||
%particleEffectList = %stack.CreateObjectList( VTorque::getParticleEffectClass(), "ParticleEffectList", "Particle Effect:" );
|
||||
|
||||
if ( VTorque::GetSelectedCount() )
|
||||
{
|
||||
%selection = VTorque::GetSelectedObject();
|
||||
if ( %selection.getName() !$= "" && VTorque::isParticleEffect( %selection ) )
|
||||
{
|
||||
// Select Object.
|
||||
%particleEffectList.setText( %selection.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
// Create Toggle Track Checkbox.
|
||||
%toggleTrackCheckBox = %stack.CreateCheckbox( "ToggleTrackToggle", "Add Toggle Track:" );
|
||||
%toggleTrackCheckBox.setStateOn( true );
|
||||
}
|
||||
|
||||
function VParticleEffectGroup::ResolveBuildStack( %this, %stack )
|
||||
{
|
||||
// Ignore Parent Fields.
|
||||
//Parent::ResolveBuildStack( %this, %stack, %groupObject );
|
||||
|
||||
// Fetch the Controller.
|
||||
%controller = %this.getRoot();
|
||||
|
||||
// Find the Particle Effect List.
|
||||
%particleEffectList = %stack.findObjectByInternalName( "ParticleEffectList", true );
|
||||
if ( isObject( %particleEffectList ) )
|
||||
{
|
||||
// Fetch Selected Object.
|
||||
%particlEffect = %particleEffectList.getText();
|
||||
|
||||
// Data Field Name.
|
||||
%dataFieldName = strreplace( %this.Label, " ", "_" );
|
||||
|
||||
// Create a New Data Field.
|
||||
%controller.addDataField( "STATIC", %dataFieldName );
|
||||
|
||||
if ( %particlEffect !$= "" )
|
||||
{
|
||||
// Set the Field Value.
|
||||
%controller.setFieldValue( %dataFieldName, %particlEffect );
|
||||
}
|
||||
|
||||
// Reference the Data Field.
|
||||
%this.Reference = %dataFieldName;
|
||||
}
|
||||
|
||||
// Find the Track Toggle.
|
||||
%toggleTrackCheckBox = %stack.findObjectByInternalName( "ToggleTrackToggle", true );
|
||||
if ( %toggleTrackCheckBox.getValue() )
|
||||
{
|
||||
// Create the Toggle Track.
|
||||
%toggleTrackCheckBox = VerveEditor::AddTrack( "VParticleEffectToggleTrack", %this, false );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VParticleEffectGroup::GetAddTrackMenu( %this )
|
||||
{
|
||||
%contextMenu = $VerveEditor::VGroup::ContextMenu[%this.getClassName()];
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
%contextMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VParticleEffectGroupAddTrackMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "Add Motion Track" TAB "" TAB "VerveEditor::AddTrack( \"VMotionTrack\" );";
|
||||
Item[1] = "Add Script Event Track" TAB "" TAB "VerveEditor::AddTrack( \"VScriptEventTrack\" );";
|
||||
Item[2] = "Add Sound Effect Track" TAB "" TAB "VerveEditor::AddTrack( \"VSoundEffectTrack\" );";
|
||||
Item[3] = "Add Toggle Track" TAB "" TAB "VerveEditor::AddTrack( \"VParticleEffectToggleTrack\" );";
|
||||
};
|
||||
%contextMenu.Init();
|
||||
|
||||
// Cache.
|
||||
$VerveEditor::VGroup::ContextMenu[%this.getClassName()] = %contextMenu;
|
||||
}
|
||||
|
||||
// Enable/Disable Adding Tracks.
|
||||
%contextMenu.enableItem( 0, %this.CanAdd( "VMotionTrack" ) );
|
||||
%contextMenu.enableItem( 1, %this.CanAdd( "VScriptEventTrack" ) );
|
||||
%contextMenu.enableItem( 2, %this.CanAdd( "VSoundEffectTrack" ) );
|
||||
%contextMenu.enableItem( 3, %this.CanAdd( "VParticleEffectToggleTrack" ) );
|
||||
|
||||
// Return Menu.
|
||||
return %contextMenu;
|
||||
}
|
||||
|
||||
function VParticleEffectGroup::isValid( %this )
|
||||
{
|
||||
// Valid?
|
||||
return VTorque::isParticleEffect( %this.getSceneObject() );
|
||||
}
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VSceneObjectGroupPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VGroupPropertyList";
|
||||
|
||||
Group[0] = "VGroup";
|
||||
Field[0, 0] = "Reference";
|
||||
Type[0, 0] = "VControllerDataEnum";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VSceneObjectGroup::OnSelect( %this )
|
||||
{
|
||||
if ( !%this.isValid() )
|
||||
{
|
||||
// Invalid Object.
|
||||
return;
|
||||
}
|
||||
|
||||
// Update Selection.
|
||||
VTorque::SetSelectedObject( %this.getSceneObject() );
|
||||
}
|
||||
|
||||
function VSceneObjectGroup::isValid( %this )
|
||||
{
|
||||
// Valid?
|
||||
return VTorque::isSceneObject( %this.getSceneObject() );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VSceneObjectGroup::PopulateBuildStack( %this, %stack )
|
||||
{
|
||||
Parent::PopulateBuildStack( %this, %stack );
|
||||
|
||||
// Object Reference.
|
||||
%sceneObjectList = %stack.CreateObjectList( "SceneObject", "SceneObjectList", "Scene Object:" );
|
||||
|
||||
if ( VTorque::GetSelectedCount() )
|
||||
{
|
||||
%selection = VTorque::GetSelectedObject();
|
||||
if ( %selection.getName() !$= "" && %selection.isMemberOfClass( "SceneObject" ) )
|
||||
{
|
||||
// Select Object.
|
||||
%sceneObjectList.setText( %selection.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
// Create Motion Track Checkbox.
|
||||
%motionTrackCheckBox = %stack.CreateCheckbox( "MotionTrackToggle", "Add Motion Track:" );
|
||||
%motionTrackCheckBox.setStateOn( true );
|
||||
|
||||
// Object Reference.
|
||||
%pathObjectList = %stack.CreateObjectList( "VPath", "PathObjectList", "Path Object:" );
|
||||
}
|
||||
|
||||
function VSceneObjectGroup::ResolveBuildStack( %this, %stack )
|
||||
{
|
||||
Parent::ResolveBuildStack( %this, %stack, %groupObject );
|
||||
|
||||
// Fetch the Controller.
|
||||
%controller = %this.getRoot();
|
||||
|
||||
// Find the Scene Object List.
|
||||
%sceneObjectList = %stack.findObjectByInternalName( "SceneObjectList", true );
|
||||
if ( isObject( %sceneObjectList ) )
|
||||
{
|
||||
// Fetch Selected Object.
|
||||
%sceneObject = %sceneObjectList.getText();
|
||||
|
||||
// Data Field Name.
|
||||
%dataFieldName = strreplace( %this.Label, " ", "_" );
|
||||
|
||||
// Create a New Data Field.
|
||||
%controller.addDataField( "STATIC", %dataFieldName );
|
||||
|
||||
if ( %sceneObject !$= "" )
|
||||
{
|
||||
// Set the Field Value.
|
||||
%controller.setFieldValue( %dataFieldName, %sceneObject );
|
||||
}
|
||||
|
||||
// Reference the Data Field.
|
||||
%this.Reference = %dataFieldName;
|
||||
}
|
||||
|
||||
// Find the Path Toggle.
|
||||
%motionTrackCheckBox = %stack.findObjectByInternalName( "MotionTrackToggle", true );
|
||||
if ( %motionTrackCheckBox.getValue() )
|
||||
{
|
||||
// Create the Motion Track.
|
||||
%motionTrack = VerveEditor::AddTrack( "VMotionTrack", %this, false );
|
||||
|
||||
%pathObjectList = %stack.findObjectByInternalName( "PathObjectList", true );
|
||||
if ( isObject( %pathObjectList ) )
|
||||
{
|
||||
// Fetch Selected Object.
|
||||
%pathObject = %pathObjectList.getText();
|
||||
|
||||
// Data Field Name.
|
||||
%dataFieldName = strreplace( %this.Label @ "Path", " ", "_" );
|
||||
|
||||
// Create a New Data Field.
|
||||
%controller.addDataField( "STATIC", %dataFieldName );
|
||||
|
||||
if ( %pathObject !$= "" )
|
||||
{
|
||||
// Set the Field Value.
|
||||
%controller.setFieldValue( %dataFieldName, %pathObject );
|
||||
}
|
||||
|
||||
// Reference the Data Field.
|
||||
%motionTrack.Reference = %dataFieldName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VSceneObjectGroup::GetAddTrackMenu( %this )
|
||||
{
|
||||
%contextMenu = $VerveEditor::VGroup::ContextMenu[%this.getClassName()];
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
%contextMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VSceneObjectGroupAddTrackMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "Add Animation Track" TAB "" TAB "VerveEditor::AddTrack( \"VShapeAnimationTrack\" );";
|
||||
Item[1] = "Add Motion Track" TAB "" TAB "VerveEditor::AddTrack( \"VMotionTrack\" );";
|
||||
Item[2] = "Add Script Event Track" TAB "" TAB "VerveEditor::AddTrack( \"VScriptEventTrack\" );";
|
||||
Item[3] = "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( "VMotionTrack" ) );
|
||||
%contextMenu.enableItem( 2, %this.CanAdd( "VScriptEventTrack" ) );
|
||||
%contextMenu.enableItem( 3, %this.CanAdd( "VSoundEffectTrack" ) );
|
||||
|
||||
// Return Menu.
|
||||
return %contextMenu;
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
new ScriptObject( VSpawnSphereGroupPropertyList )
|
||||
{
|
||||
SuperClass = "VEditorPropertyList";
|
||||
Parent = "VSceneObjectGroupPropertyList";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VSceneObjectGroup::PopulateBuildStack( %this, %stack )
|
||||
{
|
||||
VGroup::PopulateBuildStack( %this, %stack );
|
||||
|
||||
// Object Reference.
|
||||
%sceneObjectList = %stack.CreateObjectList( "SceneObject", "SceneObjectList", "Scene Object:" );
|
||||
|
||||
if ( VTorque::GetSelectedCount() )
|
||||
{
|
||||
%selection = VTorque::GetSelectedObject();
|
||||
if ( %selection.getName() !$= "" && %selection.isMemberOfClass( "SceneObject" ) )
|
||||
{
|
||||
// Select Object.
|
||||
%sceneObjectList.setText( %selection.getName() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function VSceneObjectGroup::ResolveBuildStack( %this, %stack )
|
||||
{
|
||||
VGroup::ResolveBuildStack( %this, %stack, %groupObject );
|
||||
|
||||
// Fetch the Controller.
|
||||
%controller = %this.getRoot();
|
||||
|
||||
// Find the Scene Object List.
|
||||
%sceneObjectList = %stack.findObjectByInternalName( "SceneObjectList", true );
|
||||
if ( isObject( %sceneObjectList ) )
|
||||
{
|
||||
// Fetch Selected Object.
|
||||
%sceneObject = %sceneObjectList.getText();
|
||||
|
||||
// Data Field Name.
|
||||
%dataFieldName = strreplace( %this.Label, " ", "_" );
|
||||
|
||||
// Create a New Data Field.
|
||||
%controller.addDataField( "STATIC", %dataFieldName );
|
||||
|
||||
if ( %sceneObject !$= "" )
|
||||
{
|
||||
// Set the Field Value.
|
||||
%controller.setFieldValue( %dataFieldName, %sceneObject );
|
||||
}
|
||||
|
||||
// Reference the Data Field.
|
||||
%this.Reference = %dataFieldName;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VSpawnSphereGroup::GetAddTrackMenu( %this )
|
||||
{
|
||||
%contextMenu = $VerveEditor::VGroup::ContextMenu[%this.getClassName()];
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
%contextMenu = new PopupMenu()
|
||||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
IsPopup = true;
|
||||
|
||||
Label = "VSpawnSphereGroupAddTrackMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "Add Script Event Track" TAB "" TAB "VerveEditor::AddTrack( \"VScriptEventTrack\" );";
|
||||
Item[1] = "Add Spawn Target Track" TAB "" TAB "VerveEditor::AddTrack( \"VSpawnSphereSpawnTargetTrack\" );";
|
||||
};
|
||||
%contextMenu.Init();
|
||||
|
||||
// Cache.
|
||||
$VerveEditor::VGroup::ContextMenu[%this.getClassName()] = %contextMenu;
|
||||
}
|
||||
|
||||
// Enable/Disable Adding Tracks.
|
||||
%contextMenu.enableItem( 0, %this.CanAdd( "VScriptEventTrack" ) );
|
||||
%contextMenu.enableItem( 1, %this.CanAdd( "VSpawnSphereSpawnTargetTrack" ) );
|
||||
|
||||
// Return Menu.
|
||||
return %contextMenu;
|
||||
}
|
||||
|
||||
function VSpawnSphereGroup::isValid( %this )
|
||||
{
|
||||
// Valid?
|
||||
return VTorque::isSpawnSphereObject( %this.getSceneObject() );
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::InitGroupScripts()
|
||||
{
|
||||
// Core.
|
||||
exec( "./VGroup.cs" );
|
||||
|
||||
// Built In.
|
||||
exec( "./VCameraGroup.cs" );
|
||||
exec( "./VDirectorGroup.cs" );
|
||||
exec( "./VLightObjectGroup.cs" );
|
||||
exec( "./VParticleEffectGroup.cs" );
|
||||
exec( "./VSceneObjectGroup.cs" );
|
||||
exec( "./VSpawnSphereGroup.cs" );
|
||||
|
||||
// Custom.
|
||||
// Exec Custom Group Scripts.
|
||||
|
||||
// Unique Group List.
|
||||
$VerveEditor::UniqueGroupList = "VDirectorGroup";
|
||||
}
|
||||
VerveEditor::InitGroupScripts();
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditorPropertyStack::ClearStack( %this )
|
||||
{
|
||||
while ( %this.getCount() > 0 )
|
||||
{
|
||||
// Remove Object.
|
||||
%this.remove( %this.getObject( 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditorPropertyStack::CreatePropertyRollout( %this, %groupLabel )
|
||||
{
|
||||
%groupWidth = getWord( %this.getExtent(), 0 );
|
||||
%groupHeight = 32;
|
||||
|
||||
%propertyRollout = new GuiRolloutCtrl()
|
||||
{
|
||||
Class = "VEditorPropertyRollout";
|
||||
Profile = "VEditorPropertyRolloutProfile";
|
||||
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = %groupWidth SPC 18;
|
||||
|
||||
Caption = %groupLabel;
|
||||
};
|
||||
|
||||
%propertyStack = new GuiStackControl()
|
||||
{
|
||||
Class = "VEditorPropertyStack";
|
||||
Profile = "GuiTransparentProfile";
|
||||
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = %groupWidth SPC %groupHeight;
|
||||
|
||||
StackingType = "Vertical";
|
||||
HorizStacking = "Left to Right";
|
||||
VertStacking = "Top to Bottom";
|
||||
Padding = "0";
|
||||
};
|
||||
%propertyRollout.add( %propertyStack );
|
||||
|
||||
// Add Spacer.
|
||||
VerveEditor::CreateSpacer( %propertyStack, 4 );
|
||||
|
||||
// Reference Stack.
|
||||
%propertyRollout.Stack = %propertyStack;
|
||||
|
||||
return %propertyRollout;
|
||||
}
|
||||
|
||||
function VEditorPropertyRollout::InspectObject( %this, %object )
|
||||
{
|
||||
%this.Stack.InspectObject( %object );
|
||||
}
|
||||
|
||||
function VEditorPropertyStack::InspectObject( %this, %object )
|
||||
{
|
||||
%fieldCount = %this.getCount();
|
||||
for ( %i = 1; %i < %fieldCount; %i++ )
|
||||
{
|
||||
%fieldContainer = %this.getObject( %i );
|
||||
%fieldControl = %fieldContainer.findObjectByInternalName( "FieldControl" );
|
||||
if ( !isObject( %fieldControl ) )
|
||||
{
|
||||
// Nothing to Update.
|
||||
continue;
|
||||
}
|
||||
|
||||
// Store Object.
|
||||
%fieldControl.Object = %object;
|
||||
|
||||
// Get Values.
|
||||
%fieldName = %fieldControl.FieldName;
|
||||
%fieldValue = %object.getFieldValue( %fieldName );
|
||||
|
||||
// Update Control?
|
||||
if ( %fieldControl.isMethod( "Update" ) )
|
||||
{
|
||||
// Update.
|
||||
%fieldControl.Update( %fieldName, %fieldValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditor::CreateField( %targetStack, %fieldName, %fieldType )
|
||||
{
|
||||
%fieldWidth = getWord( %targetStack.getExtent(), 0 );
|
||||
%fieldHeight = 20;
|
||||
|
||||
%fieldContainer = new GuiControl()
|
||||
{
|
||||
Profile = "VEditorTransparentProfile";
|
||||
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = %fieldWidth SPC %fieldHeight;
|
||||
};
|
||||
%targetStack.add( %fieldContainer );
|
||||
|
||||
%fieldLabel = new GuiTextCtrl()
|
||||
{
|
||||
Profile = "VEditorTextProfile";
|
||||
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "6 2";
|
||||
Extent = %fieldWidth SPC 18;
|
||||
|
||||
Text = %fieldName;
|
||||
MaxLength = "1024";
|
||||
};
|
||||
%fieldContainer.add( %fieldLabel );
|
||||
|
||||
if ( isMethod( "VerveEditor", "Create" @ %fieldType @ "Field" ) )
|
||||
{
|
||||
// Create the Input Control.
|
||||
eval( "%fieldInput = VerveEditor::Create" @ %fieldType @ "Field( %fieldContainer, %fieldName );" );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Default To String Control.
|
||||
%fieldInput = VerveEditor::CreateStringField( %fieldContainer, %fieldName );
|
||||
}
|
||||
|
||||
return %fieldContainer;
|
||||
}
|
||||
|
||||
function VEditorPropertyField::ApplyValue( %this, %fieldName, %fieldValue )
|
||||
{
|
||||
// Apply Value.
|
||||
%this.Object.setFieldValue( %fieldName, %fieldValue );
|
||||
|
||||
// Update Control.
|
||||
%this.Update( %fieldName, %this.Object.getFieldValue( %fieldName ) );
|
||||
}
|
||||
|
||||
function VerveEditor::CreateSpacer( %targetStack, %spacerHeight )
|
||||
{
|
||||
%fieldWidth = getWord( %targetStack.getExtent(), 0 );
|
||||
%fieldHeight = %spacerHeight;
|
||||
|
||||
%fieldContainer = new GuiControl()
|
||||
{
|
||||
Profile = "VEditorTransparentProfile";
|
||||
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
Extent = %fieldWidth SPC %fieldHeight;
|
||||
};
|
||||
%targetStack.add( %fieldContainer );
|
||||
|
||||
return %fieldContainer;
|
||||
}
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::CanCut()
|
||||
{
|
||||
return VerveEditor::CanCopy();
|
||||
}
|
||||
|
||||
function VerveEditor::CutSelection()
|
||||
{
|
||||
if ( !isObject( $VerveEditor::Controller ) || !VerveEditor::HasSelection() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
%targetObject = $VerveEditor::InspectorObject;
|
||||
if ( isObject( %targetObject ) )
|
||||
{
|
||||
// Write To File.
|
||||
%targetObject.writeFile( $VerveEditor::TemplateVClipboard );
|
||||
|
||||
// Store Object Type.
|
||||
$VerveEditor::TemplateVClipboardObject = %targetObject;
|
||||
|
||||
// Delete Object.
|
||||
%targetObject.Delete();
|
||||
|
||||
// Refresh Editor.
|
||||
VerveEditor::Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditor::CanCopy()
|
||||
{
|
||||
if ( VerveEditor::HasSelection() )
|
||||
{
|
||||
if ( $VerveEditor::InspectorObject == $VerveEditor::Controller )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $VerveEditor::InspectorObject.isMethod( "CanCopy" ) )
|
||||
{
|
||||
if ( !$VerveEditor::InspectorObject.CanCopy() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return ActiveActionMapSet.isMember( VerveEditorEditMap );
|
||||
}
|
||||
|
||||
function VerveEditor::CopySelection()
|
||||
{
|
||||
if ( !isObject( $VerveEditor::Controller ) || !VerveEditor::CanCopy() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
%targetObject = $VerveEditor::InspectorObject;
|
||||
if ( isObject( %targetObject ) )
|
||||
{
|
||||
// Write To File.
|
||||
%targetObject.writeFile( $VerveEditor::TemplateVClipboard );
|
||||
|
||||
// Reference Object.
|
||||
$VerveEditor::TemplateVClipboardObject = %targetObject;
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditor::CanPaste()
|
||||
{
|
||||
if ( !VerveEditor::HasSelection() || !isFile( $VerveEditor::TemplateVClipboard ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return $VerveEditor::InspectorObject.CanPaste( $VerveEditor::TemplateVClipboardObject );
|
||||
}
|
||||
|
||||
function VerveEditor::Paste()
|
||||
{
|
||||
if ( !isObject( $VerveEditor::Controller ) || !VerveEditor::CanPaste() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $VerveEditor::InspectorObject.getId() == $VerveEditor::Controller.getId() )
|
||||
{
|
||||
// Special Paste.
|
||||
VerveEditor::AddTemplateGroup( $VerveEditor::TemplateVClipboard );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( isObject( $VerveEditor::InspectorObject ) )
|
||||
{
|
||||
// Group History Actions.
|
||||
VerveEditor::ToggleHistoryGroup();
|
||||
|
||||
// Read From File.
|
||||
$VerveEditor::InspectorObject.readFile( $VerveEditor::TemplateVClipboard );
|
||||
|
||||
// Finish Up.
|
||||
VerveEditor::ToggleHistoryGroup();
|
||||
|
||||
// Refresh Editor.
|
||||
VerveEditor::Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditor::DeleteSelection()
|
||||
{
|
||||
if ( !isObject( $VerveEditor::Controller ) || !VerveEditor::HasSelection() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
%selectionSet = $VerveEditor::SelectionSet;
|
||||
while ( %selectionSet.getCount() > 0 )
|
||||
{
|
||||
%selection = %selectionSet.getObject( 0 );
|
||||
|
||||
if ( isObject( %selection.SiblingControl ) )
|
||||
{
|
||||
// Delete Sibling Control.
|
||||
%selection.SiblingControl.delete();
|
||||
}
|
||||
|
||||
if ( isObject( %selection.Proxy ) )
|
||||
{
|
||||
// Do Callback?
|
||||
if ( %selection.Proxy.isMethod( "onRemove" ) )
|
||||
{
|
||||
// Quick Callback.
|
||||
%selection.Proxy.onRemove();
|
||||
}
|
||||
|
||||
// Delete Reference Object.
|
||||
%selection.Proxy.delete();
|
||||
}
|
||||
|
||||
// Delete Control.
|
||||
%selection.delete();
|
||||
}
|
||||
|
||||
// Refresh.
|
||||
VerveEditor::Refresh();
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::GetEventManager()
|
||||
{
|
||||
if ( !isObject( $VerveEditor::EventManager ) )
|
||||
{
|
||||
$VerveEditor::EventManager = new EventManager()
|
||||
{
|
||||
Queue = "ProjectEventManager";
|
||||
};
|
||||
}
|
||||
|
||||
return $VerveEditor::EventManager;
|
||||
}
|
||||
|
||||
function VerveEditor::RegisterEvent( %eventName )
|
||||
{
|
||||
if ( !VerveEditor::GetEventManager().isRegisteredEvent( %eventName ) )
|
||||
{
|
||||
// Register Event.
|
||||
VerveEditor::GetEventManager().RegisterEvent( %eventName );
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditor::AddEventNotify( %object, %eventName, %callback )
|
||||
{
|
||||
if ( isObject( $VerveEditor::EventManager ) )
|
||||
{
|
||||
// Subscribe To Event.
|
||||
$VerveEditor::EventManager.SubScribe( %object, %eventName, %callback );
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditor::RemoveEventNotify( %object, %eventName )
|
||||
{
|
||||
if ( isObject( $VerveEditor::EventManager ) )
|
||||
{
|
||||
// Remove Event.
|
||||
$VerveEditor::EventManager.Remove( %object, %eventName );
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditor::PostEvent( %eventName, %refObject )
|
||||
{
|
||||
if ( isObject( $VerveEditor::EventManager ) )
|
||||
{
|
||||
// Notify Event.
|
||||
$VerveEditor::EventManager.PostEvent( %eventName, %refObject );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,248 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveEditor::AddGroup( %groupType )
|
||||
{
|
||||
if ( !isObject( $VerveEditor::Controller ) )
|
||||
{
|
||||
// No Controller.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( %groupType $= "" )
|
||||
{
|
||||
// Default.
|
||||
%groupType = "VGroup";
|
||||
}
|
||||
|
||||
/*
|
||||
// Add Template Group.
|
||||
VerveEditor::AddTemplateGroup( $VerveEditor::TemplateFolder @ "/" @ %groupType @ ".vsf" );
|
||||
*/
|
||||
|
||||
// Get the Name of the Target Group.
|
||||
VerveEditorGroupBuilderGUI.Build( %groupType, "VerveEditor::_AddGroup" );
|
||||
}
|
||||
|
||||
function VerveEditor::_AddGroup( %groupType, %groupLabel )
|
||||
{
|
||||
// Group History Actions.
|
||||
VerveEditor::ToggleHistoryGroup();
|
||||
|
||||
// Create the Group.
|
||||
%groupObject = new ( %groupType )();
|
||||
|
||||
// Add to Group.
|
||||
$VerveEditor::Controller.addObject( %groupObject );
|
||||
|
||||
// Apply the Label.
|
||||
%groupObject.setLabelUnique( %groupLabel );
|
||||
|
||||
// Callback.
|
||||
if ( !%groupObject.OnAdd() )
|
||||
{
|
||||
// Remove Object.
|
||||
$VerveEditor::Controller.removeObject( %groupObject );
|
||||
|
||||
// Delete Object.
|
||||
%groupObject.delete();
|
||||
|
||||
// Finish Up.
|
||||
VerveEditor::ToggleHistoryGroup();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Resolve the Field Stack.
|
||||
%groupObject.ResolveBuildStack( VerveEditorGroupBuilderFieldStack );
|
||||
|
||||
// Finish Up.
|
||||
VerveEditor::ToggleHistoryGroup();
|
||||
|
||||
// Refresh Editor.
|
||||
VerveEditor::Refresh();
|
||||
|
||||
// Set Selection.
|
||||
VerveEditor::SetSelection( %groupObject.Control );
|
||||
}
|
||||
|
||||
function VerveEditor::AddTemplateGroup( %templateFile )
|
||||
{
|
||||
if ( !isObject( $VerveEditor::Controller ) || !isFile( %templateFile ) )
|
||||
{
|
||||
// No Controller.
|
||||
return;
|
||||
}
|
||||
|
||||
// Fetch Current Count.
|
||||
%groupCount = $VerveEditor::Controller.getCount();
|
||||
|
||||
// Group History Actions.
|
||||
VerveEditor::ToggleHistoryGroup();
|
||||
|
||||
// Load Template.
|
||||
$VerveEditor::Controller.readTemplate( %templateFile );
|
||||
|
||||
// Finish Up.
|
||||
VerveEditor::ToggleHistoryGroup();
|
||||
|
||||
%newCount = $VerveEditor::Controller.getCount();
|
||||
if ( %groupCount != %newCount )
|
||||
{
|
||||
if ( %newCount > %groupCount )
|
||||
{
|
||||
// Select New Object.
|
||||
%selectedObject = $VerveEditor::Controller.getObject( %newCount - 1 );
|
||||
}
|
||||
|
||||
// Refresh Editor.
|
||||
VerveEditor::Refresh();
|
||||
|
||||
if ( isObject( %selectedObject ) )
|
||||
{
|
||||
// Set Selection.
|
||||
VerveEditor::SetSelection( %selectedObject.Control );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditor::AddTrack( %trackType, %targetGroup, %refresh )
|
||||
{
|
||||
if ( !isObject( $VerveEditor::Controller ) )
|
||||
{
|
||||
// No Controller.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !isObject( %targetGroup ) )
|
||||
{
|
||||
if ( !isObject( $VerveEditor::InspectorObject ) )
|
||||
{
|
||||
// No Controller or Selection.
|
||||
return;
|
||||
}
|
||||
|
||||
// Use Current Selection.
|
||||
%targetGroup = $VerveEditor::InspectorObject;
|
||||
}
|
||||
|
||||
if ( !%targetGroup.isMemberOfClass( "VGroup" ) )
|
||||
{
|
||||
// Invalid Target.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( %trackType $= "" )
|
||||
{
|
||||
// Default.
|
||||
%trackType = "VTrack";
|
||||
}
|
||||
|
||||
// Create Track.
|
||||
%trackObject = new ( %trackType )();
|
||||
|
||||
// Add to Group.
|
||||
%targetGroup.addObject( %trackObject );
|
||||
|
||||
// Refresh Label.
|
||||
%trackObject.setLabelUnique( %trackObject.Label );
|
||||
|
||||
// Callback.
|
||||
if ( !%trackObject.OnAdd() )
|
||||
{
|
||||
// Remove Object.
|
||||
%targetGroup.removeObject( %trackObject );
|
||||
|
||||
// Delete Object.
|
||||
%trackObject.delete();
|
||||
|
||||
// Return.
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( %refresh $= "" || %refresh == true )
|
||||
{
|
||||
// Refresh.
|
||||
VerveEditor::Refresh();
|
||||
|
||||
// Select New Object.
|
||||
VerveEditor::SetSelection( %trackObject.Control );
|
||||
}
|
||||
|
||||
// Return Track.
|
||||
return %trackObject;
|
||||
}
|
||||
|
||||
function VerveEditor::AddEvent( %targetTrack, %targetTime, %refresh )
|
||||
{
|
||||
if ( !isObject( $VerveEditor::Controller ) )
|
||||
{
|
||||
// No Controller.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !isObject( %targetTrack ) )
|
||||
{
|
||||
if ( !isObject( $VerveEditor::InspectorObject ) )
|
||||
{
|
||||
// No Controller or Selection.
|
||||
return;
|
||||
}
|
||||
|
||||
// Use Current Selection.
|
||||
%targetTrack = $VerveEditor::InspectorObject;
|
||||
}
|
||||
|
||||
if ( !%targetTrack.isMemberOfClass( "VTrack" ) )
|
||||
{
|
||||
// Invalid Target.
|
||||
return;
|
||||
}
|
||||
|
||||
// Create Event.
|
||||
%eventObject = %targetTrack.CreateEvent();
|
||||
if ( !isObject( %eventObject ) )
|
||||
{
|
||||
// Return.
|
||||
return;
|
||||
}
|
||||
|
||||
// Add to Track.
|
||||
%targetTrack.addObject( %eventObject );
|
||||
|
||||
if ( %targetTime $= "" )
|
||||
{
|
||||
// User Controller Time.
|
||||
%targetTime = $VerveEditor::Controller.Time;
|
||||
}
|
||||
|
||||
// Apply Time.
|
||||
%eventObject.SnapToTime( %targetTime, true );
|
||||
|
||||
// Callback.
|
||||
if ( !%eventObject.OnAdd() )
|
||||
{
|
||||
// Remove Object.
|
||||
%targetTrack.removeObject( %eventObject );
|
||||
|
||||
// Delete Object.
|
||||
%eventObject.delete();
|
||||
|
||||
// Return.
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( %refresh $= "" || %refresh == true )
|
||||
{
|
||||
// Refresh.
|
||||
VerveEditor::Refresh();
|
||||
|
||||
// Select Existing Track.
|
||||
VerveEditor::SetSelection( %targetTrack.Control );
|
||||
}
|
||||
|
||||
// Return Event.
|
||||
return %eventObject;
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Verve
|
||||
// Copyright (C) - Violent Tulip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$VerveEditor::TemplateFolder = getMainDotCsDir() @ "/" @ expandFileName( "tools/VerveEditor/Templates" );
|
||||
$VerveEditor::TemplateCustomFolder = $VerveEditor::TemplateFolder @ "/Custom";
|
||||
$VerveEditor::TemplateVClipboard = $VerveEditor::TemplateFolder @ "/VClipboard.vsf";
|
||||
$VerveEditor::TemplateVClipboardObject = "";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function VerveCustomTemplateMenu::Init( %this )
|
||||
{
|
||||
%fieldCount = 0;
|
||||
%fileSpec = $VerveEditor::TemplateCustomFolder @ "/*.vsf";
|
||||
for ( %file = findFirstFile( %fileSpec ); %file !$= ""; %file = findNextFile( %fileSpec ) )
|
||||
{
|
||||
// Create Item.
|
||||
%this.Item[%fieldCount] = "Add" SPC fileBase( %file ) TAB "" TAB "VerveEditor::AddTemplateGroup(\"" @ %file @ "\");";
|
||||
|
||||
// Increment.
|
||||
%fieldCount += 1;
|
||||
}
|
||||
|
||||
// Sort By File Name.
|
||||
for ( %j = 0; %j < %fieldCount; %j++ )
|
||||
{
|
||||
for ( %i = %fieldCount - 1; %i > %j; %i-- )
|
||||
{
|
||||
%itemA = getField( %this.Item[%i - 0], 0 );
|
||||
%itemB = getField( %this.Item[%i - 1], 0 );
|
||||
|
||||
if ( strcmp( strlwr( %itemA ), strlwr( %itemB ) ) < 0 )
|
||||
{
|
||||
// Swap.
|
||||
%itemTmp = %this.Item[%i];
|
||||
%this.Item[%i - 0] = %this.Item[%i - 1];
|
||||
%this.Item[%i - 1] = %itemTmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Parent Init.
|
||||
Parent::Init( %this );
|
||||
}
|
||||
|
||||
function VEditorAddGroupButton::DisplayContextMenu( %this, %x, %y )
|
||||
{
|
||||
// Use Current Controller.
|
||||
%targetController = $VerveEditor::Controller;
|
||||
|
||||
// Get Context Menu.
|
||||
%contextMenu = %targetController.GetAddGroupMenu();
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
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 VEditorAddTrackButton::DisplayContextMenu( %this, %x, %y )
|
||||
{
|
||||
if ( !isObject( $VerveEditor::InspectorObject ) )
|
||||
{
|
||||
// No Controller or Selection.
|
||||
return;
|
||||
}
|
||||
|
||||
// Use Current Selection.
|
||||
%targetGroup = $VerveEditor::InspectorObject;
|
||||
|
||||
if ( !%targetGroup.isMemberOfClass( "VGroup" ) )
|
||||
{
|
||||
// Invalid Target.
|
||||
return;
|
||||
}
|
||||
|
||||
// Get Context Menu.
|
||||
%contextMenu = %targetGroup.GetAddTrackMenu();
|
||||
if ( !isObject( %contextMenu ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( %x $= "" || %y $= "" )
|
||||
{
|
||||
%position = %this.getGlobalPosition();
|
||||
%extent = %this.getExtent();
|
||||
|
||||
%x = getWord( %position, 0 ) + getWord( %extent, 0 );
|
||||
%y = getWord( %position, 1 );
|
||||
}
|
||||
|
||||
// Display.
|
||||
// Display.
|
||||
if($Verve::UseSeparateWindow)
|
||||
%contextMenu.showPopup( VerveEditorWindow, %x, %y );
|
||||
else
|
||||
%contextMenu.showPopup( Canvas, %x, %y );
|
||||
}
|
||||