Skip to content
This repository has been archived by the owner on Dec 30, 2024. It is now read-only.

Commit

Permalink
✨ Implement refreshing of custom interactions menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Chasmical committed Feb 23, 2022
1 parent 82db859 commit 968c6e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions RogueLibsCore/Interactions/InteractionModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public void OnPressedButton(string buttonName)
return;
}

// TODO: re-render the menu; this might be really complicated

// refresh the buttons (restarts the cycle)
Agent.worldSpaceGUI.StartCoroutine(Agent.worldSpaceGUI.RefreshObjectButtons2(Object));
}

}
Expand Down
3 changes: 2 additions & 1 deletion RogueLibsCore/Patches/Patches_Interactions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ public static bool InteractHook(PlayfieldObject __instance, Agent agent)
__instance.playerInvDatabase = agent.GetComponent<InvDatabase>();
#endregion

__instance.ShowObjectButtons();
if (__instance.buttons.Count > 0)
__instance.ShowObjectButtons();
return false;
}
// unnecessary?
Expand Down

0 comments on commit 968c6e0

Please sign in to comment.