Помогите реализовать скрипт

boy next door

Участник
Автор темы
219
18
Версия MoonLoader
.026-beta
Привет.
Я сделал строки с чекбоксами, чтобы они делали действия, которые будут введены в сами строки.
Если чекбокс около их включен, то это действие будет отправляться.
Например:
Строка 1 '/s hi' = включена (Текст отправляется).
Строка 2-11 = выключены (Текст не отправляется).
Строка 12 '/me начал заниматься мастурбацией'= включена (Текст отправляется).
И т.д

1718998893037.png
Code:
Lua:
require('lib.moonloader')
local event = require 'lib.samp.events'
local vkeys = require 'vkeys'

local imgui = require 'mimgui'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local new = imgui.new
local ffi = require 'ffi'
local str, sizeof = ffi.string, ffi.sizeof

local a1 = imgui.new.char[256]()
local a2 = imgui.new.char[256]()
local a3 = imgui.new.char[256]()
local a4 = imgui.new.char[256]()
local a5 = imgui.new.char[256]()
local a6 = imgui.new.char[256]()
local a7 = imgui.new.char[256]()
local a8 = imgui.new.char[256]()
local a9 = imgui.new.char[256]()
local a10 = imgui.new.char[256]()
local a11 = imgui.new.char[256]()
local a12 = imgui.new.char[256]()
local a13 = imgui.new.char[256]()
local a14 = imgui.new.char[256]()
local a15 = imgui.new.char[256]()
local a16 = imgui.new.char[256]()
local a17 = imgui.new.char[256]()
local a18 = imgui.new.char[256]()
local a19 = imgui.new.char[256]()
local a20 = imgui.new.char[256]()
local a21 = imgui.new.char[256]()
local a22 = imgui.new.char[256]()
local a23 = imgui.new.char[256]()
local a24 = imgui.new.char[256]()
local a25 = imgui.new.char[256]()
local a26 = imgui.new.char[256]()
local a27 = imgui.new.char[256]()

 --boxes

local ab1 = new.bool()
local ab2 = new.bool()
local ab3 = new.bool()
local ab4 = new.bool()
local ab5 = new.bool()
local ab6 = new.bool()
local ab7 = new.bool()
local ab8 = new.bool()
local ab9 = new.bool()
local ab10 = new.bool()
local ab11 = new.bool()
local ab12 = new.bool()
local ab13 = new.bool()
local ab14 = new.bool()
local ab15 = new.bool()
local ab16 = new.bool()
local ab17 = new.bool()
local ab18 = new.bool()
local ab19 = new.bool()
local ab20 = new.bool()
local ab21 = new.bool()
local ab22 = new.bool()
local ab23 = new.bool()
local ab24 = new.bool()
local ab25 = new.bool()
local ab26 = new.bool()
local ab27 = new.bool()

--boxes

local WinState = imgui.new.bool()

imgui.OnFrame(function() return WinState[0] end, function(player)
    imgui.SetNextWindowPos(imgui.ImVec2(500, 500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.SetNextWindowSize(imgui.ImVec2(500, 755), imgui.Cond.Always)
    imgui.Begin(u8'Universal Punisher', WinState, imgui.WindowFlags.NoResize)
    imgui.CenterText(u8'Универсальная выдача наказаний')
    imgui.InputText(u8'##1', a1, sizeof(a1)) imgui.SameLine() imgui.Checkbox(u8'##b1', ab1)
    imgui.InputText(u8'##2', a2, sizeof(a2)) imgui.SameLine() imgui.Checkbox(u8'##b2', ab2)
    imgui.InputText(u8'##3', a3, sizeof(a3)) imgui.SameLine() imgui.Checkbox(u8'##b3', ab3)
    imgui.Separator()
    imgui.InputText(u8'##4', a4, sizeof(a4)) imgui.SameLine() imgui.Checkbox(u8'##b4', ab4)
    imgui.InputText(u8'##5', a5, sizeof(a5)) imgui.SameLine() imgui.Checkbox(u8'##b5', ab5)
    imgui.InputText(u8'##6', a6, sizeof(a6)) imgui.SameLine() imgui.Checkbox(u8'##b6', ab6)
    imgui.Separator()
    imgui.InputText(u8'##7', a7, sizeof(a7)) imgui.SameLine() imgui.Checkbox(u8'##b7', ab7)
    imgui.InputText(u8'##8', a8, sizeof(a8)) imgui.SameLine() imgui.Checkbox(u8'##b8', ab8)
    imgui.InputText(u8'##9', a9, sizeof(a9)) imgui.SameLine() imgui.Checkbox(u8'##b9', ab9)
    imgui.Separator()
    imgui.InputText(u8'##10', a10, sizeof(a10)) imgui.SameLine() imgui.Checkbox(u8'##b10', ab10)
    imgui.InputText(u8'##11', a11, sizeof(a11)) imgui.SameLine() imgui.Checkbox(u8'##b11', ab11)
    imgui.InputText(u8'##12', a12, sizeof(a12)) imgui.SameLine() imgui.Checkbox(u8'##b12', ab12)
    imgui.Separator()
    imgui.InputText(u8'##13', a13, sizeof(a13)) imgui.SameLine() imgui.Checkbox(u8'##b13', ab13)
    imgui.InputText(u8'##14', a14, sizeof(a14)) imgui.SameLine() imgui.Checkbox(u8'##b14', ab14)
    imgui.InputText(u8'##15', a15, sizeof(a15)) imgui.SameLine() imgui.Checkbox(u8'##b15', ab15)
    imgui.Separator()
    imgui.InputText(u8'##16', a16, sizeof(a16)) imgui.SameLine() imgui.Checkbox(u8'##b16', ab16)
    imgui.InputText(u8'##17', a17, sizeof(a17)) imgui.SameLine() imgui.Checkbox(u8'##b17', ab17)
    imgui.InputText(u8'##18', a18, sizeof(a18)) imgui.SameLine() imgui.Checkbox(u8'##b18', ab18)
    imgui.Separator()
    imgui.InputText(u8'##19', a19, sizeof(a19)) imgui.SameLine() imgui.Checkbox(u8'##b19', ab19)
    imgui.InputText(u8'##20', a20, sizeof(a20)) imgui.SameLine() imgui.Checkbox(u8'##b20', ab20)
    imgui.InputText(u8'##21', a21, sizeof(a21)) imgui.SameLine() imgui.Checkbox(u8'##b21', ab21)
    imgui.Separator()
    imgui.InputText(u8'##22', a22, sizeof(a22)) imgui.SameLine() imgui.Checkbox(u8'##b22', ab22)
    imgui.InputText(u8'##23', a23, sizeof(a23)) imgui.SameLine() imgui.Checkbox(u8'##b23', ab23)
    imgui.InputText(u8'##24', a24, sizeof(a24)) imgui.SameLine() imgui.Checkbox(u8'##b24', ab24)
    imgui.Separator()
    imgui.InputText(u8'##25', a25, sizeof(a25)) imgui.SameLine() imgui.Checkbox(u8'##b25', ab25)
    imgui.InputText(u8'##26', a26, sizeof(a26)) imgui.SameLine() imgui.Checkbox(u8'##b26', ab26)
    imgui.InputText(u8'##27', a27, sizeof(a27)) imgui.SameLine() imgui.Checkbox(u8'##b27', ab27)
    imgui.Separator()
    if imgui.Button(u8'Начать выдачу', imgui.ImVec2(500, 30)) then
        --хз как прописать функции, которые считывают инфу с чекбокса. Если он включен, то отправляеться текст из InputText
    end
    imgui.End()
end)

function main()
    sampRegisterChatCommand('pun', function() WinState[0] = not WinState[0] end)
    wait(-1)
end

function imgui.TextQuestion(text)
    imgui.SameLine()
    imgui.TextDisabled(u8'(?)')
    if imgui.IsItemHovered() then
        imgui.BeginTooltip()
        imgui.PushTextWrapPos(450)
        imgui.TextUnformatted(text)
        imgui.PopTextWrapPos()
        imgui.EndTooltip()
    end
end

function imgui.CenterText(text)
    imgui.SetCursorPosX(imgui.GetWindowSize().x / 2 - imgui.CalcTextSize(text).x / 2)
    imgui.Text(text)
end


imgui.OnInitialize(function()
    local ImVec4 = imgui.ImVec4
    local ImVec2 = imgui.ImVec2
    local style = imgui.GetStyle();
    local colors = style.Colors;
    imgui.SwitchContext()
    style.Alpha = 1;
    style.WindowPadding = ImVec2(8.00, 8.00);
    style.WindowRounding = 7;
    style.WindowBorderSize = 0;
    style.WindowMinSize = ImVec2(32.00, 32.00);
    style.WindowTitleAlign = ImVec2(0.50, 0.50);
    style.ChildRounding = 0;
    style.ChildBorderSize = 1;
    style.PopupRounding = 0;
    style.PopupBorderSize = 1;
    style.FramePadding = ImVec2(6.00, 2.00);
    style.FrameRounding = 0;
    style.FrameBorderSize = 0;
    style.ItemSpacing = ImVec2(14.00, 5.00);
    style.ItemInnerSpacing = ImVec2(10.00, 4.00);
    style.IndentSpacing = 20;
    style.ScrollbarSize = 13;
    style.ScrollbarRounding = 9;
    style.GrabMinSize = 11;
    style.GrabRounding = 12;
    style.TabRounding = 4;
    style.ButtonTextAlign = ImVec2(0.50, 0.50);
    style.SelectableTextAlign = ImVec2(0.00, 0.00);
    colors[imgui.Col.Text]                   = ImVec4(0.95, 0.96, 0.98, 1.00);
    colors[imgui.Col.TextDisabled]           = ImVec4(0.29, 0.29, 0.29, 1.00);
    colors[imgui.Col.WindowBg]               = ImVec4(0.14, 0.14, 0.14, 1.00);
    colors[imgui.Col.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94);
    colors[imgui.Col.Border]                 = ImVec4(0.14, 0.14, 0.14, 1.00);
    colors[imgui.Col.BorderShadow]           = ImVec4(1.00, 1.00, 1.00, 0.10);
    colors[imgui.Col.FrameBg]                = ImVec4(0.22, 0.22, 0.22, 1.00);
    colors[imgui.Col.FrameBgHovered]         = ImVec4(0.18, 0.18, 0.18, 1.00);
    colors[imgui.Col.FrameBgActive]          = ImVec4(0.09, 0.12, 0.14, 1.00);
    colors[imgui.Col.TitleBg]                = ImVec4(0.14, 0.14, 0.14, 0.81);
    colors[imgui.Col.TitleBgActive]          = ImVec4(0.14, 0.14, 0.14, 1.00);
    colors[imgui.Col.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51);
    colors[imgui.Col.MenuBarBg]              = ImVec4(0.20, 0.20, 0.20, 1.00);
    colors[imgui.Col.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.39);
    colors[imgui.Col.ScrollbarGrab]          = ImVec4(0.36, 0.36, 0.36, 1.00);
    colors[imgui.Col.ScrollbarGrabHovered]   = ImVec4(0.18, 0.22, 0.25, 1.00);
    colors[imgui.Col.ScrollbarGrabActive]    = ImVec4(0.24, 0.24, 0.24, 1.00);
    colors[imgui.Col.CheckMark]              = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.SliderGrab]             = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.SliderGrabActive]       = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.Button]                 = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.ButtonHovered]          = ImVec4(1.00, 0.39, 0.39, 1.00);
    colors[imgui.Col.ButtonActive]           = ImVec4(1.00, 0.21, 0.21, 1.00);
    colors[imgui.Col.Header]                 = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.HeaderHovered]          = ImVec4(1.00, 0.39, 0.39, 1.00);
    colors[imgui.Col.HeaderActive]           = ImVec4(1.00, 0.21, 0.21, 1.00);
    colors[imgui.Col.ResizeGrip]             = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.ResizeGripHovered]      = ImVec4(1.00, 0.39, 0.39, 1.00);
    colors[imgui.Col.ResizeGripActive]       = ImVec4(1.00, 0.19, 0.19, 1.00);
end)

Ап.
 
Последнее редактирование:

ChаtGPT

Активный
396
96
Lua:
local event = require 'samp.events'
local vkeys = require 'vkeys'
local imgui = require 'mimgui'
local ffi = require 'ffi'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local new = imgui.new
local WinState = imgui.new.bool(true)

local inputTexts = {}
local checkboxes = {}

imgui.OnFrame(function() return WinState[0] end, function(player)
    imgui.SetNextWindowPos(imgui.ImVec2(500, 500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.SetNextWindowSize(imgui.ImVec2(500, 755), imgui.Cond.Always)
    imgui.Begin(u8'Universal Punisher', WinState, imgui.WindowFlags.NoResize)
        imgui.CenterText(u8'Универсальная выдача наказаний')
        for i = 1, 27 do
            if inputTexts[i] == nil or checkboxes[i] == nil then xz(i) end

            imgui.InputText(u8'##input'..i, inputTexts[i], 256)
            imgui.SameLine()
            imgui.Checkbox(u8'##check'..i, checkboxes[i])

             -- Добавляем разделитель после каждых трёх инпутов
            if i % 3 == 0 then
                imgui.Separator()
            end
        end

        if imgui.Button(u8'Начать выдачу', imgui.ImVec2(500, 30)) then
            for j = 1, 27 do
                if checkboxes[j] then
                    local text = ffi.string(inputTexts[j])
                    if #text > 0 then --если в инпуты что-то записано, чтобы не оправило пустую строку
                        sampSendChat(text)
                    end
                end
            end
        end
    imgui.End()
end)

function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('pun', function() WinState[0] = not WinState[0] end)
    wait(-1)
end

function xz(i)
    inputTexts[i] = new.char[256]()
    checkboxes[i] = new.bool()
end


function imgui.TextQuestion(text)
    imgui.SameLine()
    imgui.TextDisabled(u8'(?)')
    if imgui.IsItemHovered() then
        imgui.BeginTooltip()
        imgui.PushTextWrapPos(450)
        imgui.TextUnformatted(text)
        imgui.PopTextWrapPos()
        imgui.EndTooltip()
    end
end

function imgui.CenterText(text)
    imgui.SetCursorPosX(imgui.GetWindowSize().x / 2 - imgui.CalcTextSize(text).x / 2)
    imgui.Text(text)
end


imgui.OnInitialize(function()
    local ImVec4 = imgui.ImVec4
    local ImVec2 = imgui.ImVec2
    local style = imgui.GetStyle();
    local colors = style.Colors;
    imgui.SwitchContext()
    style.Alpha = 1;
    style.WindowPadding = ImVec2(8.00, 8.00);
    style.WindowRounding = 7;
    style.WindowBorderSize = 0;
    style.WindowMinSize = ImVec2(32.00, 32.00);
    style.WindowTitleAlign = ImVec2(0.50, 0.50);
    style.ChildRounding = 0;
    style.ChildBorderSize = 1;
    style.PopupRounding = 0;
    style.PopupBorderSize = 1;
    style.FramePadding = ImVec2(6.00, 2.00);
    style.FrameRounding = 0;
    style.FrameBorderSize = 0;
    style.ItemSpacing = ImVec2(14.00, 5.00);
    style.ItemInnerSpacing = ImVec2(10.00, 4.00);
    style.IndentSpacing = 20;
    style.ScrollbarSize = 13;
    style.ScrollbarRounding = 9;
    style.GrabMinSize = 11;
    style.GrabRounding = 12;
    style.TabRounding = 4;
    style.ButtonTextAlign = ImVec2(0.50, 0.50);
    style.SelectableTextAlign = ImVec2(0.00, 0.00);
    colors[imgui.Col.Text]                   = ImVec4(0.95, 0.96, 0.98, 1.00);
    colors[imgui.Col.TextDisabled]           = ImVec4(0.29, 0.29, 0.29, 1.00);
    colors[imgui.Col.WindowBg]               = ImVec4(0.14, 0.14, 0.14, 1.00);
    colors[imgui.Col.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94);
    colors[imgui.Col.Border]                 = ImVec4(0.14, 0.14, 0.14, 1.00);
    colors[imgui.Col.BorderShadow]           = ImVec4(1.00, 1.00, 1.00, 0.10);
    colors[imgui.Col.FrameBg]                = ImVec4(0.22, 0.22, 0.22, 1.00);
    colors[imgui.Col.FrameBgHovered]         = ImVec4(0.18, 0.18, 0.18, 1.00);
    colors[imgui.Col.FrameBgActive]          = ImVec4(0.09, 0.12, 0.14, 1.00);
    colors[imgui.Col.TitleBg]                = ImVec4(0.14, 0.14, 0.14, 0.81);
    colors[imgui.Col.TitleBgActive]          = ImVec4(0.14, 0.14, 0.14, 1.00);
    colors[imgui.Col.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51);
    colors[imgui.Col.MenuBarBg]              = ImVec4(0.20, 0.20, 0.20, 1.00);
    colors[imgui.Col.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.39);
    colors[imgui.Col.ScrollbarGrab]          = ImVec4(0.36, 0.36, 0.36, 1.00);
    colors[imgui.Col.ScrollbarGrabHovered]   = ImVec4(0.18, 0.22, 0.25, 1.00);
    colors[imgui.Col.ScrollbarGrabActive]    = ImVec4(0.24, 0.24, 0.24, 1.00);
    colors[imgui.Col.CheckMark]              = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.SliderGrab]             = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.SliderGrabActive]       = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.Button]                 = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.ButtonHovered]          = ImVec4(1.00, 0.39, 0.39, 1.00);
    colors[imgui.Col.ButtonActive]           = ImVec4(1.00, 0.21, 0.21, 1.00);
    colors[imgui.Col.Header]                 = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.HeaderHovered]          = ImVec4(1.00, 0.39, 0.39, 1.00);
    colors[imgui.Col.HeaderActive]           = ImVec4(1.00, 0.21, 0.21, 1.00);
    colors[imgui.Col.ResizeGrip]             = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.ResizeGripHovered]      = ImVec4(1.00, 0.39, 0.39, 1.00);
    colors[imgui.Col.ResizeGripActive]       = ImVec4(1.00, 0.19, 0.19, 1.00);
end)
 
  • Нравится
Реакции: MLycoris

boy next door

Участник
Автор темы
219
18
Lua:
local event = require 'samp.events'
local vkeys = require 'vkeys'
local imgui = require 'mimgui'
local ffi = require 'ffi'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local new = imgui.new
local WinState = imgui.new.bool(true)

local inputTexts = {}
local checkboxes = {}

imgui.OnFrame(function() return WinState[0] end, function(player)
    imgui.SetNextWindowPos(imgui.ImVec2(500, 500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.SetNextWindowSize(imgui.ImVec2(500, 755), imgui.Cond.Always)
    imgui.Begin(u8'Universal Punisher', WinState, imgui.WindowFlags.NoResize)
        imgui.CenterText(u8'Универсальная выдача наказаний')
        for i = 1, 27 do
            if inputTexts[i] == nil or checkboxes[i] == nil then xz(i) end

            imgui.InputText(u8'##input'..i, inputTexts[i], 256)
            imgui.SameLine()
            imgui.Checkbox(u8'##check'..i, checkboxes[i])

             -- Добавляем разделитель после каждых трёх инпутов
            if i % 3 == 0 then
                imgui.Separator()
            end
        end

        if imgui.Button(u8'Начать выдачу', imgui.ImVec2(500, 30)) then
            for j = 1, 27 do
                if checkboxes[j] then
                    local text = ffi.string(inputTexts[j])
                    if #text > 0 then --если в инпуты что-то записано, чтобы не оправило пустую строку
                        sampSendChat(text)
                    end
                end
            end
        end
    imgui.End()
end)

function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('pun', function() WinState[0] = not WinState[0] end)
    wait(-1)
end

function xz(i)
    inputTexts[i] = new.char[256]()
    checkboxes[i] = new.bool()
end


function imgui.TextQuestion(text)
    imgui.SameLine()
    imgui.TextDisabled(u8'(?)')
    if imgui.IsItemHovered() then
        imgui.BeginTooltip()
        imgui.PushTextWrapPos(450)
        imgui.TextUnformatted(text)
        imgui.PopTextWrapPos()
        imgui.EndTooltip()
    end
end

function imgui.CenterText(text)
    imgui.SetCursorPosX(imgui.GetWindowSize().x / 2 - imgui.CalcTextSize(text).x / 2)
    imgui.Text(text)
end


imgui.OnInitialize(function()
    local ImVec4 = imgui.ImVec4
    local ImVec2 = imgui.ImVec2
    local style = imgui.GetStyle();
    local colors = style.Colors;
    imgui.SwitchContext()
    style.Alpha = 1;
    style.WindowPadding = ImVec2(8.00, 8.00);
    style.WindowRounding = 7;
    style.WindowBorderSize = 0;
    style.WindowMinSize = ImVec2(32.00, 32.00);
    style.WindowTitleAlign = ImVec2(0.50, 0.50);
    style.ChildRounding = 0;
    style.ChildBorderSize = 1;
    style.PopupRounding = 0;
    style.PopupBorderSize = 1;
    style.FramePadding = ImVec2(6.00, 2.00);
    style.FrameRounding = 0;
    style.FrameBorderSize = 0;
    style.ItemSpacing = ImVec2(14.00, 5.00);
    style.ItemInnerSpacing = ImVec2(10.00, 4.00);
    style.IndentSpacing = 20;
    style.ScrollbarSize = 13;
    style.ScrollbarRounding = 9;
    style.GrabMinSize = 11;
    style.GrabRounding = 12;
    style.TabRounding = 4;
    style.ButtonTextAlign = ImVec2(0.50, 0.50);
    style.SelectableTextAlign = ImVec2(0.00, 0.00);
    colors[imgui.Col.Text]                   = ImVec4(0.95, 0.96, 0.98, 1.00);
    colors[imgui.Col.TextDisabled]           = ImVec4(0.29, 0.29, 0.29, 1.00);
    colors[imgui.Col.WindowBg]               = ImVec4(0.14, 0.14, 0.14, 1.00);
    colors[imgui.Col.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94);
    colors[imgui.Col.Border]                 = ImVec4(0.14, 0.14, 0.14, 1.00);
    colors[imgui.Col.BorderShadow]           = ImVec4(1.00, 1.00, 1.00, 0.10);
    colors[imgui.Col.FrameBg]                = ImVec4(0.22, 0.22, 0.22, 1.00);
    colors[imgui.Col.FrameBgHovered]         = ImVec4(0.18, 0.18, 0.18, 1.00);
    colors[imgui.Col.FrameBgActive]          = ImVec4(0.09, 0.12, 0.14, 1.00);
    colors[imgui.Col.TitleBg]                = ImVec4(0.14, 0.14, 0.14, 0.81);
    colors[imgui.Col.TitleBgActive]          = ImVec4(0.14, 0.14, 0.14, 1.00);
    colors[imgui.Col.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51);
    colors[imgui.Col.MenuBarBg]              = ImVec4(0.20, 0.20, 0.20, 1.00);
    colors[imgui.Col.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.39);
    colors[imgui.Col.ScrollbarGrab]          = ImVec4(0.36, 0.36, 0.36, 1.00);
    colors[imgui.Col.ScrollbarGrabHovered]   = ImVec4(0.18, 0.22, 0.25, 1.00);
    colors[imgui.Col.ScrollbarGrabActive]    = ImVec4(0.24, 0.24, 0.24, 1.00);
    colors[imgui.Col.CheckMark]              = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.SliderGrab]             = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.SliderGrabActive]       = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.Button]                 = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.ButtonHovered]          = ImVec4(1.00, 0.39, 0.39, 1.00);
    colors[imgui.Col.ButtonActive]           = ImVec4(1.00, 0.21, 0.21, 1.00);
    colors[imgui.Col.Header]                 = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.HeaderHovered]          = ImVec4(1.00, 0.39, 0.39, 1.00);
    colors[imgui.Col.HeaderActive]           = ImVec4(1.00, 0.21, 0.21, 1.00);
    colors[imgui.Col.ResizeGrip]             = ImVec4(1.00, 0.28, 0.28, 1.00);
    colors[imgui.Col.ResizeGripHovered]      = ImVec4(1.00, 0.39, 0.39, 1.00);
    colors[imgui.Col.ResizeGripActive]       = ImVec4(1.00, 0.19, 0.19, 1.00);
end)
Как сделать так, чтобы оно выводило сообщения из инпута с кд 1 сек?