public void ContextMenuProperties(object source, ContextMenuArgs e) { if (entitypropertiesdialog != null) { entitypropertiesdialog.Destroy(); } LogFile.WriteLine("opening properties box ..."); Glade.XML app = new Glade.XML(EnvironmentHelper.GetExeDirectory() + "/metaverse.client.glade", "entitypropertiesdialog", ""); app.Autoconnect(this); PropertyInfos = new List <EntityPropertyInfo>(); ControlsIndex = new Dictionary <string, Widget>(); nextpropertyindex = 0; thisentity.RegisterProperties(this); LoadProperties(); // Show(); ViewerState.GetInstance().ActivateEdit3d(); // hack to add a semblance of user-friendliness //DialogHelpers.ShowInfoMessageModal(null, "Hold down z to move the object, x to change scale and v to rotate."); new MessageBox(MessageBox.MessageType.Info, "Editing controls", "Hold down z to move the object, x to change scale and v to rotate.", null); entitypropertiesdialog.ShowAll(); //entitypropertiesdialog.Show(); selectionmodel.Clear(); selectionmodel.ToggleObjectInSelection(thisentity, true); LogFile.WriteLine("...opened"); }
public void ContextMenuProperties(object source, ContextMenuArgs e) { if (entitypropertiesdialog != null) { entitypropertiesdialog.Destroy(); } LogFile.WriteLine( "opening properties box ..." ); Glade.XML app = new Glade.XML( EnvironmentHelper.GetExeDirectory() + "/metaverse.client.glade", "entitypropertiesdialog", "" ); app.Autoconnect(this); PropertyInfos = new List<EntityPropertyInfo>(); ControlsIndex = new Dictionary<string,Widget>(); nextpropertyindex = 0; thisentity.RegisterProperties(this); LoadProperties(); // Show(); ViewerState.GetInstance().ActivateEdit3d(); // hack to add a semblance of user-friendliness //DialogHelpers.ShowInfoMessageModal(null, "Hold down z to move the object, x to change scale and v to rotate."); new MessageBox( MessageBox.MessageType.Info, "Editing controls", "Hold down z to move the object, x to change scale and v to rotate.", null ); entitypropertiesdialog.ShowAll(); //entitypropertiesdialog.Show(); selectionmodel.Clear(); selectionmodel.ToggleObjectInSelection(thisentity, true); LogFile.WriteLine("...opened"); }
public void ContextMenuLoad(object source, ContextMenuArgs e) { string filename = DialogHelpers.GetFilePath("Open world file", "world.OSMP"); if (filename != "") { Load(filename); } }
public void ContextMenuPopup(object source, ContextMenuArgs e) { entity = e.Entity; if (entity != null) { LogFile.WriteLine("EntityDelete registering in contextmenu"); ContextMenuController.GetInstance().RegisterContextMenu(new string[] { "Delete" }, new ContextMenuHandler(DeleteClick)); } }
public static void Create( object source, ContextMenuArgs e ) { EntityCreationProperties buildproperties = new EntityCreationProperties( e.MouseX, e.MouseY ); FractalSplineCylinder newentity = new FractalSplineCylinder(); buildproperties.WriteToEntity( newentity, "Cylinder" ); MetaverseClient.GetInstance().worldstorage.AddEntity(newentity); }
public static void Create(object source, ContextMenuArgs e) { EntityCreationProperties buildproperties = new EntityCreationProperties(e.MouseX, e.MouseY); FractalSplineBox newentity = new FractalSplineBox(); buildproperties.WriteToEntity(newentity, "Box"); MetaverseClient.GetInstance().worldstorage.AddEntity(newentity); }
public static void CreateCube( object soure, ContextMenuArgs e ) { EntityCreationProperties buildproperties = new EntityCreationProperties( e.MouseX, e.MouseY ); SimpleCube newcube = new SimpleCube(); newcube.pos = buildproperties.pos; newcube.rot = buildproperties.rot; newcube.scale = new Vector3( 0.2, 0.2, 0.2 ); newcube.name = "new cube"; MetaverseClient.GetInstance().worldstorage.AddEntity(newcube); }
public void ContextMenuPopup( object source, ContextMenuArgs e ) { iMouseX = e.MouseX; iMouseY = e.MouseY; entity = e.Entity; if( entity != null ) { LogFile.WriteLine("AssignTextureHandler registering in contextmenu"); ContextMenuController.GetInstance().RegisterContextMenu(new string[]{ "Assign &Texture", "&All Faces" }, new ContextMenuHandler( AssignTextureAllFacesClick ) ); ContextMenuController.GetInstance().RegisterContextMenu( new string[] { "Assign &Texture", "&Single Face" }, new ContextMenuHandler( AssignTextureSingleFaceClick ) ); } }
public void _ContextMenuPopup(object source, ContextMenuArgs e) { // if( selectionmodel.GetNumSelected() == 1 ) // { thisentity = e.Entity; if (thisentity != null) { LogFile.WriteLine("EntityPropertiesDialog registering in contextmenu"); ContextMenuController.GetInstance().RegisterContextMenu(new string[] { "&Edit" }, new ContextMenuHandler(ContextMenuProperties)); } // } }
public static void Create(object source, ContextMenuArgs e) { EntityCreationProperties buildproperties = new EntityCreationProperties(e.MouseX, e.MouseY); SimpleCone prim = new SimpleCone(); prim.pos = buildproperties.pos; prim.rot = buildproperties.rot; prim.scale = new Vector3(0.2, 0.2, 0.2); prim.name = "new cube"; MetaverseClient.GetInstance().worldstorage.AddEntity(prim); }
public void AssignColorAllFacesClick( object source, ContextMenuArgs e ) { if (!(entity is Prim)) { return; } int FaceNumber = FractalSpline.Primitive.AllFaces; Color newcolor = DialogHelpers.GetColor(); if (newcolor != null) { AssignColor( FaceNumber, newcolor ); } }
public void AssignColorSingleFaceClick(object source, ContextMenuArgs e) { if (!(entity is Prim)) { return; } int FaceNumber = Picker3dController.GetInstance().GetClickedFace(entity as Prim, iMouseX, iMouseY); Color newcolor = DialogHelpers.GetColor(); if (newcolor != null) { AssignColor(FaceNumber, newcolor); } }
public void AssignColorAllFacesClick(object source, ContextMenuArgs e) { if (!(entity is Prim)) { return; } int FaceNumber = FractalSpline.Primitive.AllFaces; Color newcolor = DialogHelpers.GetColor(); if (newcolor != null) { AssignColor(FaceNumber, newcolor); } }
void ShowDialog(object source, ContextMenuArgs e) { if (connecttoserverdialog != null) { connecttoserverdialog.Destroy(); } Glade.XML app = new Glade.XML(EnvironmentHelper.GetExeDirectory() + "/metaverse.client.glade", "connecttoserverdialog", ""); app.Autoconnect(this); entryserveripaddress.Text = "127.0.0.1"; entryserverport.Text = "2501"; // note: events are configurable from Glade, but it's possibly easier to control from here btnok.Clicked += new EventHandler(btnok_Clicked); btncancel.Clicked += new EventHandler(btncancel_Clicked); }
void ServerInfoDialog(object source, ContextMenuArgs e) { if (serverinfowindow != null) { serverinfowindow.Destroy(); } Glade.XML app = new Glade.XML(EnvironmentHelper.GetExeDirectory() + "/metaverse.client.glade", "serverinfowindow", ""); app.Autoconnect(this); btnsendping.Clicked += new EventHandler(btnsendping_Clicked); //btnholdopen.Pressed += new EventHandler( btnholdopen_Pressed ); //btnholdopen.Released += new EventHandler( btnholdopen_Released ); btnclose.Clicked += new EventHandler(btnclose_Clicked); localipaddressentry.Text = MetaverseServer.GetInstance().network.networkimplementation.LocalIPAddress.ToString(); localportentry.Text = MetaverseServer.GetInstance().ServerPort.ToString(); STUN stun = new STUN(MetaverseServer.GetInstance().network.networkimplementation, new STUN.GotExternalAddress(STUNResponse)); }
public void AssignTextureAllFacesClick( object source, ContextMenuArgs e ) { if (!(entity is Prim)) { return; } int FaceNumber = FractalSpline.Primitive.AllFaces; string filename = DialogHelpers.GetFilePath( "Select image file (*.bmp,*.jpg,*.gif,*.tga):", "*.JPG" ); if (filename != "") { Console.WriteLine( filename ); if (File.Exists( filename )) { AssignTexture( FaceNumber, new Uri( filename ) ); } } }
public void About(object source, ContextMenuArgs e) { //DialogHelpers.ShowInfoMessageModal(null, // "OSMP C# written by Hugh Perkins hughperkins at gmail" + Environment.NewLine + //"Website at http://metaverse.sf.net by Zenaphex" + Environment.NewLine + //"Forums designed by Nick Merrill" + Environment.NewLine + //"OSMP C# based on original C++ version written by Hugh Perkins and contributed to by Jack Didgeridoo, Christopher Omega, Jorge Lima, and Carnildo" + Environment.NewLine + //Environment.NewLine + //"OSMP C# compilation date/time: " + EnvironmentHelper.GetCompilationDateTime() //); new MessageBox(MessageBox.MessageType.Info, "About OSMP", "OSMP C# written by Hugh Perkins hughperkins at gmail" + Environment.NewLine + "Website at http://metaverse.sf.net by Zenaphex" + Environment.NewLine + "Forums designed by Nick Merrill" + Environment.NewLine + "OSMP C# based on original C++ version written by Hugh Perkins and contributed to by Jack Didgeridoo, Christopher Omega, Jorge Lima, and Carnildo" + Environment.NewLine + Environment.NewLine + "OSMP C# compilation date/time: " + EnvironmentHelper.GetCompilationDateTime(), null); }
public void AssignTextureSingleFaceClick( object source, ContextMenuArgs e ) { if( ! ( entity is Prim ) ) { return; } int FaceNumber = Picker3dController.GetInstance().GetClickedFace( entity as Prim, iMouseX, iMouseY ); string filename = DialogHelpers.GetFilePath("Select image file (*.bmp,*.jpg,*.gif,*.tga):","*.JPG"); if( filename != "" ) { Console.WriteLine ( filename ); if( File.Exists( filename ) ) { AssignTexture( FaceNumber, new Uri( filename ) ); } } }
public void About( object source, ContextMenuArgs e) { //DialogHelpers.ShowInfoMessageModal(null, // "OSMP C# written by Hugh Perkins hughperkins at gmail" + Environment.NewLine + //"Website at http://metaverse.sf.net by Zenaphex" + Environment.NewLine + //"Forums designed by Nick Merrill" + Environment.NewLine + //"OSMP C# based on original C++ version written by Hugh Perkins and contributed to by Jack Didgeridoo, Christopher Omega, Jorge Lima, and Carnildo" + Environment.NewLine + //Environment.NewLine + //"OSMP C# compilation date/time: " + EnvironmentHelper.GetCompilationDateTime() //); new MessageBox(MessageBox.MessageType.Info, "About OSMP", "OSMP C# written by Hugh Perkins hughperkins at gmail" + Environment.NewLine + "Website at http://metaverse.sf.net by Zenaphex" + Environment.NewLine + "Forums designed by Nick Merrill" + Environment.NewLine + "OSMP C# based on original C++ version written by Hugh Perkins and contributed to by Jack Didgeridoo, Christopher Omega, Jorge Lima, and Carnildo" + Environment.NewLine + Environment.NewLine + "OSMP C# compilation date/time: " + EnvironmentHelper.GetCompilationDateTime(), null); }
public void ContextMenuSave(object source, ContextMenuArgs e) { SaveWorld(); }
public void AssignColorSingleFaceClick( object source, ContextMenuArgs e ) { if( ! ( entity is Prim ) ) { return; } int FaceNumber = Picker3dController.GetInstance().GetClickedFace( entity as Prim, iMouseX, iMouseY ); Color newcolor = DialogHelpers.GetColor(); if (newcolor != null) { AssignColor(FaceNumber, newcolor ); } }
void EditTerrainContextMenuHandler( object o, ContextMenuArgs e ) { ViewerState.GetInstance().ActivateEditTerrain(); //mainwindow.Show(); }
// hook for uicontextmenu to call event public void OnContextMenuPopup(object source, ContextMenuArgs e) { ContextMenuPopup(source, e); }
public void ContextMenuPopup( object source, ContextMenuArgs e ) { iMouseX = e.MouseX; iMouseY = e.MouseY; entity = e.Entity; if( entity != null ) { LogFile.WriteLine("AssignColorHandler registering in contextmenu"); ContextMenuController.GetInstance().RegisterContextMenu(new string[]{ "Assign &Color", "&All Faces" }, new ContextMenuHandler( AssignColorAllFacesClick ) ); ContextMenuController.GetInstance().RegisterContextMenu( new string[] { "Assign &Color", "&Single Face" }, new ContextMenuHandler( AssignColorSingleFaceClick ) ); } }
void ServerInfoDialog(object source, ContextMenuArgs e) { if (serverinfowindow != null) { serverinfowindow.Destroy(); } Glade.XML app = new Glade.XML( EnvironmentHelper.GetExeDirectory() + "/metaverse.client.glade", "serverinfowindow", "" ); app.Autoconnect( this ); btnsendping.Clicked += new EventHandler( btnsendping_Clicked ); //btnholdopen.Pressed += new EventHandler( btnholdopen_Pressed ); //btnholdopen.Released += new EventHandler( btnholdopen_Released ); btnclose.Clicked += new EventHandler( btnclose_Clicked ); localipaddressentry.Text = MetaverseServer.GetInstance().network.networkimplementation.LocalIPAddress.ToString(); localportentry.Text = MetaverseServer.GetInstance().ServerPort.ToString(); STUN stun = new STUN( MetaverseServer.GetInstance().network.networkimplementation, new STUN.GotExternalAddress( STUNResponse ) ); }
public void DeleteClick(object source, ContextMenuArgs e) { MetaverseClient.GetInstance().worldstorage.DeleteEntity(entity); }
public void ContextMenuQuit(object source, ContextMenuArgs e) { Quit(); }
public void ContextMenuLoad(object source, ContextMenuArgs e) { LoadWorld(); }
public void ContextMenuLoadFromUrl(object source, ContextMenuArgs e) { new InputBox("Please enter URL:", new InputBox.Callback(LoadFromUrl)); }
void ShowDialog(object source, ContextMenuArgs e) { if( connecttoserverdialog != null ) { connecttoserverdialog.Destroy(); } Glade.XML app = new Glade.XML( EnvironmentHelper.GetExeDirectory() + "/metaverse.client.glade", "connecttoserverdialog", "" ); app.Autoconnect(this); entryserveripaddress.Text = "127.0.0.1"; entryserverport.Text = "2501"; // note: events are configurable from Glade, but it's possibly easier to control from here btnok.Clicked += new EventHandler(btnok_Clicked); btncancel.Clicked += new EventHandler(btncancel_Clicked); }
public void ContextMenuLoad( object source, ContextMenuArgs e ) { LoadWorld(); }
void EditTerrainContextMenuHandler(object o, ContextMenuArgs e) { ViewerState.GetInstance().ActivateEditTerrain(); //mainwindow.Show(); }
public void ContextMenuSave( object source, ContextMenuArgs e ) { SaveWorld(); }
public void ContextMenuQuit( object source, ContextMenuArgs e ) { Quit(); }