// Token: 0x060038DF RID: 14559 RVA: 0x001A0D9C File Offset: 0x0019F19C
        public PlayerNPCVendorUI()
        {
            PlayerNPCVendorUI.localization = Localization.read("/Player/PlayerNPCVendor.dat");
            PlayerNPCVendorUI.container    = new Sleek();
            PlayerNPCVendorUI.container.positionScale_Y  = 1f;
            PlayerNPCVendorUI.container.positionOffset_X = 10;
            PlayerNPCVendorUI.container.positionOffset_Y = 10;
            PlayerNPCVendorUI.container.sizeOffset_X     = -20;
            PlayerNPCVendorUI.container.sizeOffset_Y     = -20;
            PlayerNPCVendorUI.container.sizeScale_X      = 1f;
            PlayerNPCVendorUI.container.sizeScale_Y      = 1f;
            PlayerUI.container.add(PlayerNPCVendorUI.container);
            PlayerNPCVendorUI.active    = false;
            PlayerNPCVendorUI.vendorBox = new SleekBox();
            PlayerNPCVendorUI.vendorBox.sizeOffset_Y = -60;
            PlayerNPCVendorUI.vendorBox.sizeScale_X  = 1f;
            PlayerNPCVendorUI.vendorBox.sizeScale_Y  = 1f;
            PlayerNPCVendorUI.container.add(PlayerNPCVendorUI.vendorBox);
            PlayerNPCVendorUI.nameLabel = new SleekLabel();
            PlayerNPCVendorUI.nameLabel.positionOffset_X = 5;
            PlayerNPCVendorUI.nameLabel.positionOffset_Y = 5;
            PlayerNPCVendorUI.nameLabel.sizeOffset_X     = -10;
            PlayerNPCVendorUI.nameLabel.sizeOffset_Y     = 40;
            PlayerNPCVendorUI.nameLabel.sizeScale_X      = 1f;
            PlayerNPCVendorUI.nameLabel.foregroundTint   = ESleekTint.NONE;
            PlayerNPCVendorUI.nameLabel.isRich           = true;
            PlayerNPCVendorUI.nameLabel.fontSize         = 24;
            PlayerNPCVendorUI.vendorBox.add(PlayerNPCVendorUI.nameLabel);
            PlayerNPCVendorUI.descriptionLabel = new SleekLabel();
            PlayerNPCVendorUI.descriptionLabel.positionOffset_X = 5;
            PlayerNPCVendorUI.descriptionLabel.positionOffset_Y = 40;
            PlayerNPCVendorUI.descriptionLabel.sizeOffset_X     = -10;
            PlayerNPCVendorUI.descriptionLabel.sizeOffset_Y     = 40;
            PlayerNPCVendorUI.descriptionLabel.sizeScale_X      = 1f;
            PlayerNPCVendorUI.descriptionLabel.foregroundTint   = ESleekTint.NONE;
            PlayerNPCVendorUI.descriptionLabel.isRich           = true;
            PlayerNPCVendorUI.vendorBox.add(PlayerNPCVendorUI.descriptionLabel);
            PlayerNPCVendorUI.buyingLabel = new SleekLabel();
            PlayerNPCVendorUI.buyingLabel.positionOffset_X = 5;
            PlayerNPCVendorUI.buyingLabel.positionOffset_Y = 80;
            PlayerNPCVendorUI.buyingLabel.sizeOffset_X     = -40;
            PlayerNPCVendorUI.buyingLabel.sizeOffset_Y     = 30;
            PlayerNPCVendorUI.buyingLabel.sizeScale_X      = 0.5f;
            PlayerNPCVendorUI.buyingLabel.fontSize         = 14;
            PlayerNPCVendorUI.buyingLabel.text             = PlayerNPCVendorUI.localization.format("Buying");
            PlayerNPCVendorUI.vendorBox.add(PlayerNPCVendorUI.buyingLabel);
            PlayerNPCVendorUI.buyingBox = new SleekScrollBox();
            PlayerNPCVendorUI.buyingBox.positionOffset_X = 5;
            PlayerNPCVendorUI.buyingBox.positionOffset_Y = 115;
            PlayerNPCVendorUI.buyingBox.sizeOffset_X     = -10;
            PlayerNPCVendorUI.buyingBox.sizeOffset_Y     = -120;
            PlayerNPCVendorUI.buyingBox.sizeScale_X      = 0.5f;
            PlayerNPCVendorUI.buyingBox.sizeScale_Y      = 1f;
            PlayerNPCVendorUI.buyingBox.area             = new Rect(0f, 0f, 5f, 1024f);
            PlayerNPCVendorUI.vendorBox.add(PlayerNPCVendorUI.buyingBox);
            PlayerNPCVendorUI.sellingLabel = new SleekLabel();
            PlayerNPCVendorUI.sellingLabel.positionOffset_X = 5;
            PlayerNPCVendorUI.sellingLabel.positionOffset_Y = 80;
            PlayerNPCVendorUI.sellingLabel.positionScale_X  = 0.5f;
            PlayerNPCVendorUI.sellingLabel.sizeOffset_X     = -40;
            PlayerNPCVendorUI.sellingLabel.sizeOffset_Y     = 30;
            PlayerNPCVendorUI.sellingLabel.sizeScale_X      = 0.5f;
            PlayerNPCVendorUI.sellingLabel.fontSize         = 14;
            PlayerNPCVendorUI.sellingLabel.text             = PlayerNPCVendorUI.localization.format("Selling");
            PlayerNPCVendorUI.vendorBox.add(PlayerNPCVendorUI.sellingLabel);
            PlayerNPCVendorUI.sellingBox = new SleekScrollBox();
            PlayerNPCVendorUI.sellingBox.positionOffset_X = 5;
            PlayerNPCVendorUI.sellingBox.positionOffset_Y = 115;
            PlayerNPCVendorUI.sellingBox.positionScale_X  = 0.5f;
            PlayerNPCVendorUI.sellingBox.sizeOffset_X     = -10;
            PlayerNPCVendorUI.sellingBox.sizeOffset_Y     = -120;
            PlayerNPCVendorUI.sellingBox.sizeScale_X      = 0.5f;
            PlayerNPCVendorUI.sellingBox.sizeScale_Y      = 1f;
            PlayerNPCVendorUI.sellingBox.area             = new Rect(0f, 0f, 5f, 1024f);
            PlayerNPCVendorUI.vendorBox.add(PlayerNPCVendorUI.sellingBox);
            PlayerNPCVendorUI.experienceBox = new SleekBox();
            PlayerNPCVendorUI.experienceBox.positionOffset_Y = 10;
            PlayerNPCVendorUI.experienceBox.positionScale_Y  = 1f;
            PlayerNPCVendorUI.experienceBox.sizeOffset_X     = -5;
            PlayerNPCVendorUI.experienceBox.sizeOffset_Y     = 50;
            PlayerNPCVendorUI.experienceBox.sizeScale_X      = 0.5f;
            PlayerNPCVendorUI.experienceBox.fontSize         = 14;
            PlayerNPCVendorUI.experienceBox.foregroundColor  = Palette.COLOR_Y;
            PlayerNPCVendorUI.experienceBox.foregroundTint   = ESleekTint.NONE;
            PlayerNPCVendorUI.vendorBox.add(PlayerNPCVendorUI.experienceBox);
            PlayerNPCVendorUI.returnButton = new SleekButton();
            PlayerNPCVendorUI.returnButton.positionOffset_X = 5;
            PlayerNPCVendorUI.returnButton.positionOffset_Y = 10;
            PlayerNPCVendorUI.returnButton.positionScale_X  = 0.5f;
            PlayerNPCVendorUI.returnButton.positionScale_Y  = 1f;
            PlayerNPCVendorUI.returnButton.sizeOffset_X     = -5;
            PlayerNPCVendorUI.returnButton.sizeOffset_Y     = 50;
            PlayerNPCVendorUI.returnButton.sizeScale_X      = 0.5f;
            PlayerNPCVendorUI.returnButton.fontSize         = 14;
            PlayerNPCVendorUI.returnButton.text             = PlayerNPCVendorUI.localization.format("Return");
            PlayerNPCVendorUI.returnButton.tooltip          = PlayerNPCVendorUI.localization.format("Return_Tooltip");
            SleekButton sleekButton = PlayerNPCVendorUI.returnButton;

            if (PlayerNPCVendorUI.< > f__mg$cache2 == null)
            {
                PlayerNPCVendorUI.< > f__mg$cache2 = new ClickedButton(PlayerNPCVendorUI.onClickedReturnButton);
            }
            sleekButton.onClickedButton = PlayerNPCVendorUI.< > f__mg$cache2;
            PlayerNPCVendorUI.vendorBox.add(PlayerNPCVendorUI.returnButton);
            PlayerSkills skills = Player.player.skills;
            Delegate     onExperienceUpdated = skills.onExperienceUpdated;

            if (PlayerNPCVendorUI.< > f__mg$cache3 == null)
            {
                PlayerNPCVendorUI.< > f__mg$cache3 = new ExperienceUpdated(PlayerNPCVendorUI.onExperienceUpdated);
            }
            skills.onExperienceUpdated = (ExperienceUpdated)Delegate.Combine(onExperienceUpdated, PlayerNPCVendorUI.< > f__mg$cache3);
        }
示例#2
0
        // Token: 0x0600386E RID: 14446 RVA: 0x001981F4 File Offset: 0x001965F4
        public PlayerDashboardSkillsUI()
        {
            if (PlayerDashboardSkillsUI.icons != null)
            {
                PlayerDashboardSkillsUI.icons.unload();
            }
            PlayerDashboardSkillsUI.localization = Localization.read("/Player/PlayerDashboardSkills.dat");
            PlayerDashboardSkillsUI.icons        = Bundles.getBundle("/Bundles/Textures/Player/Icons/PlayerDashboardSkills/PlayerDashboardSkills.unity3d");
            PlayerDashboardSkillsUI.container    = new Sleek();
            PlayerDashboardSkillsUI.container.positionScale_Y  = 1f;
            PlayerDashboardSkillsUI.container.positionOffset_X = 10;
            PlayerDashboardSkillsUI.container.positionOffset_Y = 10;
            PlayerDashboardSkillsUI.container.sizeOffset_X     = -20;
            PlayerDashboardSkillsUI.container.sizeOffset_Y     = -20;
            PlayerDashboardSkillsUI.container.sizeScale_X      = 1f;
            PlayerDashboardSkillsUI.container.sizeScale_Y      = 1f;
            PlayerUI.container.add(PlayerDashboardSkillsUI.container);
            PlayerDashboardSkillsUI.active                       = false;
            PlayerDashboardSkillsUI.selectedSpeciality           = byte.MaxValue;
            PlayerDashboardSkillsUI.backdropBox                  = new SleekBox();
            PlayerDashboardSkillsUI.backdropBox.positionOffset_Y = 60;
            PlayerDashboardSkillsUI.backdropBox.sizeOffset_Y     = -60;
            PlayerDashboardSkillsUI.backdropBox.sizeScale_X      = 1f;
            PlayerDashboardSkillsUI.backdropBox.sizeScale_Y      = 1f;
            Color white = Color.white;

            white.a = 0.5f;
            PlayerDashboardSkillsUI.backdropBox.backgroundColor = white;
            PlayerDashboardSkillsUI.container.add(PlayerDashboardSkillsUI.backdropBox);
            PlayerDashboardSkillsUI.experienceBox = new SleekBox();
            PlayerDashboardSkillsUI.experienceBox.positionOffset_X = 10;
            PlayerDashboardSkillsUI.experienceBox.positionOffset_Y = -90;
            PlayerDashboardSkillsUI.experienceBox.positionScale_Y  = 1f;
            PlayerDashboardSkillsUI.experienceBox.sizeOffset_X     = -15;
            PlayerDashboardSkillsUI.experienceBox.sizeOffset_Y     = 80;
            PlayerDashboardSkillsUI.experienceBox.sizeScale_X      = 0.5f;
            PlayerDashboardSkillsUI.experienceBox.fontSize         = 14;
            PlayerDashboardSkillsUI.experienceBox.foregroundColor  = Palette.COLOR_Y;
            PlayerDashboardSkillsUI.experienceBox.foregroundTint   = ESleekTint.NONE;
            PlayerDashboardSkillsUI.backdropBox.add(PlayerDashboardSkillsUI.experienceBox);
            for (int i = 0; i < (int)PlayerSkills.SPECIALITIES; i++)
            {
                SleekButtonIcon sleekButtonIcon = new SleekButtonIcon((Texture2D)PlayerDashboardSkillsUI.icons.load("Speciality_" + i));
                sleekButtonIcon.positionOffset_X         = -85 + i * 60;
                sleekButtonIcon.positionOffset_Y         = 10;
                sleekButtonIcon.positionScale_X          = 0.5f;
                sleekButtonIcon.sizeOffset_X             = 50;
                sleekButtonIcon.sizeOffset_Y             = 50;
                sleekButtonIcon.tooltip                  = PlayerDashboardSkillsUI.localization.format("Speciality_" + i + "_Tooltip");
                sleekButtonIcon.iconImage.backgroundTint = ESleekTint.FOREGROUND;
                SleekButton sleekButton = sleekButtonIcon;
                if (PlayerDashboardSkillsUI.< > f__mg$cache2 == null)
                {
                    PlayerDashboardSkillsUI.< > f__mg$cache2 = new ClickedButton(PlayerDashboardSkillsUI.onClickedSpecialityButton);
                }
                sleekButton.onClickedButton = PlayerDashboardSkillsUI.< > f__mg$cache2;
                PlayerDashboardSkillsUI.backdropBox.add(sleekButtonIcon);
            }
            PlayerDashboardSkillsUI.skillsScrollBox = new SleekScrollBox();
            PlayerDashboardSkillsUI.skillsScrollBox.positionOffset_X = 10;
            PlayerDashboardSkillsUI.skillsScrollBox.positionOffset_Y = 70;
            PlayerDashboardSkillsUI.skillsScrollBox.sizeOffset_X     = -20;
            PlayerDashboardSkillsUI.skillsScrollBox.sizeOffset_Y     = -170;
            PlayerDashboardSkillsUI.skillsScrollBox.sizeScale_X      = 1f;
            PlayerDashboardSkillsUI.skillsScrollBox.sizeScale_Y      = 1f;
            PlayerDashboardSkillsUI.backdropBox.add(PlayerDashboardSkillsUI.skillsScrollBox);
            PlayerDashboardSkillsUI.updateSelection(0);
            PlayerSkills playerSkills        = Player.player.skills;
            Delegate     onExperienceUpdated = playerSkills.onExperienceUpdated;

            if (PlayerDashboardSkillsUI.< > f__mg$cache3 == null)
            {
                PlayerDashboardSkillsUI.< > f__mg$cache3 = new ExperienceUpdated(PlayerDashboardSkillsUI.onExperienceUpdated);
            }
            playerSkills.onExperienceUpdated = (ExperienceUpdated)Delegate.Combine(onExperienceUpdated, PlayerDashboardSkillsUI.< > f__mg$cache3);
            PlayerSkills playerSkills2  = Player.player.skills;
            Delegate     onBoostUpdated = playerSkills2.onBoostUpdated;

            if (PlayerDashboardSkillsUI.< > f__mg$cache4 == null)
            {
                PlayerDashboardSkillsUI.< > f__mg$cache4 = new BoostUpdated(PlayerDashboardSkillsUI.onBoostUpdated);
            }
            playerSkills2.onBoostUpdated = (BoostUpdated)Delegate.Combine(onBoostUpdated, PlayerDashboardSkillsUI.< > f__mg$cache4);
            PlayerSkills playerSkills3   = Player.player.skills;
            Delegate     onSkillsUpdated = playerSkills3.onSkillsUpdated;

            if (PlayerDashboardSkillsUI.< > f__mg$cache5 == null)
            {
                PlayerDashboardSkillsUI.< > f__mg$cache5 = new SkillsUpdated(PlayerDashboardSkillsUI.onSkillsUpdated);
            }
            playerSkills3.onSkillsUpdated = (SkillsUpdated)Delegate.Combine(onSkillsUpdated, PlayerDashboardSkillsUI.< > f__mg$cache5);
        }