Exemple #1
0
 public void SetModal(LComponent comp)
 {
     if (comp != null && !comp.IsVisible())
     {
         throw new Exception(
                   "Can't set invisible component as modal component!");
     }
     this.modal = comp;
 }
Exemple #2
0
 public bool Intersects(LComponent comp)
 {
     return((this.visible) &&
            (comp.IsVisible()) &&
            (this.screenX + this.width * scaleX >= comp.screenX &&
             this.screenX <= comp.screenX + comp.width &&
             this.screenY + this.height * scaleY >= comp.screenY && this.screenY <= comp.screenY
             + comp.height));
 }
Exemple #3
0
        internal bool SelectComponent(LComponent comp)
        {
            if (!comp.IsVisible() || !comp.IsEnabled() || !comp.IsFocusable())
            {
                return(false);
            }

            this.DeselectComponent();

            comp.SetSelected(true);
            this.selectedComponent = comp;

            return(true);
        }
Exemple #4
0
 public virtual bool OnClick(LComponent component)
 {
     if (component == null)
     {
         return false;
     }
     if (component.IsVisible())
     {
         RectBox rect = component.GetCollisionBox();
         if (rect.Contains(touchX, touchY) || rect.Intersects(touchX, touchY))
         {
             return true;
         }
     }
     return false;
 }
 public bool Intersects(LComponent comp)
 {
     return (this.visible)
         && (comp.IsVisible())
         && (this.screenX + this.width * scaleX >= comp.screenX
                 && this.screenX <= comp.screenX + comp.width
                 && this.screenY + this.height * scaleY >= comp.screenY && this.screenY <= comp.screenY
                 + comp.height);
 }
Exemple #6
0
		public void SetModal(LComponent comp) {
			if (comp != null && !comp.IsVisible()) {
				throw new Exception(
						"Can't set invisible component as modal component!");
			}
			this.modal = comp;
		}
Exemple #7
0
		internal bool SelectComponent(LComponent comp) {
			if (!comp.IsVisible() || !comp.IsEnabled() || !comp.IsFocusable()) {
				return false;
			}
	
			this.DeselectComponent();
	
			comp.SetSelected(true);
			this.selectedComponent = comp;
	
			return true;
		}