예제 #1
0
        public PrimarySurface()
        {
            foreach (WorkTypeDef def in WorkTypeDefsUtility.WorkTypeDefsInPriorityOrder)
            {
                PrimaryWork primaryWork = new PrimaryWork(def);

                this.PrimaryWorkList.Add(primaryWork);
            }
        }
예제 #2
0
        private void OnHover()
        {
            PrimaryWork primary = this.PrimaryOnMousePosition;

            if (primary != null)
            {
                primary.OnHover(primary.drawRect, false);
            }
        }
예제 #3
0
        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;
            }
        }