Done basic documentation. Further expansion may be needed. Maybe. But only maybe.

This commit is contained in:
2019-01-14 20:00:11 -06:00
parent b019b7cf10
commit 2a2a7cba49
5 changed files with 133 additions and 3 deletions

View File

@@ -16,10 +16,19 @@ namespace RecrownedAthenaeum.UI.Modular
List<UIModule> modules = new List<UIModule>();
Rectangle scissorBounds;
RasterizerState scissorRasterizer = new RasterizerState();
/// <summary>
/// Camera used by the module for cropping.
/// </summary>
public Camera2D Camera { get; set; }
/// <summary>
/// Creates a module group.
/// </summary>
/// <param name="crop">Whether or not to crop out of bounds. Default is false.</param>
/// <param name="camera">What camera to use for cropping. Default is null.</param>
public UIModuleGroup(bool crop = false, Camera2D camera = null)
{
if (crop && camera == null) throw new ArgumentException("Cannot crop without camera.");
Camera = camera;
if (crop)
{