public void blockBind(ActionMap othermap, string command) { if (othermap.isObject()) { Util._error("ActionMap::blockBind - \"" + othermap + "\" is not an object!"); return; } string bind = othermap.getBinding(command); if (bind != "") this.bind(Util.getField(bind, 0), Util.getField(bind, 1), ""); }
public void blockBind(ActionMap othermap, string command) { if (othermap.isObject()) { Util._error("ActionMap::blockBind - \"" + othermap + "\" is not an object!"); return; } string bind = othermap.getBinding(command); if (bind != "") { this.bind(Util.getField(bind, 0), Util.getField(bind, 1), ""); } }
public void copyBind(ActionMap otherMap, string command) { if (otherMap.isObject()) { Util._error("ActionMap::copyBind - \"" + otherMap + "\" is not an object!"); return; } string bind = otherMap.getBinding(command); if (bind == "") return; string device = Util.getField(bind, 0); string action = Util.getField(bind, 1); string flags = otherMap.isInverted(device, action) ? "SDI" : "SD"; string deadzone = otherMap.getDeadZone(device, action); float scale = otherMap.getScale(device, action); this.bind(device, action, flags, deadzone, scale.AsString(), command); }
public void initialize() { ActionMap map = new ObjectCreator("ActionMap").Create(); map.bindCmd("keyboard", "1", "EWorldEditorNoneModeBtn.performClick();", ""); // Select map.bindCmd("keyboard", "2", "EWorldEditorMoveModeBtn.performClick();", ""); // Move map.bindCmd("keyboard", "3", "EWorldEditorRotateModeBtn.performClick();", ""); // Rotate map.bindCmd("keyboard", "4", "EWorldEditorScaleModeBtn.performClick();", ""); // Scale this.map = map; new ObjectCreator("ScriptObject", "ParticleEditor", typeof (ParticleEditor)).Create(); new ObjectCreator("PersistenceManager", "PE_EmitterSaver").Create(); new ObjectCreator("PersistenceManager", "PE_ParticleSaver").Create(); new ObjectCreator("SimSet", "PE_UnlistedParticles").Create(); new ObjectCreator("SimSet", "PE_UnlistedEmitters").Create(); }
public void initialize() { ActionMap map = new ObjectCreator("ActionMap").Create(); map.bindCmd("keyboard", "backspace", "RoadEditorGui.onDeleteKey();", ""); map.bindCmd("keyboard", "1", "RoadEditorGui.prepSelectionMode();", ""); map.bindCmd("keyboard", "2", "ToolsPaletteArray->RoadEditorMoveMode.performClick();", ""); map.bindCmd("keyboard", "4", "ToolsPaletteArray->RoadEditorScaleMode.performClick();", ""); map.bindCmd("keyboard", "5", "ToolsPaletteArray->RoadEditorAddRoadMode.performClick();", ""); map.bindCmd("keyboard", "=", "ToolsPaletteArray->RoadEditorInsertPointMode.performClick();", ""); map.bindCmd("keyboard", "numpadadd", "ToolsPaletteArray->RoadEditorInsertPointMode.performClick();", ""); map.bindCmd("keyboard", "-", "ToolsPaletteArray->RoadEditorRemovePointMode.performClick();", ""); map.bindCmd("keyboard", "numpadminus", "ToolsPaletteArray->RoadEditorRemovePointMode.performClick();", ""); map.bindCmd("keyboard", "z", "RoadEditorShowSplineBtn.performClick();", ""); map.bindCmd("keyboard", "x", "RoadEditorWireframeBtn.performClick();", ""); map.bindCmd("keyboard", "v", "RoadEditorShowRoadBtn.performClick();", ""); this.map = map; this.initSettings(); }
public void copyBind(ActionMap otherMap, string command) { if (otherMap.isObject()) { Util._error("ActionMap::copyBind - \"" + otherMap + "\" is not an object!"); return; } string bind = otherMap.getBinding(command); if (bind == "") { return; } string device = Util.getField(bind, 0); string action = Util.getField(bind, 1); string flags = otherMap.isInverted(device, action) ? "SDI" : "SD"; string deadzone = otherMap.getDeadZone(device, action); float scale = otherMap.getScale(device, action); this.bind(device, action, flags, deadzone, scale.AsString(), command); }
public void initialize() { ObjectCreator oc_Newobject3 = new ObjectCreator("SimSet", "ForestTools"); ObjectCreator oc_Newobject2 = new ObjectCreator("ForestBrushTool"); oc_Newobject2["internalName"] = "BrushTool"; oc_Newobject2["toolTip"] = "Paint Tool"; oc_Newobject2["buttonImage"] = "tools/forest/images/brushTool"; oc_Newobject3["#Newobject2"] = oc_Newobject2; ObjectCreator oc_Newobject1 = new ObjectCreator("ForestSelectionTool"); oc_Newobject1["internalName"] = "SelectionTool"; oc_Newobject1["toolTip"] = "Selection Tool"; oc_Newobject1["buttonImage"] = "tools/forest/images/selectionTool"; oc_Newobject3["#Newobject1"] = oc_Newobject1; oc_Newobject3.Create(); ActionMap map = new ObjectCreator("ActionMap").Create(); map.bindCmd("keyboard", "1", "ForestEditorSelectModeBtn.performClick();", ""); // Select map.bindCmd("keyboard", "2", "ForestEditorMoveModeBtn.performClick();", ""); // Move map.bindCmd("keyboard", "3", "ForestEditorRotateModeBtn.performClick();", ""); // Rotate map.bindCmd("keyboard", "4", "ForestEditorScaleModeBtn.performClick();", ""); // Scale map.bindCmd("keyboard", "5", "ForestEditorPaintModeBtn.performClick();", ""); // Paint map.bindCmd("keyboard", "6", "ForestEditorEraseModeBtn.performClick();", ""); // Erase map.bindCmd("keyboard", "7", "ForestEditorEraseSelectedModeBtn.performClick();", ""); // EraseSelected map.bindCmd("keyboard", "8", "ForestEditorDropToGroundModeBtn.performClick();", ""); // DropTheBeat //%map.bindCmd( keyboard, "backspace", "ForestEditorGui.onDeleteKey();", "" ); //%map.bindCmd( keyboard, "delete", "ForestEditorGui.onDeleteKey();", "" ); this.map = map; }
public void initialize() { ActionMap map = new ObjectCreator("ActionMap").Create(); map.bindCmd("keyboard", "escape", "ToolsToolbarArray->WorldEditorInspectorPalette.performClick();", ""); map.bindCmd("keyboard", "1", "ShapeEditorNoneModeBtn.performClick();", ""); map.bindCmd("keyboard", "2", "ShapeEditorMoveModeBtn.performClick();", ""); map.bindCmd("keyboard", "3", "ShapeEditorRotateModeBtn.performClick();", ""); //%map.bindCmd( keyboard, "4", "ShapeEditorScaleModeBtn.performClick();", "" ); // not needed for the shape editor map.bindCmd("keyboard", "n", "ShapeEditorToolbar->showNodes.performClick();", ""); map.bindCmd("keyboard", "t", "ShapeEditorToolbar->ghostMode.performClick();", ""); map.bindCmd("keyboard", "r", "ShapeEditorToolbar->wireframeMode.performClick();", ""); map.bindCmd("keyboard", "f", "ShapeEditorToolbar->fitToShapeBtn.performClick();", ""); map.bindCmd("keyboard", "g", "ShapeEditorToolbar->showGridBtn.performClick();", ""); map.bindCmd("keyboard", "h", "ShapeEdSelectWindow->tabBook.selectPage( 2 );", ""); // Load help tab map.bindCmd("keyboard", "l", "ShapeEdSelectWindow->tabBook.selectPage( 1 );", ""); // load Library Tab map.bindCmd("keyboard", "j", "ShapeEdSelectWindow->tabBook.selectPage( 0 );", ""); // load scene object Tab map.bindCmd("keyboard", "SPACE", "ShapeEdAnimWindow.togglePause();", ""); map.bindCmd("keyboard", "i", "ShapeEdSequences.onEditSeqInOut(\"in\", ShapeEdSeqSlider.getValue());", ""); map.bindCmd("keyboard", "o", "ShapeEdSequences.onEditSeqInOut(\"out\", ShapeEdSeqSlider.getValue());", ""); map.bindCmd("keyboard", "shift -", "ShapeEdSeqSlider.setValue(ShapeEdAnimWindow-->seqIn.getText());", ""); map.bindCmd("keyboard", "shift =", "ShapeEdSeqSlider.setValue(ShapeEdAnimWindow-->seqOut.getText());", ""); map.bindCmd("keyboard", "=", "ShapeEdAnimWindow-->stepFwdBtn.performClick();", ""); map.bindCmd("keyboard", "-", "ShapeEdAnimWindow-->stepBkwdBtn.performClick();", ""); this.map = map; this.initSettings(); }
public override void onWorldEditorStartup() { EditorGui EditorGui = "EditorGui"; GuiWindowCollapseCtrl MaterialEditorPropertiesWindow = "MaterialEditorPropertiesWindow"; MaterialEditor.MaterialEditorGui MaterialEditorGui = "MaterialEditorGui"; CubemapData matEdCubeMapPreviewMat = "matEdCubeMapPreviewMat"; CubemapData WarnMatCubeMap = "WarnMatCubeMap"; // Add ourselves to the window menu. string accel = EditorGui.addToEditorsMenu("Material Editor", "", this); // Add ourselves to the ToolsToolbar string tooltip = "Material Editor (" + accel + ")"; EditorGui.addToToolsToolbar("MaterialEditorPlugin", "MaterialEditorPalette", Util._expandFilename("tools/worldEditor/images/toolbar/matterial-editor"), tooltip); //connect editor windows MaterialEditorPropertiesWindow.attachTo("MaterialEditorPreviewWindow"); ActionMap map = new ObjectCreator("ActionMap").Create(); map.bindCmd("keyboard", "1", "EWorldEditorNoneModeBtn.performClick();", ""); // Select map.bindCmd("keyboard", "2", "EWorldEditorMoveModeBtn.performClick();", ""); // Move map.bindCmd("keyboard", "3", "EWorldEditorRotateModeBtn.performClick();", ""); // Rotate map.bindCmd("keyboard", "4", "EWorldEditorScaleModeBtn.performClick();", ""); // Scale map.bindCmd("keyboard", "f", "FitToSelectionBtn.performClick();", ""); // Fit Camera to Selection map.bindCmd("keyboard", "z", "EditorGuiStatusBar.setCamera(\"Standard Camera\");", ""); // Free Camera map.bindCmd("keyboard", "n", "ToggleNodeBar->renderHandleBtn.performClick();", ""); // Render Node map.bindCmd("keyboard", "shift n", "ToggleNodeBar->renderTextBtn.performClick();", ""); // Render Node Text map.bindCmd("keyboard", "alt s", "MaterialEditorGui.save();", ""); // Save Material //%map.bindCmd( keyboard, "delete", "ToggleNodeBar->renderTextBtn.performClick();", "" );// delete Material map.bindCmd("keyboard", "g", "ESnapOptions-->GridSnapButton.performClick();", ""); // Grid Snappping map.bindCmd("keyboard", "t", "SnapToBar->objectSnapDownBtn.performClick();", ""); // Terrain Snapping map.bindCmd("keyboard", "b", "SnapToBar-->objectSnapBtn.performClick();", ""); // Soft Snappping map.bindCmd("keyboard", "v", "EWorldEditorToolbar->boundingBoxColBtn.performClick();", ""); // Bounds Selection map.bindCmd("keyboard", "o", "objectCenterDropdown->objectBoxBtn.performClick(); objectCenterDropdown.toggle();", ""); // Object Center map.bindCmd("keyboard", "p", "objectCenterDropdown->objectBoundsBtn.performClick(); objectCenterDropdown.toggle();", ""); // Bounds Center map.bindCmd("keyboard", "k", "objectTransformDropdown->objectTransformBtn.performClick(); objectTransformDropdown.toggle();", ""); // Object Transform map.bindCmd("keyboard", "l", "objectTransformDropdown->worldTransformBtn.performClick(); objectTransformDropdown.toggle();", ""); // World Transform this.map = map; MaterialEditorGui["fileSpec"] = "Torque Material Files (materials.cs)|materials.cs|All Files (*.*)|*.*"; MaterialEditorGui["textureFormats"] = "Image Files (*.png, *.jpg, *.dds, *.bmp, *.gif, *.jng. *.tga)|*.png;*.jpg;*.dds;*.bmp;*.gif;*.jng;*.tga|All Files (*.*)|*.*"; MaterialEditorGui["modelFormats"] = "DTS Files (*.dts)|*.dts"; MaterialEditorGui["lastTexturePath"] = ""; MaterialEditorGui["lastTextureFile"] = ""; MaterialEditorGui["lastModelPath"] = ""; MaterialEditorGui["lastModelFile"] = ""; MaterialEditorGui.currentMaterial = ""; MaterialEditorGui["lastMaterial"] = ""; MaterialEditorGui["currentCubemap"] = ""; MaterialEditorGui.currentObject = ""; MaterialEditorGui["livePreview"] = "1"; MaterialEditorGui["currentLayer"] = "0"; MaterialEditorGui.currentMode = "Material"; MaterialEditorGui.currentMeshMode = "EditorShape"; ArrayObject UnlistedCubemaps = new ObjectCreator("ArrayObject", "UnlistedCubemaps").Create(); UnlistedCubemaps.add("unlistedCubemaps", matEdCubeMapPreviewMat); UnlistedCubemaps.add("unlistedCubemaps", WarnMatCubeMap); //MaterialEditor persistence manager new ObjectCreator("PersistenceManager", "matEd_PersistMan").Create(); }