Esempio n. 1
0
 public void Draw(string FocusedElementKey, UIRenderer UIRendererInstance)
 {
     if (IsScrollable)
     {
         int innerHeight = 0;
         foreach (UIDrawCall child in ChildDrawCalls)
         {
             innerHeight += child.Height + child.Element.GetHeight().FullMargin;
         }
         int scroll = MathHelper.Clamp(Element.GetScroll(), 0, innerHeight - Height);
         if (scroll != Element.GetScroll())
         {
             Element.SetScroll(scroll);
         }
         UIRendererInstance.EnableScrollingTarget(this);
     }
     Element.Draw(Width, Height, X, Y, Element.GetKey() == FocusedElementKey);
     foreach (UIDrawCall child in ChildDrawCalls)
     {
         child.Draw(FocusedElementKey, UIRendererInstance);
     }
     if (IsScrollable)
     {
         UIRendererInstance.FlipScrollingTarget(this);
     }
 }
Esempio n. 2
0
 public UIElement(string Key, UIRenderer UIRendererInstance)
 {
     key = Key;
     uiRendererInstance = UIRendererInstance;
     isLocked           = false;
     children           = new IUIElement[0];
     positioning        = UIEnums.Positioning.Relative;
 }
Esempio n. 3
0
 public UIBox(string Key, UIRenderer UIRendererInstance) : base(Key, UIRendererInstance)
 {
     tint     = Color.White;
     isFilled = true;
 }
Esempio n. 4
0
 public UIButton(string Key, UIRenderer UIRendererInstance) : base(Key, UIRendererInstance)
 {
     borderColor = Color.Transparent;
 }
Esempio n. 5
0
 public void SetUIRendererInstance(UIRenderer Renderer)
 {
     uiRendererInstance = Renderer;
 }
Esempio n. 6
0
 public UILeftRight(string Key, UIRenderer UIRendererInstance) : base(Key, UIRendererInstance)
 {
 }
Esempio n. 7
0
 public UIIcon(string Key, UIRenderer UIRendererInstance) : base(Key, UIRendererInstance)
 {
 }