def AddListItem(caller: unrealsdk.UObject, function: unrealsdk.UFunction, params: unrealsdk.FStruct) -> bool: """ This function is called every time an item is added to *any* menu list - we obviously can't use a generic hook. Using it cause it simplifies the code to add our own entry. """ if params.Caption != "$WillowMenu.MenuOptionDisplayNames.KeyBinds": return True # Want ours to display after the normal keybinds option unrealsdk.DoInjectedCallNext() caller.AddListItem(params.EventID, params.Caption, params.bDisabled, params.bNew) caller.AddListItem(_MODDED_EVENT_ID, _MODDED_KEYBINDS_CAPTION, disabled, False) return False
def AddListItem(caller: unrealsdk.UObject, function: unrealsdk.UFunction, params: unrealsdk.FStruct) -> bool: """ This function is called every time an item is added to *any* menu list - we obviously can't use a generic hook. Using it cause it simplifies the code to add our own entry. """ if params.Caption == "$WillowGame.WillowScrollingList.BackCaption": caller.AddListItem(_MOD_OPTIONS_EVENT_ID, _MOD_OPTIONS_MENU_NAME, disabled, False) return True
def AddListItem(caller: unrealsdk.UObject, function: unrealsdk.UFunction, params: unrealsdk.FStruct) -> bool: """ This function is called every time an item is added to *any* menu list - we obviously can't use a generic hook. Using it cause it simplifies the code to replace the caption. """ if params.Caption == "$WillowMenu.WillowScrollingListDataProviderFrontEnd.DLC": unrealsdk.DoInjectedCallNext() caller.AddListItem(_MODS_EVENT_ID, _MODS_MENU_NAME, False, False) return False return True
def AddListItem(caller: unrealsdk.UObject, function: unrealsdk.UFunction, params: unrealsdk.FStruct) -> bool: """ This function is called every time an item is added to *any* menu list - we obviously can't use a generic hook. Using it cause it simplifies the code to replace the caption. """ if params.Caption == "$WillowMenu.WillowScrollingListDataProviderFrontEnd.DLC": return False inject_now = False if unrealsdk.GetEngine().GetCurrentWorldInfo( ).NetMode == 3: # NM_Client inject_now = params.Caption == "$WillowMenu.WillowScrollingListDataProviderFrontEnd.Disconnect" else: inject_now = params.Caption == "$WillowMenu.WillowScrollingListDataProviderFrontEnd.Quit" if inject_now: caller.AddListItem(_MODS_EVENT_ID, _MODS_MENU_NAME, False, False) return True