TeamREPENTOGON/REPENTOGON

Returning a value for ModCallbacks.MC_MENU_INPUT_ACTION doesn't do anything

Opened this issue · 0 comments

local function onInput(_, entity, hook, action)
    if action == ButtonAction.ACTION_MENUCONFIRM then
        print("preventing input")
        if hook == InputHook.GET_ACTION_VALUE then
            return 0
        else
            return false
        end
    end
end

mod:AddCallback(ModCallbacks.MC_MENU_INPUT_ACTION, onInput)

When I am in I open the save selection menu, message "preventing input" is getting printed in the console, but selected save still opens when the key is pressed. Returning 0 for InputHook.GET_ACTION_VALUE and false for InputHook.IS_ACTION_PRESSED/TRIGGERED should stop the game from recognizing the input, but in this case, it doesn't have any effect.