public PrimarySurface() { foreach (WorkTypeDef def in WorkTypeDefsUtility.WorkTypeDefsInPriorityOrder) { PrimaryWork primaryWork = new PrimaryWork(def); this.PrimaryWorkList.Add(primaryWork); } }
private void OnHover() { PrimaryWork primary = this.PrimaryOnMousePosition; if (primary != null) { primary.OnHover(primary.drawRect, false); } }
public void DrawSurface(Rect rect) { Vector2 positionSetter = new Vector2(rect.x + 2f * Utilities.ShortSpacing + Utilities.DraggableDiameter / 2f, rect.center.y); for (int i = 0; i < this.PrimaryWorkList.Count; i++) { PrimaryWork primary = this.PrimaryWorkList[i]; primary.drawRect = positionSetter.ToWorkRect(); primary.DrawTexture(primary.drawRect); positionSetter.x += Utilities.DraggableDiameter + Utilities.ShortSpacing; } }