localimgui=require"cimgui"-- cimgui is the folder containing the Lua module (the "src" folder in the git repository)love.load=function()imgui.love.Init()-- or imgui.love.Init("RGBA32") or imgui.love.Init("Alpha8")endlove.draw=function()-- example windowimgui.ShowDemoWindow()-- code to render imguiimgui.Render()imgui.love.RenderDrawLists()endlove.update=function(dt)imgui.love.Update(dt)imgui.NewFrame()endlove.mousemoved=function(x,y,...)imgui.love.MouseMoved(x,y)ifnotimgui.love.GetWantCaptureMouse()then-- your code hereendendlove.mousepressed=function(x,y,button,...)imgui.love.MousePressed(button)ifnotimgui.love.GetWantCaptureMouse()then-- your code here endendlove.mousereleased=function(x,y,button,...)imgui.love.MouseReleased(button)ifnotimgui.love.GetWantCaptureMouse()then-- your code here endendlove.wheelmoved=function(x,y)imgui.love.WheelMoved(x,y)ifnotimgui.love.GetWantCaptureMouse()then-- your code here endendlove.keypressed=function(key,...)imgui.love.KeyPressed(key)ifnotimgui.love.GetWantCaptureKeyboard()then-- your code here endendlove.keyreleased=function(key,...)imgui.love.KeyReleased(key)ifnotimgui.love.GetWantCaptureKeyboard()then-- your code here endendlove.textinput=function(t)imgui.love.TextInput(t)ifimgui.love.GetWantCaptureKeyboard()then-- your code here endendlove.quit=function()returnimgui.love.Shutdown()end-- for gamepad support also add the following:love.joystickadded=function(joystick)imgui.love.JoystickAdded(joystick)-- your code here endlove.joystickremoved=function(joystick)imgui.love.JoystickRemoved()-- your code here endlove.gamepadpressed=function(joystick,button)imgui.love.GamepadPressed(button)-- your code here endlove.gamepadreleased=function(joystick,button)imgui.love.GamepadReleased(button)-- your code here end-- choose threshold for considering analog controllers active, defaults to 0 if unspecifiedlocalthreshold=0.2love.gamepadaxis=function(joystick,axis,value)imgui.love.GamepadAxis(axis,value,threshold)-- your code here end