Exemplo n.º 1
0
 public void SwitchToEntry(UIMouseEvent evt, UIElement listeningElement)
 {
     if (listeningElement is UIText text)
     {
         LoreEntry entry = entriesList.Single(i => i.Title == text.Text);
         CurrentEntryName = entry.Title;
         SetMainPanel(entry.Panel);
         InLoreEntry = true;
     }
 }
Exemplo n.º 2
0
        internal void AddEntry(string title, string content, Texture2D texture = null, bool allPage = false, Func <bool> condition = null)
        {
            LoreEntry entry = new LoreEntry(title, content, texture, allPage, condition);

            entriesList.Add(entry);

            UIText text = new UIText(entry.Title);

            text.OnClick += SwitchToEntry;
            Add(text);
        }