public SMWordText(SMFont f, SMTokenItem item) : base(f) { text = item.Text ?? text; tag = item.Tag; TextBrush = null; }
public override bool OnDragHotTrackStarted(SMTokenItem item, PVDragContext context) { if (DropablesCount == 1) { UIStateHover = true; } return(base.OnDragHotTrackStarted(item, context)); }
public override SMTokenItem GetDraggableItem() { SMTokenItem item = new SMTokenItem(); item.Tag = SimpleText(tag); item.Text = SimpleText(text); item.ContentSize = Size.Empty; return(item); }
public override SMTokenItem GetDraggableItem() { SMTokenItem item = new SMTokenItem(); item.Tag = tag; item.Image = image; item.ContentSize = Size.Empty; return(item); }
public override void OnDragFinished(PVDragContext context) { base.OnDragFinished(context); SMTokenItem item = context.draggedItem; int idx = IndexOfDroppedItem(item.Text, item.Tag); if (idx >= 0) { drawWords[idx].Used = true; //drawWords.RemoveAt(idx); //drawWordsModified = true; } }
public override SMTokenItem GetDraggableItem(Point p) { Point point = p; point.X -= this.Area.Left; point.Y -= this.Area.Top; foreach (SMTextContainerWord wt in drawWords) { if (wt.rect.Contains(point)) { SMTokenItem ti = new SMTokenItem(); ti.Text = wt.text; ti.Tag = wt.tag; return(ti); } } return(null); }
public override SMTokenItem GetDraggableItem(Point point) { if (Img.ImageData != null) { SMTokenItem item = new SMTokenItem(); item.Tag = SafeTag; item.Image = Img.ImageData; if (Text != null && Text.Length > 0) { item.Text = Text; item.ContentSize = Size.Empty; } else { item.Text = ""; item.ContentSize = RestrictSize(Img.ImageData.Size, 32); } return(item); } else { return(null); } }
public override bool OnDragHotTrackEnded(SMTokenItem item, PVDragContext context) { UIStateHover = false; return(base.OnDragHotTrackEnded(item, context)); }
public SMWordImage(SMFont f, SMTokenItem item) : base(f) { tag = item.Tag; image = item.Image; }