예제 #1
0
        // -----------------------------------------------------------------------------------
        // OnLangChanged
        // -----------------------------------------------------------------------------------
        public void OnLangChanged()
        {
            LanguageTemplate tmpl = LanguageLibrary.GetTemplate(languageDropdown.options[languageDropdown.value].text);

            Obj.GetGame.language = tmpl;
            Show();
        }
예제 #2
0
        // -------------------------------------------------------------------------------
        // ShowError
        // Displays an error message using the provided string as DescriptionTemplate name
        // -------------------------------------------------------------------------------
        public void ShowError(string error)
        {
            SoundController.Play(errorSound);
            string tmp_vocab = LanguageLibrary.GetText(error);

            gameScreen.ShowError(tmp_vocab);
        }
예제 #3
0
        // -----------------------------------------------------------------------------------
        // getTooltip
        // -----------------------------------------------------------------------------------
        public string getTooltip()
        {
            if (isValid && identified)
            {
                tooltip = "<b>" + template.description.getName;                                                                         // Name

                if (level > 0)                                                                                                          // Level
                {
                    tooltip += " +" + level;
                }
                else if (level < 0)
                {
                    tooltip += " " + level;
                }

                tooltip += "</b>\n";

                tooltip += "<i>" + template.description.getDescription + "</i>\n";                                      // Description

                if (template is ItemEquipableTemplate)                                                                  // Durability
                {
                    tooltip += LanguageLibrary.GetText("_durability") + ": " + durability + "/" + template.maxDurability + "\n";
                }

                if (template is ItemUseableTemplate || template is ItemEquipableTemplate && template.maxCharges > 0)                    // Charges
                {
                    tooltip += LanguageLibrary.GetText("_charges") + ": " + charges + "/" + template.maxCharges + "\n";
                }
            }

            return(tooltip);
        }
예제 #4
0
        // -----------------------------------------------------------------------------------
        // Show
        // -----------------------------------------------------------------------------------
        public override void Show()
        {
            optionsHeadline.text     = DescriptionLibrary.GetName("Hdl_Options");
            musicVolumeHeadline.text = DescriptionLibrary.GetName("Hdl_MusicVolume");
            soundVolumeHeadline.text = DescriptionLibrary.GetName("Hdl_SoundVolume");

            continueButton.GetComponentInChildren <Text>().text = DescriptionLibrary.GetName("Btn_Confirm");

            languageDropdown.options = LanguageLibrary.GetAllTemplates().Select(
                p => new Dropdown.OptionData(p.name)
                ).ToList();

            base.Show();
        }
예제 #5
0
        // -------------------------------------------------------------------------------
        // ShowText
        // -------------------------------------------------------------------------------
        public void ShowText(string vocab)
        {
            string tmp_vocab = LanguageLibrary.GetText(vocab);

            gameScreen.ShowError(tmp_vocab);
        }