A single context for all UI elements and layouts.  
 More...
 | 
|   | UIView (int rows, int cols) | 
|   | Initializes a new instance of the T:MB2D.UI.UIView class. Divides itself into the number of rows and columns evenly based on the size of the current viewport.  More...
  | 
|   | 
| void  | Update () | 
|   | Updates and handles input for all elements in the View.  More...
  | 
|   | 
| void  | Draw (SpriteBatch spriteBatch, SpriteBatch uiSpriteBatch) | 
|   | Draws the View and its elements to the window  More...
  | 
|   | 
| void  | Add (UIElement element, int atRow, int atCol, int rowSpan, int colSpan) | 
|   | Adds a new UIElement to the View  More...
  | 
|   | 
| void  | AddToLookup (UIElement element) | 
|   | Adds an element to the lookup table used by the view  More...
  | 
|   | 
A single context for all UI elements and layouts. 
 
§ UIView()
  
  
      
        
          | MB2D.UI.UIView.UIView  | 
          ( | 
          int  | 
          rows,  | 
         
        
           | 
           | 
          int  | 
          cols  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Initializes a new instance of the T:MB2D.UI.UIView class. Divides itself into the number of rows and columns evenly based on the size of the current viewport. 
- Parameters
 - 
  
    | rows | Number of rows in the view | 
    | cols | Number of columns in the view | 
  
   
 
 
§ Add()
  
  
      
        
          | void MB2D.UI.UIView.Add  | 
          ( | 
          UIElement  | 
          element,  | 
         
        
           | 
           | 
          int  | 
          atRow,  | 
         
        
           | 
           | 
          int  | 
          atCol,  | 
         
        
           | 
           | 
          int  | 
          rowSpan,  | 
         
        
           | 
           | 
          int  | 
          colSpan  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Adds a new UIElement to the View 
- Parameters
 - 
  
    | element | Element to add. | 
    | atRow | Row position in the View. | 
    | atCol | Column position in the View. | 
    | rowSpan | Number of rows the element takes up. | 
    | colSpan | Number of columns the element takes up. | 
  
   
 
 
§ AddToLookup()
  
  
      
        
          | void MB2D.UI.UIView.AddToLookup  | 
          ( | 
          UIElement  | 
          element | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Adds an element to the lookup table used by the view 
- Parameters
 - 
  
  
 
 
 
§ Draw()
  
  
      
        
          | void MB2D.UI.UIView.Draw  | 
          ( | 
          SpriteBatch  | 
          spriteBatch,  | 
         
        
           | 
           | 
          SpriteBatch  | 
          uiSpriteBatch  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Draws the View and its elements to the window 
- Parameters
 - 
  
    | uiSpriteBatch | Sprite batch to draw to. | 
  
   
 
 
§ Update()
  
  
      
        
          | void MB2D.UI.UIView.Update  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Updates and handles input for all elements in the View. 
 
 
§ BackgroundTexture
  
  
      
        
          | Texture2D MB2D.UI.UIView.BackgroundTexture | 
         
       
   | 
  
getset   | 
  
 
Gets or sets the background texture of the view. 
The background texture.
 
 
§ Content
Gets the elements this View contains in a 2D array 
All UIElements.
 
 
§ StretchBackground
  
  
      
        
          | bool MB2D.UI.UIView.StretchBackground | 
         
       
   | 
  
getset   | 
  
 
Gets or sets a value indicating whether the background image shoudl stretch to fit the window. 
true if background should be stretched; otherwise, false.
 
 
§ this[string key]
Gets the T:MB2D.UI.UIElement with the specified key. 
- Parameters
 - 
  
  
 
 
 
The documentation for this class was generated from the following file: