System.MissingFieldException: Field 'Box.m_TournamentButton' not found.
Closed this issue · 3 comments
2021-09-01 13:31:46.515+08:00 [25] INFO Logger (null) - [ClickHubButton] An exception occurred. System.MissingFieldException: Field 'Box.m_TournamentButton' not found.
at Triton.Game.Mono.MonoClass.method_5(String string_4) in C:\Users\clu\Downloads\Hearthbuddy-Silverfish\Hearthbuddy\Triton\Game\Mono\MonoClass.cs:line 345
at Triton.Game.Mono.MonoClass.method_3[T](String string_4) in C:\Users\clu\Downloads\Hearthbuddy-Silverfish\Hearthbuddy\Triton\Game\Mono\MonoClass.cs:line 320
at Triton.Game.TritonHs.smethod_5(Enum19 enum19_0, Boolean bool_3) in C:\Users\clu\Downloads\Hearthbuddy-Silverfish\Hearthbuddy\Triton\Game\TritonHs.cs:line 954
previous code
this.m_TournamentButton.SetText(GameStrings.Get("GLUE_TOURNAMENT"));
this.m_SoloAdventuresButton.SetText(GameStrings.Get("GLUE_ADVENTURE"));
this.m_TavernBrawlButton.SetText(GameStrings.Get("GLOBAL_TAVERN_BRAWL"));
this.m_GameModesButton.SetText(GameStrings.Get("GLUE_GAME_MODES"));
// Box
// Token: 0x06000D8C RID: 3468 RVA: 0x0004EE10 File Offset: 0x0004D010
private void InitializeUI()
{
PegUI.Get().AddInputCamera(this.m_Camera.GetComponent<Camera>());
this.m_boxWidgetRef.RegisterReadyListener<Widget>(new Action<Widget>(this.BoxWidgetIsReady));
this.m_mainShopWidgetRef.RegisterReadyListener<Widget>(new Action<Widget>(this.MainShopWidgetIsReady));
this.m_StartButton.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnStartButtonPressed));
InputScheme inputScheme = InputUtil.GetInputScheme();
if (inputScheme == InputScheme.TOUCH)
{
this.m_StartButton.SetText(GameStrings.Get("GLUE_START_TOUCH"));
}
else if (inputScheme == InputScheme.GAMEPAD)
{
this.m_StartButton.SetText(GameStrings.Get("GLUE_START_PRESS"));
}
else if (inputScheme == InputScheme.KEYBOARD_MOUSE)
{
this.m_StartButton.SetText(GameStrings.Get("GLUE_START_CLICK"));
}
this.m_TournamentButton.SetText(GameStrings.Get("GLUE_TOURNAMENT"));
this.m_SoloAdventuresButton.SetText(GameStrings.Get("GLUE_ADVENTURE"));
this.m_TavernBrawlButton.SetText(GameStrings.Get("GLOBAL_TAVERN_BRAWL"));
this.m_GameModesButton.SetText(GameStrings.Get("GLUE_GAME_MODES"));
if (UniversalInputManager.UsePhoneUI)
{
this.m_Drawer.gameObject.SetActive(false);
this.m_ribbonButtons.m_collectionManagerRibbon.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnCollectionButtonPressed));
this.m_ribbonButtons.m_packOpeningRibbon.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnOpenPacksButtonPressed));
this.m_ribbonButtons.m_questLogRibbon.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnQuestButtonPressed));
this.m_ribbonButtons.m_storeRibbon.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnStoreButtonReleased));
}
else
{
this.m_OpenPacksButton.SetText(GameStrings.Get("GLUE_OPEN_PACKS"));
this.m_CollectionButton.SetText(GameStrings.Get("GLUE_MY_COLLECTION"));
this.m_QuestLogButton.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnQuestButtonPressed));
this.m_StoreButton.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnStoreButtonReleased));
}
this.RegisterButtonEvents(this.m_TournamentButton);
this.RegisterButtonEvents(this.m_SoloAdventuresButton);
this.RegisterButtonEvents(this.m_GameModesButton);
this.RegisterButtonEvents(this.m_TavernBrawlButton);
this.RegisterButtonEvents(this.m_OpenPacksButton);
this.RegisterButtonEvents(this.m_CollectionButton);
this.UpdateUI(true);
}
// Box
// Token: 0x06000DBA RID: 3514 RVA: 0x000501C8 File Offset: 0x0004E3C8
protected virtual void SetupButtonText()
{
this.SetupStartButtonText();
this.m_PlayButton.SetText(GameStrings.Get("GLUE_TRADITIONAL"));
this.m_BattleGroundsButton.SetText(GameStrings.Get("GLUE_BACON"));
this.m_MercenariesButton.SetText(GameStrings.Get("GLUE_MERCENARIES"));
this.m_GameModesButton.SetText(GameStrings.Get("GLUE_GAME_MODES"));
}
this.SetupButtonText(); is used by InitializeUI method
from
public BoxMenuButton m_TournamentButton => method_3("m_TournamentButton");
to
public BoxMenuButton m_PlayButton => method_3("m_PlayButton");
Don't forget to update the method references.