NOA DebuggerNOA Debugger
  • v1.8.0
  • v1.7.1
  • v1.6.1
  • v1.5.0
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.1.1
  • v1.0.0
Demo
Contact
Buy
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • v1.8.0
  • v1.7.1
  • v1.6.1
  • v1.5.0
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.1.1
  • v1.0.0
Demo
Contact
Buy
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • 日本語
  • English
  • NoaInformationOverlayCallbacks

NoaInformationOverlayCallbacks

The callback settings specified when registering an overlay group.

By passing a class that inherits NoaInformationOverlayCallbacks to NoaInformationOverlay.RegisterGroup, you can customize events related to the overlay display.

Overridable Members

Methods

MethodDescription
OnBeforeShow(overlayInfo)A method executed before the overlay is displayed. Both the argument and the return value are IReadOnlyList<KeyValuePair<string, string>>. When you edit keys and values and return them, the changes are reflected on the overlay display (TextMeshPro rich text tags can be used).

Properties

PropertyDescription
AutoRefreshEnabledWhether to automatically refresh the overlay display.

Sample Code

The following sample code applies rich text tags via the return value of OnBeforeShow.

using System.Collections.Generic;
#if NOA_DEBUGGER
using NoaDebugger;
#endif

public class ExampleCustomOverlayCallbacks : NoaInformationOverlayCallbacks
{
    public override IReadOnlyList<KeyValuePair<string, string>> OnBeforeShow(
        IReadOnlyList<KeyValuePair<string, string>> overlayInfo)
    {
        if (overlayInfo == null || overlayInfo.Count == 0)
        {
            return overlayInfo;
        }

        var result = new List<KeyValuePair<string, string>>(overlayInfo.Count);
        foreach (var kv in overlayInfo)
        {
            string styledKey = $"<color=#AAAAAA>{kv.Key}</color>";
            string styledValue = $"<color=#00FF00>{kv.Value}</color>";
            result.Add(new KeyValuePair<string, string>(styledKey, styledValue));
        }

        return result;
    }
}

Links

Related Features

  • Information

Classes Used

  • NoaInformationOverlay