- 337
- 51
- Версия MoonLoader
- Другое
Возникла такая проблема, я парсил imgui InputText с нужными значениями ini, и когда попытался парсить к нему текст, то происходит вот что (на скринах). Как можно это исправить? Должно быть 20 InputText, а из за перса получается 200 вроде
Код:
Код:
Lua:
local channel = setmetatable({"channel1", "channel2", "channel3", "channel4", "channel5", "channel6", "channel7", "channel8", "channel9", "channel10", "channel11", "channel12", "channel13", "channel14", "channel15", "channel16", "channel17", "channel18", "channel19", "channel20"},
{
__index = function(self, key)
if not ini.radio[key] then
ini.radio[key] = ""
end
self[key] = imgui.new.char[256](u8(ini.radio[key]))
return self[key]
end
})
for idx, value in ipairs(channel) do
for channels = 1, 20 do
imgui.Text(u8('Канал связи №'..channels))
if imgui.InputText("##channelDepartamemt" .. idx, channel[value], 255) then
ini.radio[value] = u8:decode(ffi.string(channel[value]))
inicfg.save(ini, "Test.ini")
end
end
imgui.NewLine()
end