[LUA] Не хочет работать скрипт

arc warden

Участник
Автор темы
139
21
123:
function main()
    sampRegisterChatCommand('ezsbiv', function() WinState[0] = not WinState[0] end)
    while true do
        wait(0)
        if isKeyJustPressed(keys.VK_H) then
            clearCharTasksImmediately(PLAYER_PED) freezeCharPosition(PLAYER_PED, false) setPlayerControl(player, true)
        end
    end
end

function sbiv()
    while true do
        wait(0)
        if isKeyJustPressed(keys.VK_Q) then
            sampSendChat(text)
            wait(1000)
        end
    end
end

1 функция работает(main) , 2 нет(sbiv)
 
  • Bug
Реакции: Пирожок

Oleg Sleash

Участник
69
97
1) Для использования функции wait вне main надо делать так:
Lua:
-- code...
lua_thread.create(function()
    while true do
        wait(0)
        -- code...
    end
end)
-- code...
А во вторых ,как я понял функция sbiv вызывается через "галочку" (чекбокс) в имгуй-меню, и если вы запустите бесконечный цикл, то он не отключится, лучше использовать так:
Lua:
function main()
    textOnQ = false
    sampRegisterChatCommand('ezsbiv', function() WinState[0] = not WinState[0] end)
    while true do
        wait(0)
        if isKeyJustPressed(keys.VK_H) then
            clearCharTasksImmediately(PLAYER_PED) freezeCharPosition(PLAYER_PED, false) setPlayerControl(player, true)
        end
        if isKeyJustPressed(keys.VK_Q) and textOnQ then
            sampSendChat(text)
            wait(1000)
        end
    end
end

function sbiv()
   textOnQ = not textOnQ
end
 

arc warden

Участник
Автор темы
139
21
1) Для использования функции wait вне main надо делать так:
Lua:
-- code...
lua_thread.create(function()
    while true do
        wait(0)
        -- code...
    end
end)
-- code...
А во вторых ,как я понял функция sbiv вызывается через "галочку" (чекбокс) в имгуй-меню, и если вы запустите бесконечный цикл, то он не отключится, лучше использовать так:
Lua:
function main()
    textOnQ = false
    sampRegisterChatCommand('ezsbiv', function() WinState[0] = not WinState[0] end)
    while true do
        wait(0)
        if isKeyJustPressed(keys.VK_H) then
            clearCharTasksImmediately(PLAYER_PED) freezeCharPosition(PLAYER_PED, false) setPlayerControl(player, true)
        end
        if isKeyJustPressed(keys.VK_Q) and textOnQ then
            sampSendChat(text)
            wait(1000)
        end
    end
end

function sbiv()
   textOnQ = not textOnQ
end
нет вы ошиблись. функция sbiv так сказать сама по себе

я думал то что поток для wait нужно создавать только в колбэк функциях
 

Oleg Sleash

Участник
69
97
нет вы ошиблись. функция sbiv так сказать сама по себе
Даже если и так, то разницы нет, запустив её вы уже не сможете отключить, поэтому лучше сразу и закинуть е код в main, но тем более в вашем первом варианте кода функция sbiv нигде не вызывается, только main будет срабатывать при запуске скрпита
 

Kirkjubaijaarklaustur

Известный
379
124
что ап? тебе же ответили уже
1) Для использования функции wait вне main надо делать так:
Lua:
-- code...
lua_thread.create(function()
while true do
wait(0)
-- code...
end
end)
-- code...
Lua:
function sbiv()
    lua_thread.create(function()
        while true do
            wait(0)
            if isKeyJustPressed(keys.VK_Q) then
                sampSendChat(text)
                wait(1000)
            end
        end
    end)
end
 

arc warden

Участник
Автор темы
139
21
Последнее редактирование:

Kirkjubaijaarklaustur

Известный
379
124
А во вторых ,как я понял функция sbiv вызывается через "галочку" (чекбокс) в имгуй-меню, и если вы запустите бесконечный цикл, то он не отключится, лучше использовать так:
Lua:
function main()
textOnQ = false
sampRegisterChatCommand('ezsbiv', function() WinState[0] = not WinState[0] end)
while true do
wait(0)
if isKeyJustPressed(keys.VK_H) then
clearCharTasksImmediately(PLAYER_PED) freezeCharPosition(PLAYER_PED, false) setPlayerControl(player, true)
end
if isKeyJustPressed(keys.VK_Q) and textOnQ then
sampSendChat(text)
wait(1000)
end
end
end

function sbiv()
textOnQ = not textOnQ
end
ты этот код пробовал?
 

arc warden

Участник
Автор темы
139
21
скинь фулл скрипт
щя

123:
local imgui = require 'mimgui'
local keys = require 'vkeys'
local encoding = require 'encoding'
encoding.default = 'CP1251'
local u8 = encoding.UTF8
local ffi = require 'ffi'
local sampev = require 'lib.samp.events'
require 'lib.moonloader'


local inicfg = require 'inicfg'
local settings = inicfg.load({
    text =
    {
        inputsaved = ''
    }}, 'ezsbiv.ini')
local status = inicfg.load(settings, 'ezsbiv.ini')
if not doesFileExist('moonloader/config/ezsbiv.ini') then inicfg.save(settings, 'ezsbiv.ini') end

local new, str = imgui.new, ffi.string
local WinState = new.bool()
local inputField = new.char[256](u8(settings.text.inputsaved))
local maincolor = '{FF4500}'
local checkboxone = new.bool()
state = not state
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(450, 90), imgui.Cond.Always)
        imgui.Begin(u8'[EzSbiv] Menu', WinState)
        imgui.InputTextWithHint(u8'Введите слово для сбива', u8'Слово для сбива', inputField, 256)
        if imgui.Button(u8'Сохранить', imgui.ImVec2(90, 20)) then
            text = u8:decode(ffi.string(inputField))
            settings.text.inputsaved = u8:decode(str(text))
            inicfg.save(settings, 'ezsbiv.ini')
            sampAddChatMessage(maincolor .. '[EzSbiv] {FFFFFF}Сохранено! Слово для сбива - ' .. text, -1)
        end
        imgui.SetCursorPos(imgui.ImVec2(110, 57))
        if imgui.Checkbox(u8'[MODE] Фулл сбив', checkboxone) then
            sampAddChatMessage(maincolor .. '[EzSbiv]{FFFFFF}Вы активировали режим работы - фулл сбив. Чтобы сбить анимацию нажмите на H', -1)
        end

    imgui.End()
    end
)


function main()
    textOnQ = false
    sampRegisterChatCommand('ezsbiv', function() WinState[0] = not WinState[0] end)
    while true do
        wait(0)
        if isKeyJustPressed(keys.VK_H) then
            clearCharTasksImmediately(PLAYER_PED) freezeCharPosition(PLAYER_PED, false) setPlayerControl(player, true)
        end
        if isKeyJustPressed(keys.VK_Q) and textOnQ then
            sampSendChat(text)
            wait(1000)
        end
    end
end

function sbiv()
   textOnQ = not textOnQ
end

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
    theme()
end)

function theme()
    imgui.SwitchContext()
    local ImVec4 = imgui.ImVec4
    imgui.GetStyle().WindowPadding = imgui.ImVec2(5, 5)
    imgui.GetStyle().FramePadding = imgui.ImVec2(5, 5)
    imgui.GetStyle().ItemSpacing = imgui.ImVec2(5, 5)
    imgui.GetStyle().ItemInnerSpacing = imgui.ImVec2(2, 2)
    imgui.GetStyle().TouchExtraPadding = imgui.ImVec2(0, 0)
    imgui.GetStyle().IndentSpacing = 0
    imgui.GetStyle().ScrollbarSize = 10
    imgui.GetStyle().GrabMinSize = 10
    imgui.GetStyle().WindowBorderSize = 1
    imgui.GetStyle().ChildBorderSize = 1

    imgui.GetStyle().PopupBorderSize = 1
    imgui.GetStyle().FrameBorderSize = 1
    imgui.GetStyle().TabBorderSize = 1
    imgui.GetStyle().WindowRounding = 8
    imgui.GetStyle().ChildRounding = 8
    imgui.GetStyle().FrameRounding = 8
    imgui.GetStyle().PopupRounding = 8
    imgui.GetStyle().ScrollbarRounding = 8
    imgui.GetStyle().GrabRounding = 8
    imgui.GetStyle().TabRounding = 8

    imgui.GetStyle().Colors[imgui.Col.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.TextDisabled]           = ImVec4(1.00, 1.00, 1.00, 0.43);
    imgui.GetStyle().Colors[imgui.Col.WindowBg]               = ImVec4(0.00, 0.00, 0.00, 0.90);
    imgui.GetStyle().Colors[imgui.Col.ChildBg]                = ImVec4(1.00, 1.00, 1.00, 0.07);
    imgui.GetStyle().Colors[imgui.Col.PopupBg]                = ImVec4(0.00, 0.00, 0.00, 0.94);
    imgui.GetStyle().Colors[imgui.Col.Border]                 = ImVec4(1.00, 1.00, 1.00, 0.00);
    imgui.GetStyle().Colors[imgui.Col.BorderShadow]           = ImVec4(1.00, 0.00, 0.00, 0.32);
    imgui.GetStyle().Colors[imgui.Col.FrameBg]                = ImVec4(1.00, 1.00, 1.00, 0.09);
    imgui.GetStyle().Colors[imgui.Col.FrameBgHovered]         = ImVec4(1.00, 1.00, 1.00, 0.17);
    imgui.GetStyle().Colors[imgui.Col.FrameBgActive]          = ImVec4(1.00, 1.00, 1.00, 0.26);
    imgui.GetStyle().Colors[imgui.Col.TitleBg]                = ImVec4(0.19, 0.00, 0.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.TitleBgActive]          = ImVec4(0.46, 0.00, 0.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed]       = ImVec4(0.20, 0.00, 0.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.MenuBarBg]              = ImVec4(0.14, 0.03, 0.03, 1.00);
    imgui.GetStyle().Colors[imgui.Col.ScrollbarBg]            = ImVec4(0.19, 0.00, 0.00, 0.53);
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab]          = ImVec4(1.00, 1.00, 1.00, 0.11);
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered]   = ImVec4(1.00, 1.00, 1.00, 0.24);
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive]    = ImVec4(1.00, 1.00, 1.00, 0.35);
    imgui.GetStyle().Colors[imgui.Col.CheckMark]              = ImVec4(1.00, 1.00, 1.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.SliderGrab]             = ImVec4(1.00, 0.00, 0.00, 0.34);
    imgui.GetStyle().Colors[imgui.Col.SliderGrabActive]       = ImVec4(1.00, 0.00, 0.00, 0.51);
    imgui.GetStyle().Colors[imgui.Col.Button]                 = ImVec4(1.00, 0.00, 0.00, 0.19);
    imgui.GetStyle().Colors[imgui.Col.ButtonHovered]          = ImVec4(1.00, 0.00, 0.00, 0.31);
    imgui.GetStyle().Colors[imgui.Col.ButtonActive]           = ImVec4(1.00, 0.00, 0.00, 0.46);
    imgui.GetStyle().Colors[imgui.Col.Header]                 = ImVec4(1.00, 0.00, 0.00, 0.19);
    imgui.GetStyle().Colors[imgui.Col.HeaderHovered]          = ImVec4(1.00, 0.00, 0.00, 0.30);
    imgui.GetStyle().Colors[imgui.Col.HeaderActive]           = ImVec4(1.00, 0.00, 0.00, 0.50);
    imgui.GetStyle().Colors[imgui.Col.Separator]              = ImVec4(1.00, 0.00, 0.00, 0.41);
    imgui.GetStyle().Colors[imgui.Col.SeparatorHovered]       = ImVec4(1.00, 1.00, 1.00, 0.78);
    imgui.GetStyle().Colors[imgui.Col.SeparatorActive]        = ImVec4(1.00, 1.00, 1.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.ResizeGrip]             = ImVec4(0.19, 0.00, 0.00, 0.53);
    imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered]      = ImVec4(0.43, 0.00, 0.00, 0.75);
    imgui.GetStyle().Colors[imgui.Col.ResizeGripActive]       = ImVec4(0.53, 0.00, 0.00, 0.95);
    imgui.GetStyle().Colors[imgui.Col.Tab]                    = ImVec4(1.00, 0.00, 0.00, 0.27);
    imgui.GetStyle().Colors[imgui.Col.TabHovered]             = ImVec4(1.00, 0.00, 0.00, 0.48);
    imgui.GetStyle().Colors[imgui.Col.TabActive]              = ImVec4(1.00, 0.00, 0.00, 0.60);
    imgui.GetStyle().Colors[imgui.Col.TabUnfocused]           = ImVec4(1.00, 0.00, 0.00, 0.27);
    imgui.GetStyle().Colors[imgui.Col.TabUnfocusedActive]     = ImVec4(1.00, 0.00, 0.00, 0.54);
    imgui.GetStyle().Colors[imgui.Col.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00);
    imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00);
    imgui.GetStyle().Colors[imgui.Col.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.TextSelectedBg]         = ImVec4(1.00, 1.00, 1.00, 0.35);
    imgui.GetStyle().Colors[imgui.Col.DragDropTarget]         = ImVec4(1.00, 1.00, 0.00, 0.90);
    imgui.GetStyle().Colors[imgui.Col.NavHighlight]           = ImVec4(0.26, 0.59, 0.98, 1.00);
    imgui.GetStyle().Colors[imgui.Col.NavWindowingHighlight]  = ImVec4(1.00, 1.00, 1.00, 0.70);
    imgui.GetStyle().Colors[imgui.Col.NavWindowingDimBg]      = ImVec4(0.80, 0.80, 0.80, 0.20);
    imgui.GetStyle().Colors[imgui.Col.ModalWindowDimBg]       = ImVec4(0.80, 0.80, 0.80, 0.35);
end
 

Kirkjubaijaarklaustur

Известный
379
124
щя

123:
local imgui = require 'mimgui'
local keys = require 'vkeys'
local encoding = require 'encoding'
encoding.default = 'CP1251'
local u8 = encoding.UTF8
local ffi = require 'ffi'
local sampev = require 'lib.samp.events'
require 'lib.moonloader'


local inicfg = require 'inicfg'
local settings = inicfg.load({
    text =
    {
        inputsaved = ''
    }}, 'ezsbiv.ini')
local status = inicfg.load(settings, 'ezsbiv.ini')
if not doesFileExist('moonloader/config/ezsbiv.ini') then inicfg.save(settings, 'ezsbiv.ini') end

local new, str = imgui.new, ffi.string
local WinState = new.bool()
local inputField = new.char[256](u8(settings.text.inputsaved))
local maincolor = '{FF4500}'
local checkboxone = new.bool()
state = not state
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(450, 90), imgui.Cond.Always)
        imgui.Begin(u8'[EzSbiv] Menu', WinState)
        imgui.InputTextWithHint(u8'Введите слово для сбива', u8'Слово для сбива', inputField, 256)
        if imgui.Button(u8'Сохранить', imgui.ImVec2(90, 20)) then
            text = u8:decode(ffi.string(inputField))
            settings.text.inputsaved = u8:decode(str(text))
            inicfg.save(settings, 'ezsbiv.ini')
            sampAddChatMessage(maincolor .. '[EzSbiv] {FFFFFF}Сохранено! Слово для сбива - ' .. text, -1)
        end
        imgui.SetCursorPos(imgui.ImVec2(110, 57))
        if imgui.Checkbox(u8'[MODE] Фулл сбив', checkboxone) then
            sampAddChatMessage(maincolor .. '[EzSbiv]{FFFFFF}Вы активировали режим работы - фулл сбив. Чтобы сбить анимацию нажмите на H', -1)
        end

    imgui.End()
    end
)


function main()
    textOnQ = false
    sampRegisterChatCommand('ezsbiv', function() WinState[0] = not WinState[0] end)
    while true do
        wait(0)
        if isKeyJustPressed(keys.VK_H) then
            clearCharTasksImmediately(PLAYER_PED) freezeCharPosition(PLAYER_PED, false) setPlayerControl(player, true)
        end
        if isKeyJustPressed(keys.VK_Q) and textOnQ then
            sampSendChat(text)
            wait(1000)
        end
    end
end

function sbiv()
   textOnQ = not textOnQ
end

imgui.OnInitialize(function()
    imgui.GetIO().IniFilename = nil
    theme()
end)

function theme()
    imgui.SwitchContext()
    local ImVec4 = imgui.ImVec4
    imgui.GetStyle().WindowPadding = imgui.ImVec2(5, 5)
    imgui.GetStyle().FramePadding = imgui.ImVec2(5, 5)
    imgui.GetStyle().ItemSpacing = imgui.ImVec2(5, 5)
    imgui.GetStyle().ItemInnerSpacing = imgui.ImVec2(2, 2)
    imgui.GetStyle().TouchExtraPadding = imgui.ImVec2(0, 0)
    imgui.GetStyle().IndentSpacing = 0
    imgui.GetStyle().ScrollbarSize = 10
    imgui.GetStyle().GrabMinSize = 10
    imgui.GetStyle().WindowBorderSize = 1
    imgui.GetStyle().ChildBorderSize = 1

    imgui.GetStyle().PopupBorderSize = 1
    imgui.GetStyle().FrameBorderSize = 1
    imgui.GetStyle().TabBorderSize = 1
    imgui.GetStyle().WindowRounding = 8
    imgui.GetStyle().ChildRounding = 8
    imgui.GetStyle().FrameRounding = 8
    imgui.GetStyle().PopupRounding = 8
    imgui.GetStyle().ScrollbarRounding = 8
    imgui.GetStyle().GrabRounding = 8
    imgui.GetStyle().TabRounding = 8

    imgui.GetStyle().Colors[imgui.Col.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.TextDisabled]           = ImVec4(1.00, 1.00, 1.00, 0.43);
    imgui.GetStyle().Colors[imgui.Col.WindowBg]               = ImVec4(0.00, 0.00, 0.00, 0.90);
    imgui.GetStyle().Colors[imgui.Col.ChildBg]                = ImVec4(1.00, 1.00, 1.00, 0.07);
    imgui.GetStyle().Colors[imgui.Col.PopupBg]                = ImVec4(0.00, 0.00, 0.00, 0.94);
    imgui.GetStyle().Colors[imgui.Col.Border]                 = ImVec4(1.00, 1.00, 1.00, 0.00);
    imgui.GetStyle().Colors[imgui.Col.BorderShadow]           = ImVec4(1.00, 0.00, 0.00, 0.32);
    imgui.GetStyle().Colors[imgui.Col.FrameBg]                = ImVec4(1.00, 1.00, 1.00, 0.09);
    imgui.GetStyle().Colors[imgui.Col.FrameBgHovered]         = ImVec4(1.00, 1.00, 1.00, 0.17);
    imgui.GetStyle().Colors[imgui.Col.FrameBgActive]          = ImVec4(1.00, 1.00, 1.00, 0.26);
    imgui.GetStyle().Colors[imgui.Col.TitleBg]                = ImVec4(0.19, 0.00, 0.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.TitleBgActive]          = ImVec4(0.46, 0.00, 0.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.TitleBgCollapsed]       = ImVec4(0.20, 0.00, 0.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.MenuBarBg]              = ImVec4(0.14, 0.03, 0.03, 1.00);
    imgui.GetStyle().Colors[imgui.Col.ScrollbarBg]            = ImVec4(0.19, 0.00, 0.00, 0.53);
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrab]          = ImVec4(1.00, 1.00, 1.00, 0.11);
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabHovered]   = ImVec4(1.00, 1.00, 1.00, 0.24);
    imgui.GetStyle().Colors[imgui.Col.ScrollbarGrabActive]    = ImVec4(1.00, 1.00, 1.00, 0.35);
    imgui.GetStyle().Colors[imgui.Col.CheckMark]              = ImVec4(1.00, 1.00, 1.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.SliderGrab]             = ImVec4(1.00, 0.00, 0.00, 0.34);
    imgui.GetStyle().Colors[imgui.Col.SliderGrabActive]       = ImVec4(1.00, 0.00, 0.00, 0.51);
    imgui.GetStyle().Colors[imgui.Col.Button]                 = ImVec4(1.00, 0.00, 0.00, 0.19);
    imgui.GetStyle().Colors[imgui.Col.ButtonHovered]          = ImVec4(1.00, 0.00, 0.00, 0.31);
    imgui.GetStyle().Colors[imgui.Col.ButtonActive]           = ImVec4(1.00, 0.00, 0.00, 0.46);
    imgui.GetStyle().Colors[imgui.Col.Header]                 = ImVec4(1.00, 0.00, 0.00, 0.19);
    imgui.GetStyle().Colors[imgui.Col.HeaderHovered]          = ImVec4(1.00, 0.00, 0.00, 0.30);
    imgui.GetStyle().Colors[imgui.Col.HeaderActive]           = ImVec4(1.00, 0.00, 0.00, 0.50);
    imgui.GetStyle().Colors[imgui.Col.Separator]              = ImVec4(1.00, 0.00, 0.00, 0.41);
    imgui.GetStyle().Colors[imgui.Col.SeparatorHovered]       = ImVec4(1.00, 1.00, 1.00, 0.78);
    imgui.GetStyle().Colors[imgui.Col.SeparatorActive]        = ImVec4(1.00, 1.00, 1.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.ResizeGrip]             = ImVec4(0.19, 0.00, 0.00, 0.53);
    imgui.GetStyle().Colors[imgui.Col.ResizeGripHovered]      = ImVec4(0.43, 0.00, 0.00, 0.75);
    imgui.GetStyle().Colors[imgui.Col.ResizeGripActive]       = ImVec4(0.53, 0.00, 0.00, 0.95);
    imgui.GetStyle().Colors[imgui.Col.Tab]                    = ImVec4(1.00, 0.00, 0.00, 0.27);
    imgui.GetStyle().Colors[imgui.Col.TabHovered]             = ImVec4(1.00, 0.00, 0.00, 0.48);
    imgui.GetStyle().Colors[imgui.Col.TabActive]              = ImVec4(1.00, 0.00, 0.00, 0.60);
    imgui.GetStyle().Colors[imgui.Col.TabUnfocused]           = ImVec4(1.00, 0.00, 0.00, 0.27);
    imgui.GetStyle().Colors[imgui.Col.TabUnfocusedActive]     = ImVec4(1.00, 0.00, 0.00, 0.54);
    imgui.GetStyle().Colors[imgui.Col.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00);
    imgui.GetStyle().Colors[imgui.Col.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00);
    imgui.GetStyle().Colors[imgui.Col.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00);
    imgui.GetStyle().Colors[imgui.Col.TextSelectedBg]         = ImVec4(1.00, 1.00, 1.00, 0.35);
    imgui.GetStyle().Colors[imgui.Col.DragDropTarget]         = ImVec4(1.00, 1.00, 0.00, 0.90);
    imgui.GetStyle().Colors[imgui.Col.NavHighlight]           = ImVec4(0.26, 0.59, 0.98, 1.00);
    imgui.GetStyle().Colors[imgui.Col.NavWindowingHighlight]  = ImVec4(1.00, 1.00, 1.00, 0.70);
    imgui.GetStyle().Colors[imgui.Col.NavWindowingDimBg]      = ImVec4(0.80, 0.80, 0.80, 0.20);
    imgui.GetStyle().Colors[imgui.Col.ModalWindowDimBg]       = ImVec4(0.80, 0.80, 0.80, 0.35);
end
Ты даже не добавил чекбокс, на включение этого сбива