Skip to content

A7FB1B5A

Marcel Härtel edited this page Aug 19, 2023 · 1 revision

EditorService Properties

Properties

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.

Remarks

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.

See Also

Reference

EditorService Class
MonoGame.Forms.NET.Services Namespace

Clone this wiki locally