Full Template for ticket #1

This commit is contained in:
DavidWyand-GG 2012-09-19 11:54:25 -04:00
parent 74f265b3b3
commit f439dc8dcd
2150 changed files with 286240 additions and 0 deletions

View file

@ -0,0 +1,412 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiRiverEditorCtrl(RiverEditorGui, EditorGuiGroup) {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "RiverEditorProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "0 0";
Extent = "800 600";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Docking = "None";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "0";
AnchorBottom = "0";
AnchorLeft = "0";
AnchorRight = "0";
cameraZRot = "0";
forceFOV = "0";
renderMissionArea = "0";
missionAreaFillColor = "255 0 0 20";
missionAreaFrameColor = "255 0 0 128";
allowBorderMove = "0";
borderMovePixelSize = "20";
borderMoveSpeed = "0.1";
consoleFrameColor = "255 0 0 255";
consoleFillColor = "0 0 0 0";
consoleSphereLevel = "1";
consoleCircleSegments = "32";
consoleLineWidth = "1";
GizmoProfile = "GlobalGizmoProfile";
DefaultWidth = "10";
HoverSplineColor = "0 255 0 255";
SelectedSplineColor = "255 0 255 255";
HoverNodeColor = "255 255 255 255";
new GuiWindowCollapseCtrl(RiverEditorTreeWindow) {
internalName = "";
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "GuiWindowProfile";
HorizSizing = "windowRelative";
VertSizing = "windowRelative";
Position = getWord($pref::Video::mode, 0) - 209
SPC getWord(EditorGuiToolbar.extent, 1) - 1;
Extent = "210 167";
MinExtent = "210 100";
canSave = "1";
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";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
EdgeSnap = "1";
text = "Rivers";
/*
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
internalName = "LockSelection";
Enabled = "1";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "left";
VertSizing = "top";
Position = "167 148";
Extent = "16 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "EWorldEditor.lockSelection(true); EditorTree.toggleLock();";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "World Editor";
hovertime = "1000";
bitmap = "tools/gui/images/lock";
buttonType = "ToggleButton";
groupNum = "-1";
text = "";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
internalName = "DeleteSelection";
Enabled = "1";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "left";
VertSizing = "top";
Position = "185 148";
Extent = "16 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "EditorMenuEditDelete();";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "World Editor";
hovertime = "1000";
bitmap = "tools/gui/images/delete";
buttonType = "PushButton";
groupNum = "-1";
text = "";
useMouseEvents = "0";
};
*/
new GuiContainer(){
profile = GuiDefaultProfile;
Position = "5 25";
Extent = "200 120";
Docking = "Client";
Margin = "3 1 3 3 ";
HorizSizing = "width";
VertSizing = "height";
isContainer = "1";
new GuiScrollCtrl() {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "GuiEditorScrollProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "0 0";
Extent = "200 118";
MinExtent = "8 8";
canSave = "1";
isDecoy = "0";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Docking = "Client";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
lockHorizScroll = "true";
lockVertScroll = "false";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
new GuiTreeViewCtrl(RiverTreeView) {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "GuiTreeViewProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "1 1";
Extent = "193 21";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
tabSize = "16";
textOffset = "2";
fullRowSelect = "0";
itemHeight = "21";
destroyTreeOnSleep = "1";
MouseDragging = "0";
MultipleSelections = "0";
DeleteObjectAllowed = "1";
DragToItemAllowed = "0";
showRoot = "0";
internalNamesOnly = "0";
};
};
};
};
new GuiWindowCollapseCtrl(RiverEditorOptionsWindow) {
internalName = "Window";
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "GuiWindowProfile";
HorizSizing = "windowRelative";
VertSizing = "windowRelative";
Position = getWord($pref::Video::mode, 0) - 209
SPC getWord(EditorGuiToolbar.extent, 1) + getWord(RiverEditorTreeWindow.extent, 1) - 2;
Extent = "210 530";
MinExtent = "210 300";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "0";
AnchorBottom = "0";
AnchorLeft = "0";
AnchorRight = "0";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
EdgeSnap = "1";
text = "Properties";
new GuiContainer(){ //Node Properties
isContainer = "1";
Profile = "inspectorStyleRolloutDarkProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "4 24";
Extent = "202 85";
Docking = "Top";
Margin = "3 3 3 3";
new GuiTextCtrl(){
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "5 0";
Extent = "86 18";
text = "Node Properties";
};
new GuiTextCtrl(){
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "7 21";
Extent = "46 18";
text = "Position";
};
new GuiTextEditCtrl(){
internalName = "position";
Profile = "GuiTextEditProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "57 21";
Extent = "141 18";
text = "";
AltCommand = "RiverEditorGui.editNodeDetails();";
};
new GuiTextCtrl(){
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "7 42";
Extent = "46 18";
text = "Rotation";
};
new GuiTextEditCtrl(){
internalName = "rotation";
Profile = "GuiTextEditProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "57 42";
Extent = "141 18";
text = "";
AltCommand = "RiverEditorGui.editNodeDetails();";
};
new GuiTextCtrl(){
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "7 63";
Extent = "46 18";
text = "Width";
};
new GuiTextEditCtrl(){
internalName = "width";
Profile = "GuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "57 63";
Extent = "52 18";
text = "";
AltCommand = "RiverEditorGui.editNodeDetails();";
};
new GuiTextCtrl(){
Profile = "GuiTextRightProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "110 63";
Extent = "32 18";
text = "Depth";
};
new GuiTextEditCtrl(){
internalName = "depth";
Profile = "GuiTextEditProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "146 63";
Extent = "52 18";
text = "";
AltCommand = "RiverEditorGui.editNodeDetails();";
};
};
new GuiContainer(){ //River Properties
isContainer = "1";
Profile = "inspectorStyleRolloutDarkProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "4 112";
Extent = "202 31";
Docking = "Top";
Margin = "0 0 3 3";
new GuiTextCtrl(){
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "5 0";
Extent = "121 18";
text = "River Properties";
};
};
new GuiScrollCtrl() {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "GuiEditorScrollProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "4 129";
Extent = "202 357";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Docking = "Client";
Margin = "-14 41 3 3";
Padding = "0 0 0 0";
AnchorTop = "0";
AnchorBottom = "0";
AnchorLeft = "0";
AnchorRight = "0";
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
lockHorizScroll = "true";
lockVertScroll = "false";
constantThumbHeight = "0";
childMargin = "0 0";
new GuiInspector(RiverInspector) {
StackingType = "Vertical";
HorizStacking = "Left to Right";
VertStacking = "Top to Bottom";
Padding = "1";
name = "RiverInspector";
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "GuiTransparentProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "1 1";
Extent = "178 16";
MinExtent = "16 16";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
dividerMargin = "5";
};
};
new GuiMLTextCtrl(RiverFieldInfoControl) {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "GuiInspectorFieldInfoMLTextProfile";
HorizSizing = "width";
VertSizing = "top";
Position = "1 485";
Extent = "202 42";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
useURLMouseCursor = "0";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,517 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(RiverEditorSettingsTab,EditorGuiGroup) {
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "800 600";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
new GuiTabPageCtrl(ERiverEditorSettingsPage) {
fitBook = "1";
text = "River Editor";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "1";
Profile = "GuiSolidDefaultProfile";
HorizSizing = "width";
VertSizing = "height";
position = "0 0";
Extent = "208 400";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
new GuiScrollCtrl() {
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
lockHorizScroll = "1";
lockVertScroll = "0";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "1";
Profile = "GuiScrollProfile";
HorizSizing = "width";
VertSizing = "height";
position = "0 0";
Extent = "208 400";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
new GuiStackControl() {
StackingType = "Vertical";
HorizStacking = "Left to Right";
VertStacking = "Top to Bottom";
Padding = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "1 1";
extent = "208 210";
MinExtent = "8 2";
canSave = "1";
isDecoy = "0";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
new GuiRolloutCtrl() {
Profile = "GuiRolloutProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "10 10";
extent = "208 95";
Caption = "Defaults";
Margin = "0 3 0 0";
DragSizable = false;
container = true;
new GuiStackControl() {
StackingType = "Vertical";
HorizStacking = "Left to Right";
VertStacking = "Top to Bottom";
Padding = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "0 0";
Extent = "208 0";
MinExtent = "8 2";
canSave = "1";
isDecoy = "0";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
padding = "3";
new GuiControl() {
isContainer = "1";
horizSizing = "right";
vertSizing = "bottom";
extent = "208 18";
new GuiTextCtrl() {
text = "Width:";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "0";
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 1";
Extent = "70 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl() {
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 = "GuiTextEditNumericProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "81 0";
Extent = "121 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
class = "ESettingsWindowTextEdit";
className = "ESettingsWindowTextEdit";
editorSettingsRead = "RiverEditorPlugin.readSettings();";
editorSettingsValue = "RiverEditor/DefaultWidth";
editorSettingsWrite = "RiverEditorPlugin.writeSettings();";
};
};
new GuiControl() {
isContainer = "1";
horizSizing = "right";
vertSizing = "bottom";
extent = "208 18";
new GuiTextCtrl() {
text = "Depth:";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "0";
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 1";
Extent = "70 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl() {
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 = "GuiTextEditNumericProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "81 0";
Extent = "121 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
class = "ESettingsWindowTextEdit";
className = "ESettingsWindowTextEdit";
editorSettingsRead = "RiverEditorPlugin.readSettings();";
editorSettingsValue = "RiverEditor/DefaultDepth";
editorSettingsWrite = "RiverEditorPlugin.writeSettings();";
};
};
new GuiControl() {
isContainer = "1";
horizSizing = "right";
vertSizing = "bottom";
extent = "208 18";
new GuiTextCtrl() {
text = "Normal:";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "0";
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 1";
Extent = "70 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl() {
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 = "81 0";
Extent = "121 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
class = "ESettingsWindowTextEdit";
className = "ESettingsWindowTextEdit";
editorSettingsRead = "RiverEditorPlugin.readSettings();";
editorSettingsValue = "RiverEditor/DefaultNormal";
editorSettingsWrite = "RiverEditorPlugin.writeSettings();";
};
};
};
};
new GuiRolloutCtrl() {
Profile = "GuiRolloutProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "10 10";
extent = "208 95";
Caption = "Colors";
Margin = "0 3 0 0";
DragSizable = false;
container = true;
new GuiStackControl() {
StackingType = "Vertical";
HorizStacking = "Left to Right";
VertStacking = "Top to Bottom";
Padding = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "0 0";
Extent = "208 0";
MinExtent = "8 2";
canSave = "1";
isDecoy = "0";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
padding = "3";
new GuiControl() {
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 10";
Extent = "208 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
class = "ESettingsWindowColor";
className = "ESettingsWindowColor";
editorSettingsRead = "RiverEditorPlugin.readSettings();";
editorSettingsValue = "RiverEditor/HoverSplineColor";
editorSettingsWrite = "RiverEditorPlugin.writeSettings();";
new GuiTextCtrl() {
text = "Hover Spline:";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "0";
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 1";
Extent = "70 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
};
new GuiTextEditCtrl() {
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 = "80 0";
Extent = "104 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "ColorEdit";
canSaveDynamicFields = "1";
class = "ESettingsWindowColorEdit";
className = "ESettingsWindowColorEdit";
};
new GuiSwatchButtonCtrl() {
color = "1 1 1 1";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "188 2";
extent = "14 14";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "ColorButton";
canSaveDynamicFields = "1";
class = "ESettingsWindowColorButton";
className = "ESettingsWindowColorButton";
};
};
new GuiControl() {
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 30";
Extent = "208 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
class = "ESettingsWindowColor";
className = "ESettingsWindowColor";
editorSettingsRead = "RiverEditorPlugin.readSettings();";
editorSettingsValue = "RiverEditor/SelectedSplineColor";
editorSettingsWrite = "RiverEditorPlugin.writeSettings();";
new GuiTextCtrl() {
text = "Sel. Spline:";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "0";
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 1";
Extent = "70 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
};
new GuiTextEditCtrl() {
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 = "80 0";
Extent = "104 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "ColorEdit";
canSaveDynamicFields = "1";
class = "ESettingsWindowColorEdit";
className = "ESettingsWindowColorEdit";
};
new GuiSwatchButtonCtrl() {
color = "1 1 1 1";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "188 2";
extent = "14 14";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "ColorButton";
canSaveDynamicFields = "1";
class = "ESettingsWindowColorButton";
className = "ESettingsWindowColorButton";
};
};
};
};
};
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,323 @@
%guiContent = new GuiControl(RiverEditorToolbar, EditorGuiGroup) {
canSaveDynamicFields = "0";
internalName = "MeshRoadEditorToolbar";
Enabled = "1";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "306 0";
Extent = "800 32";
MinExtent = "8 2";
canSave = "1";
Visible = "0";
hovertime = "1000";
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "6 6";
extent = "100 20";
minExtent = "8 8";
visible = "1";
text = "River Settings";
maxLength = "255";
helpTag = "0";
};
new GuiDynamicCtrlArrayControl(){
Position = "83 3";
extent = "111 32";
colCount = "31";
colSize = "29";
rowCount = "1";
RowSize = "27";
rowSpacing = "2";
colspacing = "4";
new GuiBitmapButtonCtrl(RiverEditorShowSplineBtn) {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "167 3";
Extent = "29 27";
MinExtent = "8 2";
canSave = "1";
isDecoy = "0";
Visible = "1";
Variable = "$River::showSpline";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
toolTip = "Show Spline";
bitmap = "tools/worldEditor/images/road-river/menubar/show-spline";
groupNum = "7";
buttonType = "ToggleButton";
useMouseEvents = "0";
useInactiveState = "0";
};
new GuiBitmapButtonCtrl(RiverEditorWireframeBtn) {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "253 3";
Extent = "29 27";
MinExtent = "8 2";
canSave = "1";
isDecoy = "0";
Visible = "1";
Variable = "$River::showWireframe";
Command = "$River::showWireframe = $ThisControl.getValue();";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
toolTip = "Show Wireframe";
bitmap = "tools/worldEditor/images/road-river/menubar/show-wireframe";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
useInactiveState = "0";
};
new GuiBitmapButtonCtrl(RiverEditorShowRoadBtn) {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "GuiDefalutProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "89 3";
Extent = "29 27";
MinExtent = "8 2";
canSave = "1";
isDecoy = "0";
Visible = "1";
Variable = "$River::showRiver";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
toolTip = "Show River Texture";
bitmap = "tools/worldEditor/images/road-river/menubar/show-texture";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
useInactiveState = "0";
};
};
new GuiControl(RiverDefaultWidthTextEditContainer) {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiTransparentProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "197 5";
Extent = "120 50";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
new GuiTextCtrl() {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "GuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 6";
Extent = "68 10";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
text = "Default Width";
maxLength = "1024";
};
new GuiTextEditCtrl() {
canSaveDynamicFields = "0";
internalName = "textEdit";
isContainer = "0";
profile="GuiNumericDropSliderTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "67 2";
Extent = "42 16";
MinExtent = "8 16";
canSave = "1";
Visible = "1";
Command = "RiverEditorGui.DefaultWidth = $ThisControl.getValue();";
hovertime = "1000";
text = "10";
maxLength = "3";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "101 2";
Extent = "18 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "Canvas.pushDialog(RiverDefaultWidthSliderCtrlContainer);";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Changes Default River Width";
hovertime = "750";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "core/art/gui/images/dropslider";
};
};
new GuiControl(RiverDefaultDepthTextEditContainer) {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiTransparentProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "327 5";
Extent = "120 50";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
new GuiTextCtrl() {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "GuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 6";
Extent = "68 10";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
text = "Default Depth";
maxLength = "1024";
};
new GuiTextEditCtrl() {
canSaveDynamicFields = "0";
internalName = "textEdit";
isContainer = "0";
profile="GuiNumericDropSliderTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "67 2";
Extent = "42 16";
MinExtent = "8 16";
canSave = "1";
Visible = "1";
Command = "RiverEditorGui.DefaultDepth = $ThisControl.getValue();";
hovertime = "1000";
text = "10";
maxLength = "3";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "101 2";
Extent = "18 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "Canvas.pushDialog(RiverDefaultDepthSliderCtrlContainer);";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Changes Default River Depth";
hovertime = "750";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "core/art/gui/images/dropslider";
};
};
};
new GuiMouseEventCtrl(RiverDefaultWidthSliderCtrlContainer, EditorGuiGroup) {
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "1024 768";
minExtent = "8 8";
visible = "1";
helpTag = "0";
class = "EditorDropdownSliderContainer";
new GuiSliderCtrl() {
canSaveDynamicFields = "0";
internalName = "slider";
isContainer = "0";
Profile = "GuiSliderBoxProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = firstWord(RiverDefaultWidthTextEditContainer.position) + firstWord(RiverEditorToolbar.position) + 10 SPC
(getWord(RiverDefaultWidthTextEditContainer, 1)) + 25;
Extent = "112 20";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
AltCommand = "RiverDefaultWidthTextEditContainer-->textEdit.setText( mFloatLength($ThisControl.getValue(), 2)); RiverEditorGui.DefaultWidth = $ThisControl.getValue();";
range = "0 100";
ticks = "0";
value = "10";
};
};
new GuiMouseEventCtrl(RiverDefaultDepthSliderCtrlContainer, EditorGuiGroup) {
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "1024 768";
minExtent = "8 8";
visible = "1";
helpTag = "0";
class = "EditorDropdownSliderContainer";
new GuiSliderCtrl() {
canSaveDynamicFields = "0";
internalName = "slider";
isContainer = "0";
Profile = "GuiSliderBoxProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = firstWord(RiverDefaultDepthTextEditContainer.position) + firstWord(RiverEditorToolbar.position) + 10 SPC
(getWord(RiverDefaultDepthTextEditContainer, 1)) + 25;
Extent = "112 20";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
AltCommand = "RiverDefaultDepthTextEditContainer-->textEdit.setValue( mFloatLength($ThisControl.getValue(), 2)); RiverEditorGui.DefaultWidth = $ThisControl.getValue();";
range = "0 100";
ticks = "0";
value = "10";
};
};

View file

@ -0,0 +1,230 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
function initializeRiverEditor()
{
echo(" % - Initializing River Editor");
exec( "./riverEditor.cs" );
exec( "./riverEditorGui.gui" );
exec( "./riverEditorToolbar.gui" );
exec( "./riverEditorGui.cs" );
// Add ourselves to EditorGui, where all the other tools reside
RiverEditorGui.setVisible( false );
RiverEditorToolbar.setVisible(false);
RiverEditorOptionsWindow.setVisible( false );
RiverEditorTreeWindow.setVisible( false );
EditorGui.add( RiverEditorGui );
EditorGui.add( RiverEditorToolbar );
EditorGui.add( RiverEditorOptionsWindow );
EditorGui.add( RiverEditorTreeWindow );
new ScriptObject( RiverEditorPlugin )
{
superClass = "EditorPlugin";
editorGui = RiverEditorGui;
};
%map = new ActionMap();
%map.bindCmd( keyboard, "backspace", "RiverEditorGui.deleteNode();", "" );
%map.bindCmd( keyboard, "1", "RiverEditorGui.prepSelectionMode();", "" );
%map.bindCmd( keyboard, "2", "ToolsPaletteArray->RiverEditorMoveMode.performClick();", "" );
%map.bindCmd( keyboard, "3", "ToolsPaletteArray->RiverEditorRotateMode.performClick();", "" );
%map.bindCmd( keyboard, "4", "ToolsPaletteArray->RiverEditorScaleMode.performClick();", "" );
%map.bindCmd( keyboard, "5", "ToolsPaletteArray->RiverEditorAddRiverMode.performClick();", "" );
%map.bindCmd( keyboard, "=", "ToolsPaletteArray->RiverEditorInsertPointMode.performClick();", "" );
%map.bindCmd( keyboard, "numpadadd", "ToolsPaletteArray->RiverEditorInsertPointMode.performClick();", "" );
%map.bindCmd( keyboard, "-", "ToolsPaletteArray->RiverEditorRemovePointMode.performClick();", "" );
%map.bindCmd( keyboard, "numpadminus", "ToolsPaletteArray->RiverEditorRemovePointMode.performClick();", "" );
%map.bindCmd( keyboard, "z", "RiverEditorShowSplineBtn.performClick();", "" );
%map.bindCmd( keyboard, "x", "RiverEditorWireframeBtn.performClick();", "" );
%map.bindCmd( keyboard, "v", "RiverEditorShowRoadBtn.performClick();", "" );
RiverEditorPlugin.map = %map;
RiverEditorPlugin.initSettings();
}
function destroyRiverEditor()
{
}
function RiverEditorPlugin::onWorldEditorStartup( %this )
{
// Add ourselves to the window menu.
%accel = EditorGui.addToEditorsMenu( "River Editor", "", RiverEditorPlugin );
// Add ourselves to the ToolsToolbar
%tooltip = "River Editor (" @ %accel @ ")";
EditorGui.addToToolsToolbar( "RiverEditorPlugin", "RiverEditorPalette", expandFilename("tools/worldEditor/images/toolbar/river-editor"), %tooltip );
//connect editor windows
GuiWindowCtrl::attach( RiverEditorOptionsWindow, RiverEditorTreeWindow);
// Add ourselves to the Editor Settings window
exec( "./RiverEditorSettingsTab.gui" );
ESettingsWindow.addTabPage( ERiverEditorSettingsPage );
}
function RiverEditorPlugin::onActivated( %this )
{
%this.readSettings();
$River::EditorOpen = true;
ToolsPaletteArray->RiverEditorAddRiverMode.performClick();
EditorGui.bringToFront( RiverEditorGui );
RiverEditorGui.setVisible(true);
RiverEditorGui.makeFirstResponder( true );
RiverEditorToolbar.setVisible(true);
RiverEditorOptionsWindow.setVisible( true );
RiverEditorTreeWindow.setVisible( true );
RiverTreeView.open(ServerRiverSet,true);
%this.map.push();
// Store this on a dynamic field
// in order to restore whatever setting
// the user had before.
%this.prevGizmoAlignment = GlobalGizmoProfile.alignment;
// The DecalEditor always uses Object alignment.
GlobalGizmoProfile.alignment = "Object";
// Set the status bar here until all tool have been hooked up
EditorGuiStatusBar.setInfo("River editor.");
EditorGuiStatusBar.setSelection("");
// Allow the Gui to setup.
RiverEditorGui.onEditorActivated();
Parent::onActivated(%this);
}
function RiverEditorPlugin::onDeactivated( %this )
{
%this.writeSettings();
$River::EditorOpen = false;
RiverEditorGui.setVisible(false);
RiverEditorToolbar.setVisible(false);
RiverEditorOptionsWindow.setVisible( false );
RiverEditorTreeWindow.setVisible( false );
%this.map.pop();
// Restore the previous Gizmo
// alignment settings.
GlobalGizmoProfile.alignment = %this.prevGizmoAlignment;
// Allow the Gui to cleanup.
RiverEditorGui.onEditorDeactivated();
Parent::onDeactivated(%this);
}
function RiverEditorPlugin::onEditMenuSelect( %this, %editMenu )
{
%hasSelection = false;
if( isObject( RiverEditorGui.river ) )
%hasSelection = true;
%editMenu.enableItem( 3, false ); // Cut
%editMenu.enableItem( 4, false ); // Copy
%editMenu.enableItem( 5, false ); // Paste
%editMenu.enableItem( 6, %hasSelection ); // Delete
%editMenu.enableItem( 8, false ); // Deselect
}
function RiverEditorPlugin::handleDelete( %this )
{
RiverEditorGui.deleteNode();
}
function RiverEditorPlugin::handleEscape( %this )
{
return RiverEditorGui.onEscapePressed();
}
function RiverEditorPlugin::isDirty( %this )
{
return RiverEditorGui.isDirty;
}
function RiverEditorPlugin::onSaveMission( %this, %missionFile )
{
if( RiverEditorGui.isDirty )
{
MissionGroup.save( %missionFile );
RiverEditorGui.isDirty = false;
}
}
//-----------------------------------------------------------------------------
// Settings
//-----------------------------------------------------------------------------
function RiverEditorPlugin::initSettings( %this )
{
EditorSettings.beginGroup( "RiverEditor", true );
EditorSettings.setDefaultValue( "DefaultWidth", "10" );
EditorSettings.setDefaultValue( "DefaultDepth", "5" );
EditorSettings.setDefaultValue( "DefaultNormal", "0 0 1" );
EditorSettings.setDefaultValue( "HoverSplineColor", "255 0 0 255" );
EditorSettings.setDefaultValue( "SelectedSplineColor", "0 255 0 255" );
EditorSettings.setDefaultValue( "HoverNodeColor", "255 255 255 255" ); //<-- Not currently used
EditorSettings.endGroup();
}
function RiverEditorPlugin::readSettings( %this )
{
EditorSettings.beginGroup( "RiverEditor", true );
RiverEditorGui.DefaultWidth = EditorSettings.value("DefaultWidth");
RiverEditorGui.DefaultDepth = EditorSettings.value("DefaultDepth");
RiverEditorGui.DefaultNormal = EditorSettings.value("DefaultNormal");
RiverEditorGui.HoverSplineColor = EditorSettings.value("HoverSplineColor");
RiverEditorGui.SelectedSplineColor = EditorSettings.value("SelectedSplineColor");
RiverEditorGui.HoverNodeColor = EditorSettings.value("HoverNodeColor");
EditorSettings.endGroup();
}
function RiverEditorPlugin::writeSettings( %this )
{
EditorSettings.beginGroup( "RiverEditor", true );
EditorSettings.setValue( "DefaultWidth", RiverEditorGui.DefaultWidth );
EditorSettings.setValue( "DefaultDepth", RiverEditorGui.DefaultDepth );
EditorSettings.setValue( "DefaultNormal", RiverEditorGui.DefaultNormal );
EditorSettings.setValue( "HoverSplineColor", RiverEditorGui.HoverSplineColor );
EditorSettings.setValue( "SelectedSplineColor", RiverEditorGui.SelectedSplineColor );
EditorSettings.setValue( "HoverNodeColor", RiverEditorGui.HoverNodeColor );
EditorSettings.endGroup();
}

View file

@ -0,0 +1,37 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
singleton GuiControlProfile( RiverEditorProfile )
{
canKeyFocus = true;
opaque = true;
fillColor = "192 192 192 192";
category = "Editor";
};
singleton GuiControlProfile (GuiSimpleBorderProfile)
{
opaque = false;
border = 1;
category = "Editor";
};

View file

@ -0,0 +1,262 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
$River::EditorOpen = false;
$River::wireframe = true;
$River::showSpline = true;
$River::showRiver = true;
$River::showWalls = true;
function RiverEditorGui::onEditorActivated( %this )
{
%count = EWorldEditor.getSelectionSize();
for ( %i = 0; %i < %count; %i++ )
{
%obj = EWorldEditor.getSelectedObject(%i);
if ( %obj.getClassName() !$= "River" )
EWorldEditor.unselectObject( %obj );
else
%this.setSelectedRiver( %obj );
}
%this.onRiverSelected( %this.getSelectedRiver() );
%this.onNodeSelected(-1);
}
function RiverEditorGui::onEditorDeactivated( %this )
{
}
function RiverEditorGui::createRiver( %this )
{
%river = new River()
{
rippleDir[0] = "0.000000 1.000000";
rippleDir[1] = "0.707000 0.707000";
rippleDir[2] = "0.500000 0.860000";
rippleSpeed[0] = "-0.065";
rippleSpeed[1] = "0.09";
rippleSpeed[2] = "0.04";
rippleTexScale[0] = "7.140000 7.140000";
rippleTexScale[1] = "6.250000 12.500000";
rippleTexScale[2] = "50.000000 50.000000";
waveDir[0] = "0.000000 1.000000";
waveDir[1] = "0.707000 0.707000";
waveDir[2] = "0.500000 0.860000";
waveSpeed[0] = "1";
waveSpeed[1] = "1";
waveSpeed[2] = "1";
waveMagnitude[0] = "0.2";
waveMagnitude[1] = "0.2";
waveMagnitude[2] = "0.2";
baseColor = "45 108 171 255";
rippleTex = "core/art/water/ripple.dds";
foamTex = "core/art/water/foam";
cubemap = "DefaultSkyCubemap";
depthGradientTex = "core/art/water/depthcolor_ramp";
};
return %river;
}
function RiverEditorGui::paletteSync( %this, %mode )
{
%evalShortcut = "ToolsPaletteArray-->" @ %mode @ ".setStateOn(1);";
eval(%evalShortcut);
}
function RiverEditorGui::onEscapePressed( %this )
{
if( %this.getMode() $= "RiverEditorAddNodeMode" )
{
%this.prepSelectionMode();
return true;
}
return false;
}
function RiverEditorGui::onRiverSelected( %this, %river )
{
%this.river = %river;
RiverInspector.inspect( %river );
RiverTreeView.buildVisibleTree(true);
if( RiverTreeView.getSelectedObject() != %river )
{
RiverTreeView.clearSelection();
%treeId = RiverTreeView.findItemByObjectId( %river );
RiverTreeView.selectItem( %treeId );
}
}
function RiverEditorGui::onNodeSelected( %this, %nodeIdx )
{
if ( %nodeIdx == -1 )
{
RiverEditorOptionsWindow-->position.setActive( false );
RiverEditorOptionsWindow-->position.setValue( "" );
RiverEditorOptionsWindow-->rotation.setActive( false );
RiverEditorOptionsWindow-->rotation.setValue( "" );
RiverEditorOptionsWindow-->width.setActive( false );
RiverEditorOptionsWindow-->width.setValue( "" );
RiverEditorOptionsWindow-->depth.setActive( false );
RiverEditorOptionsWindow-->depth.setValue( "" );
}
else
{
RiverEditorOptionsWindow-->position.setActive( true );
RiverEditorOptionsWindow-->position.setValue( %this.getNodePosition() );
RiverEditorOptionsWindow-->rotation.setActive( true );
RiverEditorOptionsWindow-->rotation.setValue( %this.getNodeNormal() );
RiverEditorOptionsWindow-->width.setActive( true );
RiverEditorOptionsWindow-->width.setValue( %this.getNodeWidth() );
RiverEditorOptionsWindow-->depth.setActive( true );
RiverEditorOptionsWindow-->depth.setValue( %this.getNodeDepth() );
}
}
function RiverEditorGui::onNodeModified( %this, %nodeIdx )
{
RiverEditorOptionsWindow-->position.setValue( %this.getNodePosition() );
RiverEditorOptionsWindow-->rotation.setValue( %this.getNodeNormal() );
RiverEditorOptionsWindow-->width.setValue( %this.getNodeWidth() );
RiverEditorOptionsWindow-->depth.setValue( %this.getNodeDepth() );
}
function RiverEditorGui::editNodeDetails( %this )
{
%this.setNodePosition( RiverEditorOptionsWindow-->position.getText() );
%this.setNodeNormal( RiverEditorOptionsWindow-->rotation.getText() );
%this.setNodeWidth( RiverEditorOptionsWindow-->width.getText() );
%this.setNodeDepth( RiverEditorOptionsWindow-->depth.getText() );
}
function RiverInspector::inspect( %this, %obj )
{
%name = "";
if ( isObject( %obj ) )
%name = %obj.getName();
else
RiverFieldInfoControl.setText( "" );
//RiverInspectorNameEdit.setValue( %name );
Parent::inspect( %this, %obj );
}
function RiverInspector::onInspectorFieldModified( %this, %object, %fieldName, %arrayIndex, %oldValue, %newValue )
{
// Same work to do as for the regular WorldEditor Inspector.
Inspector::onInspectorFieldModified( %this, %object, %fieldName, %arrayIndex, %oldValue, %newValue );
}
function RiverInspector::onFieldSelected( %this, %fieldName, %fieldTypeStr, %fieldDoc )
{
RiverFieldInfoControl.setText( "<font:ArialBold:14>" @ %fieldName @ "<font:ArialItalic:14> (" @ %fieldTypeStr @ ") " NL "<font:Arial:14>" @ %fieldDoc );
}
function RiverTreeView::onInspect(%this, %obj)
{
RiverInspector.inspect(%obj);
}
function RiverTreeView::onSelect(%this, %obj)
{
RiverEditorGui.road = %obj;
RiverInspector.inspect( %obj );
if(%obj != RiverEditorGui.getSelectedRiver())
{
RiverEditorGui.setSelectedRiver( %obj );
}
}
function RiverEditorGui::prepSelectionMode( %this )
{
%mode = %this.getMode();
if ( %mode $= "RiverEditorAddNodeMode" )
{
if ( isObject( %this.getSelectedRiver() ) )
%this.deleteNode();
}
%this.setMode( "RiverEditorSelectMode" );
ToolsPaletteArray-->RiverEditorSelectMode.setStateOn(1);
}
//------------------------------------------------------------------------------
function ERiverEditorSelectModeBtn::onClick(%this)
{
EditorGuiStatusBar.setInfo(%this.ToolTip);
}
function ERiverEditorAddModeBtn::onClick(%this)
{
EditorGuiStatusBar.setInfo(%this.ToolTip);
}
function ERiverEditorMoveModeBtn::onClick(%this)
{
EditorGuiStatusBar.setInfo(%this.ToolTip);
}
function ERiverEditorRotateModeBtn::onClick(%this)
{
EditorGuiStatusBar.setInfo(%this.ToolTip);
}
function ERiverEditorScaleModeBtn::onClick(%this)
{
EditorGuiStatusBar.setInfo(%this.ToolTip);
}
function ERiverEditorInsertModeBtn::onClick(%this)
{
EditorGuiStatusBar.setInfo(%this.ToolTip);
}
function ERiverEditorRemoveModeBtn::onClick(%this)
{
EditorGuiStatusBar.setInfo(%this.ToolTip);
}
function RiverDefaultWidthSliderCtrlContainer::onWake(%this)
{
RiverDefaultWidthSliderCtrlContainer-->slider.setValue(RiverDefaultWidthTextEditContainer-->textEdit.getText());
}
function RiverDefaultDepthSliderCtrlContainer::onWake(%this)
{
RiverDefaultDepthSliderCtrlContainer-->slider.setValue(RiverDefaultDepthTextEditContainer-->textEdit.getText());
}