GE Lua Documentation

Press F to search!

enableShowVehicleSpecificActions

Definition


-- @/lua/ge/extensions/ui/bindingsLegend.lua:627

local function enableShowVehicleSpecificActions(enable)
  if not settings.getValue("bindingsLegendShowApp", true) or (not enable) == (not actionCategoryActive["vehicleSpecific"]) then
    return
  end

  local vehicleSpecificActions
  if enable then
    vehicleSpecificActions = getVehicleSpecificActions()
    if tableIsEmpty(vehicleSpecificActions) then
      return
    end
    hideVehicleSpecificActionsOnModifierPressed = nil
    addActions("vehicleSpecific", vehicleSpecificActions, {priority = 10})
  else
    removeActionCategoryByLabel("vehicleSpecific")
  end
  sendDataToUI()
end

Callers

@/lua/ge/extensions/ui/bindingsLegend.lua
    if im.Button("Show Vehicle Specific") then
      M.enableShowVehicleSpecificActions(true)
    end
    if im.Button("Hide Vehicle Specific") then
      M.enableShowVehicleSpecificActions(false)
    end
local function toggleShowVehicleSpecificActions()
  enableShowVehicleSpecificActions(not actionCategoryActive["vehicleSpecific"])
end
    boundModifierActions = nil
    enableShowVehicleSpecificActions(false)
    local vehicleSpecificActions = getVehicleSpecificActions()
local function toggleShowApp()
  enableShowVehicleSpecificActions(false)
  resetFade()