internal void Refresh(List <Desc> descs) { var strInfo = String.Format("{0}\n-----------------\n{1}", TranslateServerEx.Translate(Name + "_TITLE"), String.Join("\n", descs.Select(x => TranslateServerEx.Translate(x.Format, x.Params)))); this.HintTooltip = strInfo; }
internal void AddDesc(Desc desc) { descs.Add(desc); var strInfo = String.Format("{0}\n-----------------\n{1}", TranslateServerEx.Translate(Name + "_TITLE"), String.Join("\n", descs.Select(x => TranslateServerEx.Translate(x.Format, x.Params)))); this.HintTooltip = strInfo; }
static StartScene() { GMRoot.logger = GD.Print; GMRoot.modder = new Modder(GlobalPath.mod); foreach (var language in GMRoot.modder.languages) { TranslateServerEx.AddTranslate(language); } Directory.CreateDirectory(GlobalPath.save); }
private string GetLevelDesc(GMData.Run.Adjust.EType type, GMData.Def.Adjust.Level levelInfo) { var list = new List <(string desc, double percent)>(); list.Add((type.ToString(), levelInfo.percent)); if (levelInfo.effect_pop_consume != null) { list.Add(("EFFECT_POP_CONSUME", levelInfo.effect_pop_consume.Value)); } return(string.Join("\n", list.Select(x => $"{TranslateServerEx.Translate(x.desc)} {x.percent}%"))); }
// Declare member variables here. Examples: // private int a = 2; // private string b = "text"; static StartScene() { System.IO.Directory.CreateDirectory(GlobalPath.save); Root.logger = (value) => GD.Print(value); Mod.logger = (value) => GD.Print(value); ModDataVisit.InitVisitMap(typeof(Root)); Mod.Load(GlobalPath.mod); Root.def = Mod.def; foreach (var mod in Mod.Enumerate()) { TranslateServerEx.AddTranslate(mod.languages); } }
public override void _Ready() { GetNode <Label>("CenterContainer/PanelContainer/VBoxContainer/Title").Text = TranslateServerEx.Translate(gEventObj.title.Format, gEventObj.title.Params); GetNode <RichTextLabel>("CenterContainer/PanelContainer/VBoxContainer/Desc").Text = TranslateServerEx.Translate(gEventObj.desc.Format, gEventObj.desc.Params); var buttons = GetChildButton(); if (buttons.Count() < gEventObj.options.Count()) { throw new Exception($"button count max is {buttons.Count()}, but real is {gEventObj.options.Count()}"); } for (int i = 0; i < gEventObj.options.Count(); i++) { buttons[i].Visible = true; buttons[i].Text = TranslateServerEx.Translate(gEventObj.options[i].desc.Format, gEventObj.options[i].desc.Params); } }
public override void _Ready() { desc = GetNode <RichTextLabel>("VBoxContainer/RichTextLabel"); buttonContainer = GetNode <VBoxContainer>("VBoxContainer/VBoxContainer"); GD.Print("InitSelectPanel.30"); desc.Text = TranslateServerEx.Translate(gmObj.desc.Format, gmObj.desc.Params); var buttons = CreateButton(gmObj.options.Length); for (int i = 0; i < buttons.Count; i++) { var currBtn = buttons[i]; var currOpt = gmObj.options[i]; currBtn.Text = TranslateServerEx.Translate(currOpt.desc.Format, currOpt.desc.Params); currBtn.Connect("pressed", this, nameof(_on_Button_Pressed), new Godot.Collections.Array() { i }); } }
public override void _Ready() { GetNode <ReactiveLabel>("Value").Assoc(RunData.Date.inst.desc, (desc) => TranslateServerEx.Translate("STATIC_DATE_VALUE", desc.Split('-'))); }
public override void _Ready() { GetNode <ReactiveLabel>("Value").Assoc(GMRoot.runner.date.OBSProperty(x => x.desc), (desc) => TranslateServerEx.Translate("STATIC_DATE_VALUE", desc.Split('-'))); }