SetDragDropPayload
Definition
-- @/lua/common/extensions/ui/imgui_custom_luaintf.lua:186
function M.SetDragDropPayload(string_type, void_data, size_t_sz, ImGuiCond_cond)
if ImGuiCond_cond == nil then ImGuiCond_cond = 0 end
if string_type == nil then log("E", "", "Parameter 'string_type' of function 'SetDragDropPayload' cannot be nil, as the c type is 'const char *'") ; return end
if void_data == nil then log("E", "", "Parameter 'void_data' of function 'SetDragDropPayload' cannot be nil, as the c type is 'const char *'") ; return end
return imgui.SetDragDropPayload(string_type, void_data, size_t_sz, ImGuiCond_cond)
end
Callers
@/lua/ge/extensions/trackbuilder/trackBuilder.lua
if not materialSettings.dragDropImage then materialSettings.dragDropImage = editor.texObj(texture.path) end
im.SetDragDropPayload("TrackBuilderMaterialPayload", materialSettings.dragDropData, im.ArraySize(materialSettings.dragDropData), im.Cond_Once );
im.Image(materialSettings.dragDropImage.texId, im.ImVec2(50, 50), im.ImVec2Zero, im.ImVec2One, im.ImColorByRGB(255,255,255,255).Value, im.ImColorByRGB(255,255,255,255).Value)
if not materialSettings.dragDropImage then materialSettings.dragDropImage = set.tex end
im.SetDragDropPayload("TrackBuilderTextureSetPayload", materialSettings.dragDropData, im.ArraySize(materialSettings.dragDropData), im.Cond_Once );
im.Image(materialSettings.dragDropImage.texId, im.ImVec2(50, 50), im.ImVec2Zero, im.ImVec2One, im.ImColorByRGB(255,255,255,255).Value, im.ImColorByRGB(255,255,255,255).Value)
if not materialSettings.dragDropImage then materialSettings.dragDropImage = glowMap.tex end
im.SetDragDropPayload("TrackBuilderGlowMapPayload", materialSettings.dragDropData, im.ArraySize(materialSettings.dragDropData), im.Cond_Once );
im.Image(materialSettings.dragDropImage.texId, im.ImVec2(50, 50), im.ImVec2Zero, im.ImVec2One, im.ImColorByRGB(255,255,255,255).Value, im.ImColorByRGB(255,255,255,255).Value)
@/lua/ge/extensions/editor/assetBrowser.lua
local data = im.ArrayChar(2048, editor.assetDragDrop.data.path)
im.SetDragDropPayload("ASSETDRAGDROP", data, im.ArraySize(data), im.Cond_Once)
if (asset.type == 'image' or asset.type == 'mesh') and editor.assetDragDrop.dragImage and editor.assetDragDrop.dragImage.tex then
@/lua/ge/extensions/flowgraph/manager.lua
end
im.SetDragDropPayload(payloadType, self.dragDropData.name, im.ArraySize(self.dragDropData.name), im.Cond_Once)
@/lua/ge/extensions/editor/api/assets.lua
if callback and not dragDropAsset.callback then dragDropAsset.callback = callback end
imgui.SetDragDropPayload(dragDropId, dragDropAsset.data, im.ArraySize(dragDropAsset.data), imgui.Cond_Once);
imgui.Text(data)
@/lua/ge/extensions/editor/dynamicDecals/textures.lua
local payload = im.ArrayChar(256, filePath)
im.SetDragDropPayload("DynDecalTextureDrapDrop", payload, im.ArraySize(payload))
im.TextUnformatted(filePath)
@/lua/ge/extensions/editor/dynamicDecals/layerStack.lua
ffi.copy(payload, jsonEncode({from = k, fromParentUid = parentUid}), ffi.sizeof(payloadSize))
im.SetDragDropPayload(layerDragDropType, payload, ffi.sizeof(payloadSize))
im.TextUnformatted(layer.name)
@/lua/common/extensions/ui/imgui_custom_luaintf.lua
if void_data == nil then log("E", "", "Parameter 'void_data' of function 'SetDragDropPayload' cannot be nil, as the c type is 'const char *'") ; return end
return imgui.SetDragDropPayload(string_type, void_data, size_t_sz, ImGuiCond_cond)
end