You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IPT.Common contains UXMenu and UXMenuItem which extend RAGENativeUI menus.
UXMenu
Very simply adjusts the UIMenu width based on the items added when their text length exceeds 30 characters.
UXMenuItem
Uses an underlying Setting object to generate a UIMenuItem which can interact with the user configuration.
Example
privateUXMenuBuildSettingsMenu(){varmenu=newUXMenu("Plugin Name","Configuration");foreach(varentryinConfig.Instance.AllSettings.Where(
x =>!x.Section.Equals("Advanced")&&UXMenuItem.IsSupportedType(x.GetType()))){varitem=newUXMenuItem(entry);item.OnListChanged-=this.Settings_OnListChanged;// to prevent multiple subscriptionsitem.OnListChanged+=this.Settings_OnListChanged;menu.AddItem(item);}returnmenu;}
private void Settings_OnListChanged(UIMenuItem sender, int newIndex)
{
if (sender is UXMenuItem item)
{
item.Update();
}
}