SGG-Modding / Hell2Modding

Mod loader for Hades 2
MIT License
12 stars 2 forks source link

various Input widgets don't seem to work #13

Closed southpawgeek closed 2 months ago

southpawgeek commented 2 months ago

I tried copying directly from the docs to be sure, but none of them seem to be working:

Example text, selected = rom.ImGui.InputText("Label", text, 100) causes

[ERROR/lua_manager.cpp:283] ...Ship\ReturnOfModding\plugins\Jowday-BanManager/imgui.lua:99: sol: no matching function call takes this number of arguments and the specified types
stack traceback:
        [C]: in function 'InputText'

Same thing seems to happen with InputTextMultiline, InputTextWithHint, and others.

xiaoxiao921 commented 2 months ago
local my_text = ""

rom.gui.add_imgui(function()
   if rom.ImGui.Begin("My Custom Window") then
        my_text, is_text_changed = rom.ImGui.InputText("some label", my_text, 100)
        if is_text_changed then
            print("text changed")
        end
   end
   rom.ImGui.End()
end)