GE Lua Documentation

Press F to search!

Combo2

Definition


-- @/lua/common/extensions/ui/imgui_gen_luaintf.lua:405
function M.Combo2(string_label, int_current_item, string_items_separated_by_zeros, int_popup_max_height_in_items)
  if int_popup_max_height_in_items == nil then int_popup_max_height_in_items = -1 end
  if string_label == nil then log("E", "", "Parameter 'string_label' of function 'Combo2' cannot be nil, as the c type is 'const char *'") ; return end
  if int_current_item == nil then log("E", "", "Parameter 'int_current_item' of function 'Combo2' cannot be nil, as the c type is 'int *'") ; return end
  if string_items_separated_by_zeros == nil then log("E", "", "Parameter 'string_items_separated_by_zeros' of function 'Combo2' cannot be nil, as the c type is 'const char *'") ; return end
  return imgui.Combo2(string_label, int_current_item, string_items_separated_by_zeros, int_popup_max_height_in_items)
end

Callers

@/lua/ge/extensions/gameplay/drift/general.lua
      local presetPtr = im.IntPtr((tableFindKey(contextList, context)) - 1)
      if im.Combo2("", presetPtr, s) then
        setContext(contextList[presetPtr[0]+1])
        presetPtr = im.IntPtr((tableFindKey(challengeModeList, challengeMode)) - 1)
        if im.Combo2("##"..'t', presetPtr, s) then
          setChallengeMode(challengeModeList[presetPtr[0]+1])
@/lua/ge/extensions/editor/materialEditor.lua
  local currentReflectionMode = o.reflectionMode[0]
  if im.Combo2("##reflectionMode", o.reflectionMode, "None\0Level\0Cubemap\0\0") then
    if o.reflectionMode[0] == 0 and currentReflectionMode ~= 0 then
  im.PushItemWidth(im.GetContentRegionAvailWidth() - 10)
  if im.Combo2("##MaterialEditorLayer", o.layer, "Layer 0\0Layer 1\0Layer 2\0Layer 3\0\0") then
    if dbg then editor.logInfo(logTag .. 'Layer has changed!') end
@/lua/ge/extensions/render/openxr.lua

    changed = im.Combo2("2D screen view##openXRwindowViewMode", M.openXRwindowViewMode, "Empty (fastest)\0Between eyes (slowest)\0Reuse left eye\0Reuse right eye\0") or changed
    changed = im.Checkbox("Display user interface (CEF)", M.openXRuiEnabled) or changed
    im.Text("   ") im.SameLine()
    --changed = im.Combo2("Anchor##openXRuiMode", M.openXRuiMode, "Room\0Head\0Vehicle (NI)\0Level (NI)\0") or changed -- hide not implemented modes for now
    changed = im.Combo2("Anchor##openXRuiMode", M.openXRuiMode, "Room\0Head") or changed
    --changed = im.Combo2("Anchor##openXRuiMode", M.openXRuiMode, "Room\0Head\0Vehicle (NI)\0Level (NI)\0") or changed -- hide not implemented modes for now
    changed = im.Combo2("Anchor##openXRuiMode", M.openXRuiMode, "Room\0Head") or changed
    if im.Checkbox("UseQuadComposition", M.openXRquadCompositionEnabled) then
@/lua/ge/extensions/gameplay/util/crashDetection.lua
      im.PushItemWidth(im.GetContentRegionAvailWidth() - 200) -- Reserve space for button
      im.Combo2("Select Vehicle", debugSelectedVehicleIndex, vehicleListStr)
      im.PopItemWidth()
@/lua/ge/extensions/editor/dynamicDecals/layerTypes/decal.lua
  im.PushItemWidth(im.GetContentRegionAvailWidth())
  if im.Combo2(string.format("##%s_%s_%s", layer.uid, guiId, "alphaMaskChannel"), editor.getTempInt_NumberNumber(layer.alphaMaskChannel), "red\0green\0blue\0alpha\0\0") then
    layer.alphaMaskChannel = editor.getTempInt_NumberNumber()
  im.PushItemWidth(im.GetContentRegionAvailWidth())
  if im.Combo2(string.format("##%s_%s_%s", layer.uid, guiId, "alphaMaskBlendMode"), editor.getTempInt_NumberNumber(layer.alphaMaskBlendMode), "multiply\0add\0\0") then
    layer.alphaMaskBlendMode = editor.getTempInt_NumberNumber()
@/lua/ge/extensions/editor/dynamicDecals/widgets.lua
  im.PushItemWidth(im.GetContentRegionAvailWidth() + (widgetOptions.widthMod and widgetOptions.widthMod or 0))
  if im.Combo2(widgetId, editor.getTempInt_NumberNumber(baseProp.getMod and baseProp.getMod(value) or value), options) then
    local newVal = editor.getTempInt_NumberNumber()
@/lua/ge/extensions/editor/vizHelper.lua
    if im.TreeNode1("Options") then
      im.Combo2("Image", curItem, vizHelperComboStr)
      im.SliderFloat("Size", scale, 0.1, 50, "%.2f")
@/lua/ge/extensions/editor/dynamicDecals/layerTypes/brushStroke.lua
  im.PushItemWidth(im.GetContentRegionAvailWidth() - ((layer.colorPaletteMapId > 0) and (im.GetStyle().ItemSpacing.x + math.ceil(im.GetFontSize()) + 2 * im.GetStyle().FramePadding.y) or 0))
  if im.Combo2(string.format("##%s_%s_%s", layer.uid, guiId, "colorpalettemapid"), editor.getTempInt_NumberNumber(layer.colorPaletteMapId), "zero\0one\0two\0three\0\0") then
    layer.colorPaletteMapId = editor.getTempInt_NumberNumber()
  im.PushItemWidth(im.GetContentRegionAvailWidth())
  if im.Combo2(string.format("##%s_%s_%s", layer.uid, guiId, "alphaMaskChannel"), editor.getTempInt_NumberNumber(layer.alphaMaskChannel), "red\0green\0blue\0alpha\0\0") then
    layer.alphaMaskChannel = editor.getTempInt_NumberNumber()
  im.PushItemWidth(im.GetContentRegionAvailWidth())
  if im.Combo2(string.format("##%s_%s_%s", layer.uid, guiId, "alphaMaskBlendMode"), editor.getTempInt_NumberNumber(layer.alphaMaskBlendMode), "multiply\0add\0\0") then
    layer.alphaMaskBlendMode = editor.getTempInt_NumberNumber()
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/vePowerTrain.lua

      im.Combo2("Device Name", devicePtr, deviceString)
      for lpid = 0, #vEditor.vdata.powertrain - 1 do
@/lua/ge/extensions/editor/dynamicDecals/textures.lua
      im.SetNextItemWidth(im.GetContentRegionAvailWidth())
      if im.Combo2("##dynDecalTexturesInspector_type", editor.getTempInt_NumberNumber(bulkChangeTemplate.type), "greyscale\0color\0sdf\0\0") then
        bulkChangeTemplate.type = editor.getTempInt_NumberNumber()
        im.SetNextItemWidth(im.GetContentRegionAvailWidth())
        if im.Combo2("##dynDecalTexturesInspector_type", editor.getTempInt_NumberNumber(selectedTexturesSidecarContent[file].type), "greyscale\0color\0\0") then
          selectedTexturesSidecarContent[file].type = editor.getTempInt_NumberNumber()
@/lua/ge/extensions/editor/terrainEditor.lua
        im.PushItemWidth(var.channelComboWidth)
        if im.Combo2("##ChannelCombo_" .. map.path, map.channelId, "R\0G\0B\0\0") then
          map.channel = (map.channelId[0] == 0) and 'R' or ((map.channelId[0] == 1) and 'G' or 'B')
@/lua/ge/extensions/editor/driftDataEditor.lua
    local presetPtr = im.IntPtr((tableFindKey(stuntZonePreset.presets, elem.score) or 2) - 1)
    if im.Combo2(stuntZonePreset.absolute and "Points" or "Max points", presetPtr, s) then
      elem.score = stuntZonePreset.presets[tonumber(presetPtr[0]) + 1]
@/lua/ge/extensions/ui/console.lua
      im.PushItemWidth(200 * uiScale)
      if im.Combo2("##cmdctx", comboCurrentItem, comboCtxTxt) then
        --print("context changed")
@/lua/ge/extensions/editor/dynamicDecals/layerTypes/path.lua
  im.PushItemWidth(im.GetContentRegionAvailWidth() - ((layer.colorPaletteMapId > 0) and (im.GetStyle().ItemSpacing.x + math.ceil(im.GetFontSize()) + 2 * im.GetStyle().FramePadding.y) or 0))
  if im.Combo2(string.format("##%s_%s_%s", layer.uid, guiId, "inspector_colorpalettemapid"), editor.getTempInt_NumberNumber(layer.colorPaletteMapId), "zero\0one\0two\0three\0\0") then
    layer.colorPaletteMapId = editor.getTempInt_NumberNumber()
  im.PushItemWidth(im.GetContentRegionAvailWidth())
  if im.Combo2(string.format("##%s_%s_%s", layer.uid, guiId, "inspector_pathType"), editor.getTempInt_NumberNumber(layer.pathType), "Linear\0Bezier\0\0") then
    layer.pathType = editor.getTempInt_NumberNumber()
  im.PushItemWidth(im.GetContentRegionAvailWidth())
  if im.Combo2(string.format("##%s_%s_%s", layer.uid, guiId, "inspector_alphaMaskChannel"), editor.getTempInt_NumberNumber(layer.alphaMaskChannel), "red\0green\0blue\0alpha\0\0") then
    layer.alphaMaskChannel = editor.getTempInt_NumberNumber()
  im.PushItemWidth(im.GetContentRegionAvailWidth())
  if im.Combo2(string.format("##%s_%s_%s", layer.uid, guiId, "inspector_alphaMaskBlendMode"), editor.getTempInt_NumberNumber(layer.alphaMaskBlendMode), "multiply\0add\0\0") then
    layer.alphaMaskBlendMode = editor.getTempInt_NumberNumber()
@/lua/ge/extensions/editor/gen/lib/ui.lua
	local comboItems = im.ArrayCharPtrByTbl(list)
--    if im.Combo2(lbl, editor.getTempInt_NumberNumber(isel), "aaaaaa") then
    im.Text(lbl)
--	count_inp = count_inp + 1
--	if im.Combo2('id_'..key, comboItems, 'AAA') then
    local id = 'id_'..key
@/lua/common/extensions/ui/imgui_gen_luaintf.lua
  if string_items_separated_by_zeros == nil then log("E", "", "Parameter 'string_items_separated_by_zeros' of function 'Combo2' cannot be nil, as the c type is 'const char *'") ; return end
  return imgui.Combo2(string_label, int_current_item, string_items_separated_by_zeros, int_popup_max_height_in_items)
end
@/lua/ge/extensions/editor/assetDeduplicator.lua
      im.Separator()
      if im.Combo2("##modes", selectedMode, modeString) then
        compareFilesJob = nil
@/lua/ge/extensions/util/screenshotCreator.lua
        ctrls.outputDestinationsStr = s
        im.Combo2("Output destination", ctrls.currOuputDestinationPtr, ctrls.outputDestinationsStr)
        ctrls.presetResolutionsComboStr = s .. '\0'
        im.Combo2("Common Resolutions", ctrls.currResolutionsPtr, ctrls.presetResolutionsComboStr)
@/lua/ge/extensions/editor/gen/ui.lua
	local comboItems = im.ArrayCharPtrByTbl(list)
--    if im.Combo2(lbl, editor.getTempInt_NumberNumber(isel), "aaaaaa") then
  im.Text(lbl)
@/lua/ge/extensions/editor/shapeEditor.lua
        if shapeInfo.sequences then
          if im.Combo2("animation", comboSeqCurrentItem, comboSeqCtxTxt) then
            -- log( "E", "seq", dumps(comboSeqCurrentItem[0])  )
        end
        if im.Combo2("Source detail", comboCurrentItem, comboCtxTxt) then
          shapePrev:setCurrentDetail(comboCurrentItem[0])