53 if (max > 1 && a.IsUnique)
57 uIContextMenu.
AddSlider(
"display", (
float n) => n +
" / " + max, a.show, delegate(
float v)
62 }, 0f, max, isInt:
true, hideOther:
false);
63 uIContextMenu.
AddToggle(
"displayRandom", a.random, delegate(
bool on)
90 if ((
bool)componentOf && componentOf.refObj is
Hoard.
Item)
102 string text = a.num.ToString() ??
"";
105 text = text +
" (" + a.show +
")";
107 b.mainText.text = text;
109 b.
icon.SetNativeSize();
115 if (force || (!(
lastShown == button) && (
bool)button))
118 string text =
"collectibleTitle".lang(
item.Source.GetName(),
item.num.ToString() ??
"",
item.show.ToString() ??
"");
123 textName.text = text;
124 textDetail.text =
item.Source.GetText(
"detail", returnNull:
true).IsEmpty(
"none".lang());
static SourceManager sources
Sprite GetSprite(string id)
Dictionary< string, Item > items
void RefreshInfo(UIButton button, bool force=false)
Func< Hoard.Item, bool > onClick
override void OnAfterInit()
void SetButton(Hoard.Item a, UIButton b)
SourceCollectible collectibles
List< ButtonPair > buttons
override void Add(object item)
virtual void Refresh(bool highlightLast=false)