-
Notifications
You must be signed in to change notification settings - Fork 27
29FDD2C0
The EditorService class provides basic functionality of MonoGame.
Namespace: MonoGame.Forms.NET.Services
Assembly: MonoGame.Forms.NET (in MonoGame.Forms.NET.dll) Version: 3.2.0
C#
public abstract class EditorService : IDisposable
Inheritance | Object → EditorService |
Derived |
MonoGame.Forms.NET.Services.InvalidationService MonoGame.Forms.NET.Services.MonoGameService |
Implements | IDisposable |
EditorService | Initializes a new instance of the EditorService class |
BackgroundColor | The color used to clear the screen / control with Clear(Color) |
Camera | The Camera2D component. |
Content | The ContentManager is for loading custom content from the content root. |
Font | A built-in font, which is used by the integrated display. You can also use it as debugging font for example. |
FontHeight | Height of the display Font - Cached in InitializeService(). |
FPSCounter | The FPSCounter component. |
GetAbsoluteMousePosition | Get the current mouse position. |
GetCurrentMultiSampleCount | Get the current active MultiSampleCount. |
GetRelativeMousePosition | Get the current mouse position in the control. |
GetRenderTargetManager | Get the internal EditorService.RenderTargetManager.
When working with custom RenderTarget2D's, it's strongly recomended to create these render targets with this RenderTargetManager, because they will updated automatically when the client size or the multi sample count changes. |
GraphicsDevice | The GraphicsDevice. |
Pixel | A plain white pixel mainly to draw the background of the integrated display, but you can also use it in your custom control. |
ResourceContent | The ResourceContentManager is for loading custom content from a resource file. |
spriteBatch | The SpriteBatch. |
SwapChainRenderTarget | A swap chain used for rendering to a secondary GameWindow. Note: When working with different RenderTarget2D, you need to set the current render target back to the SwapChainRenderTarget as this is the real 'Back Buffer'. 'GraphicsDevice.SetRenderTarget(null)' will NOT work as you are doing usally in MonoGame. Instead use 'GraphicsDevice.SetRenderTarget(SwapChainRenderTarget)'. Otherwise you will see only a black control window. |
AddDefaultComponents | Add all default (integrated) GameComponent's to the GameComponentCollection. These are basically a ICamera2D and a FPSCounter components.
If you want to add your own ones, call |
BeginAntialising | Everything between BeginAntialising() and EndAntialising() will be affected by MSAA. |
BeginCamera2D | Use 'BeginCamera2D' as a replacement of SpriteBatch.Begin(SpriteSortMode, BlendState, SamplerState, DepthStencilState, RasterizerState, Effect, Matrix?).
Automatically uses the Matrix of the Camera2D component! |
BeginRenderTarget | Everything between BeginRenderTarget() and EndRenderTarget() will be drawn to the RenderTarget2D. |
CamMove | Move the camera by the value defined in the parameter amount. |
CamRotate | Rotate the camera component. |
CamZoom | Zoom the camera component. |
DisableRenderTargets | Disable all custom RenderTarget2D's hold by the EditorService.RenderTargetManager, before they becoming reactivated after 500 milliseconds. |
Dispose | Disposes the contents of this service. |
EndAntialising | Everything between BeginAntialising() and EndAntialising() will be affected by MSAA. |
EndCamera2D | Use this to end the SpriteBatch, previously opened by BeginCamera2D(SpriteSortMode, BlendState, SamplerState, DepthStencilState, RasterizerState, Effect). |
EndRenderTarget | Everything between BeginRenderTarget() and EndRenderTarget() will be drawn to the RenderTarget2D. |
GetCamRotation | Get the current camera rotation. |
GetCamZoom | Get the current camera zoom. |
RemoveAllComponents | Remove all GameComponent from the GameComponentCollection. This also counts for your own ones!
If you only want to remove your own ones, call |
RemoveDefaultComponents | Remove all default (integrated) GameComponent's from the GameComponentCollection. These are basically a ICamera2D and a FPSCounter components.
If you want to add your own ones, call |
ResetCam | Resets all or specific values from the camera component to their defaults. |
ResourceContentManagerInitialize | Initializes a custom ResourceContentManager. |
RenderTargetsRefreshed | Subscribe to this event in your custom control to get notified when RenderTarget2D's, hold by the EditorService.RenderTargetManager, got refreshed. |
-
Welcome to MonoGame.Forms!
- MonoGame.Forms.NET Namespace
- MonoGame.Forms.NET.Components Namespace
- MonoGame.Forms.NET.Components.Interfaces Namespace
-
MonoGame.Forms.NET.Controls Namespace
- GameControl Class
- GraphicsDeviceControl Class
- GraphicsDeviceControl.MouseWheelDownwardsEvent Delegate
- GraphicsDeviceControl.MouseWheelUpwardsEvent Delegate
- InvalidationControl Class
- MonoGameControl Class
-
MonoGame.Forms.NET.Services Namespace
-
EditorService Class
- EditorService Constructor
-
EditorService Properties
- BackgroundColor Property
- Camera Property
- Content Property
- Font Property
- FontHeight Property
- FPSCounter Property
- GetAbsoluteMousePosition Property
- GetCurrentMultiSampleCount Property
- GetRelativeMousePosition Property
- GetRenderTargetManager Property
- GraphicsDevice Property
- Pixel Property
- ResourceContent Property
- spriteBatch Property
- SwapChainRenderTarget Property
-
EditorService Methods
- AddDefaultComponents Method
- BeginAntialising Method
- BeginCamera2D Method
- BeginRenderTarget Method
- CamMove Method
- CamRotate Method
- CamZoom Method
- DisableRenderTargets Method
- Dispose Method
- EndAntialising Method
- EndCamera2D Method
- EndRenderTarget Method
- GetCamRotation Method
- GetCamZoom Method
- RemoveAllComponents Method
- RemoveDefaultComponents Method
- ResetCam Method
- ResourceContentManagerInitialize Method
- EditorService Events
- EditorService.RenderTargetManager Class
- EditorService.RenderTargetManager.RenderTarget2DHelper Class
- InvalidationService Class
- MonoGameService Class
-
EditorService Class