Definition
-- @/lua/common/extensions/ui/imgui_gen_luaintf.lua:383
function M.ImageButton(string_str_id, ImTextureID_user_texture_id, ImVec2_size, ImVec2_uv0, ImVec2_uv1, ImVec4_bg_col, ImVec4_tint_col)
if ImVec2_uv0 == nil then ImVec2_uv0 = M.ImVec2(0,0) end
if ImVec2_uv1 == nil then ImVec2_uv1 = M.ImVec2(1,1) end
if ImVec4_bg_col == nil then ImVec4_bg_col = M.ImVec4(0,0,0,0) end
if ImVec4_tint_col == nil then ImVec4_tint_col = M.ImVec4(1,1,1,1) end
if string_str_id == nil then log("E", "", "Parameter 'string_str_id' of function 'ImageButton' cannot be nil, as the c type is 'const char *'") ; return end
return imgui.ImageButton(string_str_id, ImTextureID_user_texture_id, ImVec2_size, ImVec2_uv0, ImVec2_uv1, ImVec4_bg_col, ImVec4_tint_col)
end
Callers
@/lua/ge/extensions/editor/roadTemplateEditor.lua
im.PushID1(string.format('template_%d', i))
if im.ImageButton("##selectionDialogButton", editor_roadUtils.getMaterials()[i].texId, im.ImVec2(128, 128), im.ImVec2Zero, im.ImVec2One,
im.ImColorByRGB(0,0,0,255).Value, im.ImColorByRGB(255,255,255,255).Value) then
@/lua/common/extensions/ui/imgui_gen_luaintf.lua
if string_str_id == nil then log("E", "", "Parameter 'string_str_id' of function 'ImageButton' cannot be nil, as the c type is 'const char *'") ; return end
return imgui.ImageButton(string_str_id, ImTextureID_user_texture_id, ImVec2_size, ImVec2_uv0, ImVec2_uv1, ImVec4_bg_col, ImVec4_tint_col)
end
@/lua/ge/extensions/editor/toolUtilities/materialSelectionMgr.lua
if texture and texture.texId then
if im.ImageButton("##Preview_" .. objId, texture.texId, vec32) then
clickedImage = true
@/lua/ge/extensions/editor/api/gui.lua
if not backgroundCol then backgroundCol = imgui.GetStyleColorVec4(imgui.Col_Button) end
imgui.ImageButton("##ImageButton", iconsTex.texId, size, imgui.ImVec2(ux, uy), imgui.ImVec2(vx, vy), backgroundCol, col)
imgui.PopStyleColor()
@/lua/ge/extensions/editor/assetBrowser.lua
-- TODO: Use color from editor's colors table.
if im.ImageButton(
"##InspectorGuiButton",
@/lua/ge/extensions/editor/roadArchitect.lua
if not (texture.texId == nil) then
if im.ImageButton(
"##DisplayMaterialButton",
@/lua/ge/extensions/editor/dynamicDecals/textures.lua
if im.ImTextureHandlerIsCached(filePath) then
if im.ImageButton(string.format("##textures_imageButton_%s", filePath), editor.getTempTextureObj(filePath).texId, im.ImVec2(thumbnailSize, thumbnailSize), im.ImVec2Zero, im.ImVec2One, (sel and tableContains(sel, filePath)) and selectedTextureCol.Value or nil) then
handleTextureImageTileClicked(filePath, textureFilePaths)
im.PushID1("Texture_" .. tostring(k))
if im.ImageButton(string.format("##textures_imageButton_%s", filePath), editor.getTempTextureObj(filePath).texId, im.ImVec2(thumbnailSize, thumbnailSize), im.ImVec2Zero, im.ImVec2One, (sel and tableContains(sel, filePath)) and selectedTextureCol.Value or nil) then
handleTextureImageTileClicked(filePath, textureFilePaths)
if im.ImTextureHandlerIsCached(filePath) then
if im.ImageButton(string.format("##textures_imageButton_%s", filePath), editor.getTempTextureObj(filePath).texId, im.ImVec2(thumbnailSize, thumbnailSize), im.ImVec2Zero, im.ImVec2One, (sel and tableContains(sel, filePath)) and selectedTextureCol.Value or nil) then
handleTextureImageTileClicked(filePath, textureFilePaths)
im.PushID1("Texture_" .. tostring(k))
if im.ImageButton(string.format("##textures_imageButton_%s", filePath), editor.getTempTextureObj(filePath).texId, im.ImVec2(thumbnailSize, thumbnailSize), im.ImVec2Zero, im.ImVec2One, (sel and tableContains(sel, filePath)) and selectedTextureCol.Value or nil) then
handleTextureImageTileClicked(filePath, textureFilePaths)
@/lua/ge/extensions/editor/dynamicDecals/widgets.lua
if im.ImageButton(string.format("%s_imageButton", widgetId), img.texId, im.ImVec2(imgWidth, imgHeight), im.ImVec2(0,0), im.ImVec2(1,1)) then
local openPath = baseProp.defaultDir
@/lua/ge/extensions/editor/terrainMaterialsEditor.lua
im.PushID1(propertyName)
if im.ImageButton(
"##imageButton1",
im.PushID1("mat_properties_image_button_diffuse")
if im.ImageButton("##imageButton2", terrainMtlCopyProxy.diffuseMapObj.texId, materialEditorMapThumbnailSize, nil, nil) then
editor_fileDialog.openFile(
im.PushID1("mat_properties_image_button_macro")
if im.ImageButton("##imageButton3", terrainMtlCopyProxy.macroMapObj.texId, materialEditorMapThumbnailSize, nil, nil) then
editor_fileDialog.openFile(
im.PushID1("mat_properties_image_button_detail")
if im.ImageButton("##imageButton4", terrainMtlCopyProxy.detailMapObj.texId, materialEditorMapThumbnailSize, nil, nil) then
editor_fileDialog.openFile(
im.PushID1("mat_properties_image_button_normal")
if im.ImageButton("##imageButton5", terrainMtlCopyProxy.normalMapObj.texId, materialEditorMapThumbnailSize, nil, nil) then
editor_fileDialog.openFile(
@/lua/ge/extensions/trackbuilder/trackBuilder.lua
im.TextColored(style.textColor,translateLanguage("ui.trackBuilder.matEditor.base", 'Base'))
if im.ImageButton("##imageButton1", materialSettings.base.texId, im.ImVec2(64,64), im.ImVec2Zero, im.ImVec2One, im.ImColorByRGB(0,0,0,0).Value, im.ImColorByRGB(255,255,255,255).Value) then end
dragDropTarget('base')
im.TextColored(style.textColor,translateLanguage("ui.trackBuilder.matEditor.center", "Center"))
if im.ImageButton("##imageButton2", materialSettings.center.texId, im.ImVec2(64,64), im.ImVec2Zero, im.ImVec2One, im.ImColorByRGB(255,0,0,0).Value, im.ImColorByRGB(255,255,255,255).Value) then end
dragDropTarget('center')
im.TextColored(style.textColor,translateLanguage("ui.trackBuilder.matEditor.border", "Border"))
if im.ImageButton("##imageButton3", materialSettings.border.texId, im.ImVec2(64,64), im.ImVec2Zero, im.ImVec2One, im.ImColorByRGB(0,0,0,0).Value, im.ImColorByRGB(255,255,255,255).Value) then end
dragDropTarget('border')
for name, set in pairs(materialSettings.textureSets) do
if im.ImageButton("##imageButton4", set.tex.texId, im.ImVec2(64,64), im.ImVec2Zero, im.ImVec2One, im.ImColorByRGB(0,0,0,255).Value, im.ImColorByRGB(255,255,255,255).Value) then print("Image") end
dragDropSourceTextureSet(name, set)
for name, glowMap in pairs(materialSettings.glowMaps) do
if im.ImageButton("##imageButton5", glowMap.tex.texId, im.ImVec2(64,64), im.ImVec2Zero, im.ImVec2One, im.ImColorByRGB(0,0,0,255).Value, im.ImColorByRGB(255,255,255,255).Value) then print("Image") end
dragDropSourceGlowMap(name, glowMap)
@/lua/ge/extensions/editor/roadEditor.lua
im.PushID1(string.format('template_%d', i))
if im.ImageButton(editor_roadUtils.getMaterials()[i].texId, im.ImVec2(128, 128), im.ImVec2Zero, im.ImVec2One, 1, im.ImColorByRGB(0,0,0,255).Value, im.ImColorByRGB(255,255,255,255).Value) then
templateDialogOpen[0] = false
if matIndex then
if im.ImageButton(editor_roadUtils.getMaterials()[matIndex].texId, im.ImVec2(128, 128), im.ImVec2Zero, im.ImVec2One, 1, im.ImColorByRGB(0,0,0,255).Value, im.ImColorByRGB(255,255,255,255).Value) then
templateDialogOpen[0] = true
@/lua/ge/extensions/editor/dynamicDecals/brushes.lua
im.PushID1("Brush_" .. tostring(k))
if im.ImageButton("##TabGuiButton", editor.getTempTextureObj(brush.decalColorTexturePath).texId, im.ImVec2(thumbnailSize, thumbnailSize), im.ImVec2Zero, im.ImVec2One, nil, (editor.selection["dynamicDecalBrush"] and editor.selection["dynamicDecalBrush"].id == k) and editor.color.beamng.Value or nil) then
selectBrush(k, brush)
@/lua/ge/extensions/editor/forestEditor.lua
local img = editor.getTempTextureObj(imgPath)
if im.ImageButton(string.format("TextureSetImageButton_%d", id), img.texId, im.ImVec2(imgSize, imgSize)) then
editor_fileDialog.openFile(
@/lua/ge/extensions/editor/api/valueInspector.lua
if not (texture.texId == nil) then
if imgui.ImageButton(
"##DisplayMaterialButton",
@/lua/ge/extensions/editor/materialEditor.lua
im.PushID1(property .. tostring(layer))
if im.ImageButton(
"##imageButton1",
im.PushID1("cubeFace" .. tostring(index))
if im.ImageButton(
"##imageButton2",