Пример #1
0
        public TexplorerFirstTimeSetup(int game, string DLCPath, string CookedPath)
        {
            InitializeComponent();

            // KFreon: Hide GUI stuff
            BackupCheckBox.Visible     = false;
            BackupPresentLabel.Visible = false;
            ExtractedLabel.Visible     = false;
            ExtractedListBox.Visible   = false;


            StatusProgLabel.Text = "Loading...";

            StatusUpdater   = new TextUpdater(StatusProgLabel, toolStrip1);
            ProgressUpdater = new ProgressBarChanger(toolStrip1, StatusProgBar);

            SetupStuff(game, DLCPath, CookedPath);

            foreach (DLCInfo dlc in DLCs)
            {
                MainListView.Items.Add(dlc.Name, true);
            }

            StatusUpdater.UpdateText("Ready. Loaded " + (DLCs.Count - 1) + " DLC's. Disk space to be used: ~" + DLCs.Select(d => d.Size).Sum() + " GB");
        }
Пример #2
0
        private void SetupStuff(int game, string DLCPath, string CookedPath)
        {
            List <string> things = KFreonLib.Misc.Methods.GetInstalledDLC(DLCPath);

            // KFreon: Add basegame
            DLCInfo basegame = new DLCInfo("BaseGame", CookedPath, game);

            DLCs.Add(basegame);

            if (things.Count == 0)
            {
                DebugOutput.PrintLn("No DLC Detected.");
                StatusUpdater.UpdateText("No DLC Detected!");
            }
            else
            {
                foreach (string folder in things)
                {
                    string name = KFreonLib.Misc.Methods.GetDLCNameFromPath(folder);
                    if (name != null)
                    {
                        DLCs.Add(new DLCInfo(name, folder, game));
                    }
                }
            }

            // KFreon: Check if there's a custtextures.tfc -> Indicates texture modding. NOT a guarantee though.
            if (DLCs[0].Files.Where(t => t.ToLowerInvariant().Contains("custtextures")).Any())
            {
                MessageBox.Show("Possible texture mods detected." + Environment.NewLine + "Scans indicate presence of custtextures#.tfc, which itself indicates texture mods have been made." + Environment.NewLine + "It is STRONGLY recommended to cancel this setup and vanilla your game (see Instructions).", "*Shepards EDI Airlock joke face*", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Пример #3
0
    public void Show(GameObject menu)
    {
        menu.SetActive(true);
        txtUpdater.UpdateText(menu);

        foreach (Image img in menu.GetComponentsInChildren <Image>())
        {
            // Quando o obj é ativado os elementos voltam a ter alpha 1 automaticamente
            img.CrossFadeAlpha(0, 0, true);
            img.CrossFadeAlpha(1, fadeDuration, true);
        }

        foreach (Text txt in menu.GetComponentsInChildren <Text>())
        {
            txt.CrossFadeAlpha(0, 0, true);
            txt.CrossFadeAlpha(1, fadeDuration, true);
        }

        foreach (Button b in menu.GetComponentsInChildren <Button>())
        {
            b.interactable = true;
        }

        foreach (Slider s in menu.GetComponentsInChildren <Slider>())
        {
            if (s.tag == "SFXSlider")
            {
                s.value = GameControl.sfxVolume;
                s.onValueChanged.AddListener(SetSFXVolume);
                SetSFXVolume(s.value);
            }
            else if (s.tag == "MusicSlider")
            {
                s.value = GameControl.musicVolume;
                s.onValueChanged.AddListener(SetMusicVolume);
                SetMusicVolume(s.value);
            }
        }
    }
Пример #4
0
    void Update()
    {
        if (timer < tlTime)
        {
            timer += Time.deltaTime;
            TimerText.UpdateText(timer.ToString("0.00"));
        }

        //temporary solution
        if (it < data.buttons.Length)
        {
            if (timer > timeStamps[it])
            {
                PlaceButton();
                it++;
            }
        }
    }
Пример #5
0
        public TexplorerFirstTimeSetup(int game, string DLCPath, string CookedPath)
        {
            InitializeComponent();

            StatusProgLabel.Text = "Loading...";

            StatusUpdater   = new TextUpdater(StatusProgLabel, toolStrip1);
            ProgressUpdater = new ProgressBarChanger(toolStrip1, StatusProgBar);

            SetupStuff(game, DLCPath, CookedPath);

            foreach (DLCInfo dlc in DLCs)
            {
                MainListView.Items.Add(dlc.isExtracted ? dlc.Name : "NOT EXTRACTED: " + dlc.Name, dlc.isExtracted);
            }


            StatusUpdater.UpdateText("Ready. Loaded " + (DLCs.Count - 1) + " DLC's.");
        }
Пример #6
0
    void UpdateScoreText()
    {
        string temp      = "";
        int    tempScore = score;

        while (tempScore > 0)
        {
            temp      += tempScore % 10;
            tempScore /= 10;
        }

        int n = temp.Length;

        for (int i = 0; i < digits - n; i++)
        {
            temp += '0';
        }

        scoreTxt.UpdateText(Reverse(temp));
        multiTxt.UpdateText(multi + "");
    }
Пример #7
0
 //called with the press of the OK button
 public void StartEditor()
 {
     timerTxt.UpdateText(timer.ToString("0.00"));
     mapNameTxt.UpdateText(map.mapName);
 }
Пример #8
0
 //if you miss one click you lose the multiplayer
 public void LoseMulti()
 {
     multi = 1;
     multiTxt.UpdateText(multi + "");
 }
Пример #9
0
 void Start()
 {
     fader      = GameObject.FindGameObjectWithTag("Fader").GetComponent <ScreenFader>();
     txtUpdater = GetComponent <TextUpdater>();
     txtUpdater.UpdateText(gameObject);
 }