- 3
- 1
imgui.InputTextMultiline не сохраняет запись.
Код:
if tip_open_shpora.v == true then
imgui.BeginChild("##Information44", imgui.ImVec2(1185, 520), true, imgui.WindowFlags.NoScrollbar)
imgui.InputTextMultiline("##textShpora17", shpora_text, imgui.ImVec2(-1, 500))
imgui.EndChild()
if imgui.MainButton(u8"Сохранить", imgui.ImVec2(395, 20)) then
refresh_text = shpora_text.v:gsub("\n", "~")
table.insert(configuration.Binds_Name, getpos, binder_name.v)
table.remove(configuration.Binds_Name, getpos + 1)
table.insert(configuration.Binds_Info, getpos, refresh_text)
table.remove(configuration.Binds_Info, getpos + 1)
inicfg.save(configuration, 'Army_Config.ini')
tip_open_shpora.v = false
end
imgui.SameLine()
if imgui.MainButton(u8"Удалить", imgui.ImVec2(395, 20)) then
table.remove(configuration.Binds_Name, getpos)
table.remove(configuration.Binds_Info, getpos)
inicfg.save(configuration, 'Army_Config.ini')
tip_open_shpora.v = false
big_open_shpora.v = false
open_shpora.v = false
end
imgui.SameLine()
if imgui.MainButton(u8"Включить просмотр", imgui.ImVec2(380, 20)) then
tip_open_shpora.v = false
end
if imgui.MainButton(u8"Закрыть", imgui.ImVec2(1185, 20)) then
tip_open_shpora.v = false
big_open_shpora.v = false
end
end
Код:
if tip_open_shpora.v == true then
imgui.BeginChild("##Information44", imgui.ImVec2(1185, 520), true, imgui.WindowFlags.NoScrollbar)
imgui.InputTextMultiline("##textShpora17", shpora_text, imgui.ImVec2(-1, 500))
imgui.EndChild()
if imgui.MainButton(u8"Сохранить", imgui.ImVec2(395, 20)) then
refresh_text = shpora_text.v:gsub("\n", "~")
table.insert(configuration.Binds_Name, getpos, binder_name.v)
table.remove(configuration.Binds_Name, getpos + 1)
table.insert(configuration.Binds_Info, getpos, refresh_text)
table.remove(configuration.Binds_Info, getpos + 1)
inicfg.save(configuration, 'Army_Config.ini')
tip_open_shpora.v = false
end
imgui.SameLine()
if imgui.MainButton(u8"Удалить", imgui.ImVec2(395, 20)) then
table.remove(configuration.Binds_Name, getpos)
table.remove(configuration.Binds_Info, getpos)
inicfg.save(configuration, 'Army_Config.ini')
tip_open_shpora.v = false
big_open_shpora.v = false
open_shpora.v = false
end
imgui.SameLine()
if imgui.MainButton(u8"Включить просмотр", imgui.ImVec2(380, 20)) then
tip_open_shpora.v = false
end
if imgui.MainButton(u8"Закрыть", imgui.ImVec2(1185, 20)) then
tip_open_shpora.v = false
big_open_shpora.v = false
end
end