public void AddTutorial(string name, string text, TileReference icon = null) { Entries[name] = new TutorialEntry() { Text = text, Title = name, Shown = false, Popup = false, Icon = icon }; }
public void AddTutorial(string name, string text, ResourceType.GuiGraphic Icon = null) { Entries[name] = new TutorialEntry() { Text = text, Title = name, Shown = false, Popup = false, Icon = Icon }; }
private Widget CreateTutorialPopup(TutorialEntry Tutorial, Root Gui) { var popup = Gui.ConstructWidget(new Gui.Widgets.TutorialPopup { Message = Tutorial, OnClose = (sender) => { TutorialEnabled = !(sender as Gui.Widgets.TutorialPopup).DisableChecked; Gui.ClearSpecials(); if (!String.IsNullOrEmpty(Tutorial.NextTutorial)) { ShowTutorial(Tutorial.NextTutorial); } ExistingTutorial = null; }, OnLayout = (sender) => { sender.Rect.X = Gui.RenderData.VirtualScreen.Width - sender.Rect.Width; sender.Rect.Y = 64; } }); if (Tutorial.Popup) { Gui.ShowMinorPopup(popup); popup.PopupDestructionType = PopupDestructionType.Keep; } else { Gui.RootItem.AddChild(popup); } Gui.SpecialHiliteWidgetName = Tutorial.GuiHilite; return(popup); }