} // end of GetHelpDescription() /// <summary> /// Activates the AddItem help card. /// </summary> /// <param name="parent">Parent pie selector.</param> /// <param name="typeName">This is the string that identifies the type of the object we're getting help for. This is used to get the correct help data from the Help class.</param> /// <param name="objectName">This the displayed name of the object/actor. This comes from the Strings class and may be localized.</param> public void Activate(PieSelector parent, string typeName, string objectName) { ToolTipManager.Clear(); if (typeName == null || objectName == null) { return; } this.parent = parent; if (state != States.Active) { // Ensure we have valid help before activating. shared.actorHelp = Help.GetActorHelp(typeName); if (shared.actorHelp == null || shared.actorHelp.upid == null) { return; } // Do stack handling here. If we do it in the update object we have no // clue which order things get pushed and popped and madness ensues. CommandStack.Push(commandMap); state = States.Active; shared.curActorName = objectName; if (shared.actorHelp.description != null) { shared.descBlob.RawText = shared.actorHelp.description.Trim(); } shared.SetUpGrid(); if (shared.examplesGrid != null) { shared.examplesGrid.Active = true; } // Always start the description at the beginning. shared.topLine = 0; shared.descOffset = 0; // Get the current scene thumbnail. shared.thumbnail = InGame.inGame.SmallThumbNail; // Tell InGame we're using the thumbnail so no need to do full render. InGame.inGame.RenderWorldAsThumbnail = true; HelpOverlay.Push(@"HelpCardAddItem"); timerInstrument = Instrumentation.StartTimer(Instrumentation.TimerId.AddItemHelpCards); } } // end of Activate