Ejemplo n.º 1
0
        public static void InfoPaneSensitive(Rect inRect, CompForceUser compForce)
        {
            var rectLevel = new Rect(inRect.x, inRect.y, inRect.width * 0.7f, TextSize);

            Text.Font = GameFont.Small;
            Widgets.Label(rectLevel, "PJ_SensitiveMessage".Translate(compForce.AbilityUser.LabelShort));
            Text.Font = GameFont.Small;

            if (DebugSettings.godMode)
            {
                var rectDebugPlus = new Rect(rectLevel.xMax, inRect.y, inRect.width * 0.3f, TextSize);
                if (Widgets.ButtonText(rectDebugPlus, "+", true, false))
                {
                    compForce.LevelUp(true);
                }
            }

            //Something is awakening...

            var rectPointsAvail = new Rect(inRect.x, rectLevel.yMax, inRect.width, TextSize);
            var rectLevelBar    = new Rect(rectPointsAvail.x, rectPointsAvail.yMax + 3f, inRect.width - 10f,
                                           HeaderSize * 0.6f);

            DrawLevelBar(rectLevelBar, compForce, true);
        }
Ejemplo n.º 2
0
        public static void InfoPane(Rect inRect, CompForceUser compForce)
        {
            var rectLevel = new Rect(inRect.x, inRect.y, inRect.width * 0.7f, TextSize);

            Text.Font = GameFont.Small;
            Widgets.Label(rectLevel,
                          "PJ_Level".Translate().CapitalizeFirst() + " " + compForce.ForceUserLevel.ToString());
            Text.Font = GameFont.Small;

            if (DebugSettings.godMode)
            {
                var rectDebugPlus = new Rect(rectLevel.xMax, inRect.y, inRect.width * 0.3f, TextSize);
                if (Widgets.ButtonText(rectDebugPlus, "+", true, false))
                {
                    compForce.LevelUp(true);
                }

                if (compForce.ForceUserLevel > 0)
                {
                    var rectDebugReset = new Rect(rectDebugPlus.x, rectDebugPlus.yMax + 1, rectDebugPlus.width,
                                                  TextSize);
                    if (Widgets.ButtonText(rectDebugReset, "~", true, false))
                    {
                        compForce.ResetPowers();
                    }
                }
            }

            //Level 0

            var rectPointsAvail = new Rect(inRect.x, rectLevel.yMax, inRect.width, TextSize);

            Text.Font = GameFont.Tiny;
            Widgets.Label(rectPointsAvail, compForce.ForceData.AbilityPoints + " " + "PJ_PointsAvail".Translate());
            Text.Font = GameFont.Small;

            //0 points available

            var rectLevelBar = new Rect(rectPointsAvail.x, rectPointsAvail.yMax + 3f, inRect.width - 10f,
                                        HeaderSize * 0.6f);

            DrawLevelBar(rectLevelBar, compForce);

            //[|||||||||||||]

            //Rect rectAffiliation = new Rect(rectPointsAvail.x, rectLevelBar.yMax + 3f, inRect.width - 10f, HeaderSize + 5f);
            //Text.Font = GameFont.Small;
            //string affiliation = "None";
            //if (compForce.affiliation != null) affiliation = compForce.affiliation.Name;
            //Widgets.Label(rectAffiliation, "PJ_Affiliation".Translate().CapitalizeFirst() + ": " + affiliation);
            //Text.Font = GameFont.Small;
        }