Пример #1
0
        public override void Draw(Rect inRect, AbilityWindow window)
        {
            Widgets.DrawBoxSolid(inRect, new Color(21f / 256f, 25f / 256f, 29f / 256f));

            var drawBox = inRect.ContractedBy(5f);

            var yAnchor = drawBox.y;
            var xAnchor = drawBox.x;

            // Draw top matter
            DrawTopMatter(xAnchor, ref yAnchor, drawBox.width);

            // Draw invert option
            DrawInvertOption(ref xAnchor, yAnchor);

            //Draw threshold option
            Widgets.Label(
                new Rect(drawBox.xMax - (ThresholdLabelWidth + ThresholdFillableWidth + XSeparation), yAnchor,
                         ThresholdLabelWidth, OptionHeight), ThresholdKey.Translate());
            Widgets.IntEntry(
                new Rect(drawBox.xMax - ThresholdFillableWidth, yAnchor, ThresholdFillableWidth, OptionHeight),
                ref Threshold, ref thresholdBuffer);

            yAnchor += OptionHeight + YSeparation;

            // Draw bottom matter
            Text.Anchor = TextAnchor.MiddleCenter;
            DrawBottomMatter(drawBox.x, yAnchor, drawBox.width, window);

            Text.Anchor = TextAnchor.UpperLeft;
        }
Пример #2
0
        protected void DrawBottomMatter(float xAnchor, float yAnchor, float width, AbilityWindow window)
        {
            // Draw info button
            Widgets.InfoCardButton(xAnchor, yAnchor, Def);

            // Draw remove button
            var buttonRect = new Rect(xAnchor + width - RemoveButtonWidth, yAnchor, RemoveButtonWidth, RemoveButtonHeight);

            if (Widgets.ButtonText(buttonRect, RemoveKey.Translate()))
            {
                window.ScheduleConditionForRemoval(this);
            }
        }
Пример #3
0
    // Use this for initialization
    void Start()
    {
        GameObject man = GameObject.Find("Manager");
        MVPManager mvp = man.GetComponent <MVPManager> ();

        leftc  = mvp.leftc.GetComponent <GameController> ();
        rightc = mvp.rightc.GetComponent <GameController> ();

        lefta  = GameObject.Find("AbilityWindowL").GetComponent <AbilityWindow> ();
        righta = GameObject.Find("AbilityWindowR").GetComponent <AbilityWindow> ();

        start = Time.time;
    }
Пример #4
0
        public override void Draw(Rect inRect, AbilityWindow window)
        {
            Widgets.DrawBoxSolid(inRect, new Color(21f / 256f, 25f / 256f, 29f / 256f));

            var drawBox = inRect.ContractedBy(5f);

            var xAnchor = drawBox.x;
            var yAnchor = drawBox.y;

            // Draw top matter
            DrawTopMatter(drawBox.x, ref yAnchor, drawBox.width);

            // Draw invert option
            DrawInvertOption(ref xAnchor, yAnchor);

            yAnchor += OptionHeight + YSeparation;

            // Draw bottom matter
            Text.Anchor = TextAnchor.MiddleCenter;
            DrawBottomMatter(drawBox.x, yAnchor, drawBox.width, window);

            Text.Anchor = TextAnchor.UpperLeft;
        }
Пример #5
0
 public abstract void Draw(Rect inRec, AbilityWindow window);