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", "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 override void onWorldEditorStartup() { EditorGui EditorGui = "EditorGui"; base.onWorldEditorStartup(); // Add ourselves to the window menu. string accel = EditorGui.addToEditorsMenu("Terrain Editor", "", this); // Add ourselves to the ToolsToolbar string tooltip = "Terrain Editor (" + accel + ")"; EditorGui.addToToolsToolbar("TerrainEditorPlugin", "TerrainEditorPalette", Util._expandFilename("tools/worldEditor/images/toolbar/sculpt-terrain"), tooltip); ActionMap map = new ObjectCreator("ActionMap").Create(); map.bindCmd("keyboard", "1", "ToolsPaletteArray->brushAdjustHeight.performClick();", ""); //Grab Terrain map.bindCmd("keyboard", "2", "ToolsPaletteArray->raiseHeight.performClick();", ""); // Raise Height map.bindCmd("keyboard", "3", "ToolsPaletteArray->lowerHeight.performClick();", ""); // Lower Height map.bindCmd("keyboard", "4", "ToolsPaletteArray->smoothHeight.performClick();", ""); // Average Height map.bindCmd("keyboard", "5", "ToolsPaletteArray->smoothSlope.performClick();", ""); // Smooth Slope map.bindCmd("keyboard", "6", "ToolsPaletteArray->paintNoise.performClick();", ""); // Noise map.bindCmd("keyboard", "7", "ToolsPaletteArray->flattenHeight.performClick();", ""); // Flatten map.bindCmd("keyboard", "8", "ToolsPaletteArray->setHeight.performClick();", ""); // Set Height map.bindCmd("keyboard", "9", "ToolsPaletteArray->setEmpty.performClick();", ""); // Clear Terrain map.bindCmd("keyboard", "0", "ToolsPaletteArray->clearEmpty.performClick();", ""); // Restore Terrain map.bindCmd("keyboard", "v", "EWTerrainEditToolbarBrushType->ellipse.performClick();", ""); // Circle Brush map.bindCmd("keyboard", "b", "EWTerrainEditToolbarBrushType->box.performClick();", ""); // Box Brush map.bindCmd("keyboard", "=", "TerrainEditorPlugin.keyboardModifyBrushSize(1);", ""); // +1 Brush Size map.bindCmd("keyboard", "+", "TerrainEditorPlugin.keyboardModifyBrushSize(1);", ""); // +1 Brush Size map.bindCmd("keyboard", "-", "TerrainEditorPlugin.keyboardModifyBrushSize(-1);", ""); // -1 Brush Size map.bindCmd("keyboard", "[", "TerrainEditorPlugin.keyboardModifyBrushSize(-5);", ""); // -5 Brush Size map.bindCmd("keyboard", "]", "TerrainEditorPlugin.keyboardModifyBrushSize(5);", ""); // +5 Brush Size this["map"] = map; ObjectCreator oc = new ObjectCreator("PopupMenu", "", typeof (MenuBuilder)); //oc["superClass"] = "MenuBuilder"; oc["barTitle"] = "Terrain"; oc["item[0]"] = "Smooth Heightmap" + "\t" + "" + "\t" + "ETerrainEditor.onSmoothHeightmap();"; oc["item[1]"] = "Solder Edges" + "\t" + "" + "\t" + "ETerrainEditor.onSolderEdges();"; this["terrainMenu"] = oc.Create().AsString(); }
public override void onWorldEditorStartup() { EditorGui EditorGui = "EditorGui"; base.onWorldEditorStartup(); // Add ourselves to the window menu. string accel = EditorGui.addToEditorsMenu("Terrain Painter", "", this); // Add ourselves to the ToolsToolbar string tooltip = "Terrain Painter (" + accel + ")"; EditorGui.addToToolsToolbar("TerrainPainterPlugin", "TerrainPainterPalette", Util._expandFilename("tools/worldEditor/images/toolbar/paint-terrain"), tooltip); ActionMap map = new ObjectCreator("ActionMap").Create(); string keyboard = "keyboard"; map.bindCmd(keyboard, "v", "EWTerrainPainterToolbarBrushType->ellipse.performClick();", ""); // Circle Brush map.bindCmd(keyboard, "b", "EWTerrainPainterToolbarBrushType->box.performClick();", ""); // Box Brush map.bindCmd(keyboard, "=", "TerrainPainterPlugin.keyboardModifyBrushSize(1);", ""); // +1 Brush Size map.bindCmd(keyboard, "+", "TerrainPainterPlugin.keyboardModifyBrushSize(1);", ""); // +1 Brush Size map.bindCmd(keyboard, "-", "TerrainPainterPlugin.keyboardModifyBrushSize(-1);", ""); // -1 Brush Size map.bindCmd(keyboard, "[", "TerrainPainterPlugin.keyboardModifyBrushSize(-5);", ""); // -5 Brush Size map.bindCmd(keyboard, "]", "TerrainPainterPlugin.keyboardModifyBrushSize(5);", ""); // +5 Brush Size for (int i = 0; i < 10; i++) map.bindCmd(keyboard, i.AsString(), "TerrainPainterPlugin.keyboardSetMaterial(" + (i - 1) + ");", ""); map.bindCmd(keyboard, "0", "TerrainPainterPlugin.keyboardSetMaterial(10);", ""); this.map = map; //console.Call_Classname("GuiWindowCtrl", "attach", new[] { "TerrainPainter", "TerrainPainterPreview" }); TerrainPainter TerrainPainter = "TerrainPainter"; TerrainPainter.attachTo("TerrainPainterPreview"); }
public void initialize() { ActionMap map = new ObjectCreator("ActionMap").Create(); 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();", ""); this.map = map; this.initSettings(); }
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 static void initialize() { if ("moveMap".isObject()) "moveMap".delete(); ActionMap moveMap = new ObjectCreator("ActionMap", "moveMap").Create(); ActionMap GlobalActionMap = "GlobalActionMap"; moveMap.bindCmd("keyboard", "escape", "", "handleEscape();"); moveMap.bind("keyboard", "F2", "showPlayerList"); moveMap.bind("keyboard", "ctrl h", "hideHUDs"); moveMap.bind("keyboard", "alt p", "doScreenShotHudless"); moveMap.bind("keyboard", "a", "moveleft"); moveMap.bind("keyboard", "d", "moveright"); moveMap.bind("keyboard", "left", "moveleft"); moveMap.bind("keyboard", "right", "moveright"); moveMap.bind("keyboard", "w", "moveforward"); moveMap.bind("keyboard", "s", "movebackward"); moveMap.bind("keyboard", "up", "moveforward"); moveMap.bind("keyboard", "down", "movebackward"); moveMap.bind("keyboard", "e", "moveup"); moveMap.bind("keyboard", "c", "movedown"); moveMap.bind("keyboard", "space", "jump"); moveMap.bind("mouse", "xaxis", "yaw"); moveMap.bind("mouse", "yaxis", "pitch"); moveMap.bind("gamepad", "thumbrx", "D", "-0.23 0.23", "gamepadYaw"); moveMap.bind("gamepad", "thumbry", "D", "-0.23 0.23", "gamepadPitch"); moveMap.bind("gamepad", "thumblx", "D", "-0.23 0.23", "gamePadMoveX"); moveMap.bind("gamepad", "thumbly", "D", "-0.23 0.23", "gamePadMoveY"); moveMap.bind("gamepad", "btn_a", "jump"); moveMap.bindCmd("gamepad", "btn_back", "disconnect();", ""); moveMap.bindCmd("gamepad", "dpadl", "toggleLightColorViz();", ""); moveMap.bindCmd("gamepad", "dpadr", "metrics(fps);", ""); //moveMap.bindCmd("gamepad", "dpadu", "toggleDepthViz();", ""); GlobalActionMap.bind("gamepad", "dpadu", "toggleConsole"); moveMap.bindCmd("gamepad", "dpadd", "toggleNormalsViz();", ""); //moveMap.bindCmd("gamepad", "dpadr", "toggleLightSpecularViz();", ""); moveMap.bind("keyboard", "lcontrol", "doCrouch"); moveMap.bind("gamepad", "btn_b", "doCrouch"); moveMap.bind("keyboard", "lshift", "doSprint"); moveMap.bind("gamepad", "btn_lt", "doSprint"); //Analog_LT Click moveMap.bind("mouse", "button0", "mouseFire"); moveMap.bind("gamepad", "triggerr", "gamepadFire"); moveMap.bind("gamepad", "triggerl", "gamepadAltTrigger"); if (omni.sGlobal["$Player::CurrentFOV"] == "") omni.iGlobal["$Player::CurrentFOV"] = omni.iGlobal["$pref::Player::DefaultFOV"]/2; moveMap.bind("keyboard", "f", "setZoomFOV"); // f for field of view moveMap.bind("keyboard", "z", "toggleZoom"); // z for zoom moveMap.bind("mouse", "button1", "mouseButtonZoom"); moveMap.bind("gamepad", "btn_rt", "toggleZoom"); moveMap.bind("keyboard", "v", "toggleFreeLook"); // v for vanity moveMap.bind("keyboard", "tab", "toggleFirstPerson"); moveMap.bind("keyboard", "alt c", "toggleCamera"); moveMap.bind("gamepad", "btn_start", "toggleCamera"); moveMap.bind("gamepad", "btn_y", "toggleFirstPerson"); moveMap.bindCmd("gamepad", "btn_x", "commandToServer('reloadWeapon');", ""); //Button_X // ---------------------------------------------------------------------------- // Misc. Player stuff // ---------------------------------------------------------------------------- // Gideon does not have these animations, so the player does not need access to // them. Commenting instead of removing so as to retain an example for those // who will want to use a player model that has these animations and wishes to // use them. //moveMap.bindCmd(keyboard, "ctrl w", "commandToServer('playCel',\"wave\");", ""); //moveMap.bindCmd(keyboard, "ctrl s", "commandToServer('playCel',\"salute\");", ""); moveMap.bindCmd("keyboard", "ctrl k", "commandToServer('suicide');", ""); //------------------------------------------------------------------------------ // Item manipulation //------------------------------------------------------------------------------ moveMap.bindCmd("keyboard", "1", "commandToServer('use',\"Ryder\");", ""); moveMap.bindCmd("keyboard", "2", "commandToServer('use',\"Lurker\");", ""); moveMap.bindCmd("keyboard", "3", "commandToServer('use',\"LurkerGrenadeLauncher\");", ""); moveMap.bindCmd("keyboard", "4", "commandToServer('use',\"ProxMine\");", ""); moveMap.bindCmd("keyboard", "5", "commandToServer('use',\"DeployableTurret\");", ""); moveMap.bindCmd("keyboard", "r", "commandToServer('reloadWeapon');", ""); moveMap.bind("keyboard", "0", "unmountWeapon"); moveMap.bind("keyboard", "alt w", "throwWeapon"); moveMap.bind("keyboard", "alt a", "tossAmmo"); moveMap.bind("keyboard", "q", "nextWeapon"); moveMap.bind("keyboard", "ctrl q", "prevWeapon"); moveMap.bind("mouse", "zaxis", "mouseWheelWeaponCycle"); moveMap.bind("gamepad", "btn_l", "prevWeapon"); moveMap.bind("gamepad", "btn_r", "nextWeapon"); moveMap.bind("keyboard", "u", "toggleMessageHud"); //moveMap.bind(keyboard, y, teamMessageHud ); moveMap.bind("keyboard", "pageUp", "pageMessageHudUp"); moveMap.bind("keyboard", "pageDown", "pageMessageHudDown"); moveMap.bind("keyboard", "p", "resizeMessageHud"); moveMap.bind("keyboard", "F3", "startRecordingDemo"); moveMap.bind("keyboard", "F4", "stopRecordingDemo"); moveMap.bind("keyboard", "F8", "dropCameraAtPlayer"); moveMap.bind("keyboard", "F7", "dropPlayerAtCamera"); //ActionMap GlobalActionMap = "GlobalActionMap"; GlobalActionMap.bind("keyboard", "ctrl o", "bringUpOptions"); GlobalActionMap.bind("keyboard", "ctrl F3", "doProfile"); //------------------------------------------------------------------------------ // Misc. //------------------------------------------------------------------------------ GlobalActionMap.bind("keyboard", "tilde", "toggleConsole"); GlobalActionMap.bind("keyboard", "alt tilde", "ShowNewTools"); GlobalActionMap.bindCmd("keyboard", "alt k", "cls();", ""); GlobalActionMap.bindCmd("keyboard", "alt enter", "", "Canvas.attemptFullscreenToggle();"); GlobalActionMap.bindCmd("keyboard", "F1", "", "contextHelp();"); moveMap.bindCmd("keyboard", "n", "toggleNetGraph();", ""); // Bind the keys to the carjack command moveMap.bindCmd("keyboard", "ctrl z", "carjack();", ""); if ("vehicleMap".isObject()) "vehicleMap".delete(); ActionMap vehicleMap = new ObjectCreator("ActionMap", "vehicleMap").Create(); // The key command for flipping the car vehicleMap.bindCmd("keyboard", "ctrl x", "commandToServer(\'flipCar\');", ""); vehicleMap.bind("keyboard", "w", "moveforward"); vehicleMap.bind("keyboard", "s", "movebackward"); vehicleMap.bind("keyboard", "up", "moveforward"); vehicleMap.bind("keyboard", "down", "movebackward"); vehicleMap.bind("mouse", "xaxis", "yaw"); vehicleMap.bind("mouse", "yaxis", "pitch"); vehicleMap.bind("mouse", "button0", "mouseFire"); vehicleMap.bind("mouse", "button1", "altTrigger"); vehicleMap.bindCmd("keyboard", "ctrl f", "getout();", ""); vehicleMap.bind("keyboard", "space", "brake"); vehicleMap.bindCmd("keyboard", "l", "brakeLights();", ""); vehicleMap.bindCmd("keyboard", "escape", "", "handleEscape();"); vehicleMap.bind("keyboard", "v", "toggleFreeLook"); // v for vanity //vehicleMap.bind(keyboard, tab, toggleFirstPerson ); vehicleMap.bind("keyboard", "alt c", "toggleCamera"); //Vehicle Gamepad vehicleMap.bind("gamepad", "triggerr", "moveforward"); //Trigger_RT vehicleMap.bind("gamepad", "triggerl", "movebackward"); //Trigger_RT //Uncomment below for right thumb, forward-backwards //vehicleMap.bind(gamepad, "thumbry", gamePadMoveY); //Analog_RT axis_Y vehicleMap.bind("gamepad", "thumblx", "gamepadYaw"); //Analog_LT axis_X vehicleMap.bindCmd("gamepad", "btn_y", "getout();", ""); //Button_Y vehicleMap.bind("gamepad", "btn_b", "brake"); //Button_B vehicleMap.bind("gamepad", "btn_x", "mouseFire"); //Button_X moveMap.bindCmd("gamepad", "connect", "echo(\"Pressed Xbox Button\");", ""); //Button_Xbox }
public static void initializeNavEditor() { omni.Util._echo(" % - Initializing Navigation Editor"); omni.iGlobal["$Nav::WalkFlag"] = 1 << 0; omni.iGlobal["$Nav::SwimFlag"] = 1 << 1; omni.iGlobal["$Nav::JumpFlag"] = 1 << 2; omni.iGlobal["$Nav::LedgeFlag"] = 1 << 3; omni.iGlobal["$Nav::DropFlag"] = 1 << 4; omni.iGlobal["$Nav::ClimbFlag"] = 1 << 5; omni.iGlobal["$Nav::TeleportFlag"] = 1 << 6; // Execute all relevant scripts and GUIs. //exec("./NavEditor.cs"); NavEditorProfiles.initialize(); //exec("./NavEditorGui.gui"); gui.NavEditorGui.initialize(); //exec("./NavEditorToolbar.gui"); gui.NavEditorToolbar.initialize(); //exec("./NavEditorGui.cs"); //exec("./NavEditorAboutDlg.gui"); NavEditorAboutDlg.initialize(); //exec("./NavEditorConsoleDlg.gui"); gui.NavEditorConsoleDlg.initialize(); //exec("./CreateNewNavMeshDlg.gui"); CreateNewNavMeshDlg.initialize(); // Add ourselves to EditorGui, where all the other tools reside NavEditorGui NavEditorGui = "NavEditorGui"; GuiControl NavEditorToolbar = "NavEditorToolbar"; GuiWindowCollapseCtrl NavEditorOptionsWindow = "NavEditorOptionsWindow"; GuiWindowCollapseCtrl NavEditorTreeWindow = "NavEditorTreeWindow"; GuiWindowCtrl NavEditorConsoleDlg = "NavEditorConsoleDlg"; NavEditorGui.setVisible(false); NavEditorToolbar.setVisible(false); NavEditorOptionsWindow.setVisible(false); NavEditorTreeWindow.setVisible(false); NavEditorConsoleDlg.setVisible(false); EditorGui EditorGui = "EditorGui"; EditorGui.add(NavEditorGui); EditorGui.add(NavEditorToolbar); EditorGui.add(NavEditorOptionsWindow); EditorGui.add(NavEditorTreeWindow); EditorGui.add(NavEditorConsoleDlg); ObjectCreator oc = new ObjectCreator("ScriptObject", "NavEditorPlugin", typeof (NavEditorPlugin)); oc["editorGui"] = NavEditorGui; oc.Create(); // Bind shortcuts for the nav editor. ActionMap map = new ObjectCreator("ActionMap").Create(); map.bindCmd("keyboard", "1", "ENavEditorSelectModeBtn.performClick();", ""); map.bindCmd("keyboard", "2", "ENavEditorLinkModeBtn.performClick();", ""); map.bindCmd("keyboard", "3", "ENavEditorCoverModeBtn.performClick();", ""); map.bindCmd("keyboard", "4", "ENavEditorTileModeBtn.performClick();", ""); map.bindCmd("keyboard", "5", "ENavEditorTestModeBtn.performClick();", ""); map.bindCmd("keyboard", "c", "NavEditorConsoleBtn.performClick();", ""); NavEditorPlugin NavEditorPlugin = "NavEditorPlugin"; NavEditorPlugin.map = map; NavEditorPlugin.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(); }