GE Lua Documentation

Press F to search!

setMenuActionMapEnabled

Definition


-- @/lua/ge/extensions/core/input/bindings.lua:940

local function setMenuActionMapEnabled(enabled)
  if M.isMenuActive == enabled then return end
  setMenuActionEnabled(enabled, nil, "MenuActionMap")
  for menuActionMapName,_ in pairs(core_input_actions.menuActionMapNames) do
    setMenuActionEnabled(enabled, nil, menuActionMapName)
  end

  M.isMenuActive = enabled
  guihooks.trigger('MenuActionMapEnabled', enabled)
end

Callers

@/ui/entrypoints/main/main.js
        let menuActionMapEnabled = typeof $state.current.menuActionMapEnabled === "boolean" ? $state.current.menuActionMapEnabled : true // true by default
        // bngApi.engineLua(`extensions.core_input_bindings.setMenuActionMapEnabled(${menuActionMapEnabled})`)
        captureInput(menuActionMapEnabled)
        isEnabled = enable
        bngApi.engineLua(`extensions.core_input_bindings.setMenuActionMapEnabled(${enable})`)
      }
@/lua/ge/extensions/core/input/bindings.lua
  if tableIsEmpty(stateStack) or stateStack[#stateStack] == "/play" then
    setMenuActionMapEnabled(false)
  else
  else
    setMenuActionMapEnabled(true)
  end
  print(debug.tracesimple())
  M.setMenuActionMapEnabled(enabled)
end
@/ui/ui-vue/src/bridge/libs/UINavEvents.js
const activateMenuActionMap = (state=true) => {
  //lua.extensions.core_input_bindings.setMenuActionMapEnabled(state) // not 100% sure this is safe
  //runRawLua(`scenetree.findObject("${UI_NAVIGATION_ACTION_MAP}"):${state?'push':'pop'}()`) // TODO: REMOVE ME: this should have been done already thanks to the line above. if you are reading this comment after v0.34 has been released to the public, delete this line ASAP so we can test and release to public without it