protected override void FillWindow(Rect inRect) { Text.Font = GameFont.Small; GUI.BeginGroup(inRect); bool flag = false; if (Event.current.type == EventType.KeyDown && Event.current.keyCode == KeyCode.Return) { flag = true; Event.current.Use(); } string text = Widgets.TextField(new Rect(0f, 15f, inRect.width, 35f), this._name); if (text.Length < MaxNameLength) { this._name = text; } if (Widgets.TextButton(new Rect(15f, inRect.height - 35f - 15f, inRect.width - 15f - 15f, 35f), "OK") || flag) { Blueprint bp = BlueprintFiles.LoadFromFile(_fileName); bp.Name = _name; _assembly.AssemblyBillStack.AddBill(new AssemblyBill(_assembly.AssemblyBillStack, bp)); Close(); } GUI.EndGroup(); }
protected override void DoMapEntryInteraction(string fileName) { Blueprint bp = BlueprintFiles.LoadFromFile(fileName); Messages.Message("BlueprintLoaded".Translate(fileName), MessageSound.Standard); _oldPage.Blueprint = bp; Close(); }