public void SetCell(AddHookCell cell, int index) { if (index >= this.filteredEligableMethods.Count) { cell.Disable(); return; } cell.CurrentDisplayedIndex = index; var method = this.filteredEligableMethods[index]; cell.MethodNameLabel.text = SignatureHighlighter.HighlightMethod(method); var sig = method.FullDescription(); if (hookedSignatures.Contains(sig)) { cell.HookButton.Component.gameObject.SetActive(false); cell.HookedLabel.gameObject.SetActive(true); } else { cell.HookButton.Component.gameObject.SetActive(true); cell.HookedLabel.gameObject.SetActive(false); } }
public void SetCell(HookCell cell, int index) { if (index >= this.currentHooks.Count) { cell.Disable(); return; } cell.CurrentDisplayedIndex = index; var hook = (HookInstance)this.currentHooks[index]; cell.MethodNameLabel.text = SignatureHighlighter.HighlightMethod(hook.TargetMethod); cell.ToggleActiveButton.ButtonText.text = hook.Enabled ? "Enabled" : "Disabled"; RuntimeHelper.SetColorBlockAuto(cell.ToggleActiveButton.Component, hook.Enabled ? new Color(0.15f, 0.2f, 0.15f) : new Color(0.2f, 0.2f, 0.15f)); }