vermillion_settings

LoadingCrasher Source

Dec 29th, 2019
1,355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.96 KB | None | 0 0
  1. local ev = require('lib.samp.events')
  2. local ini = require('inicfg')
  3. local effil = require('effil')
  4. local md5 = require('md5')
  5. local imgui = require('imgui')
  6. local encoding = require('encoding')
  7. local vk = require('vkeys')
  8. encoding.default = 'CP1251'
  9. local u8 = encoding.UTF8
  10. local protect = false
  11.  
  12.  
  13.  
  14. function ev.onSendEnterVehicle()
  15.     lua_thread.create(function()
  16.         protect = true
  17.         wait(2000)
  18.         protect = false
  19.     end)
  20. end
  21.  
  22. function ev.onUnoccupiedSync()
  23.     if protect then return false end
  24. end
  25.  
  26. function samp_create_jopa_data(sync_type, copy_from_player)
  27.     local ffi = require 'ffi'
  28.     local sampfuncs = require 'sampfuncs'
  29.     -- from SAMP.Lua
  30.     local raknet = require 'samp.raknet'
  31.     --require 'samp.synchronization'
  32.     copy_from_player = copy_from_player or true
  33.  
  34.     local sync_traits = {
  35.         player = {'PlayerSyncData', raknet.PACKET.PLAYER_SYNC, sampStorePlayerOnfootData},
  36.         vehicle = {'VehicleSyncData', raknet.PACKET.VEHICLE_SYNC, sampStorePlayerIncarData},
  37.         passenger = {'PassengerSyncData', raknet.PACKET.PASSENGER_SYNC, sampStorePlayerPassengerData},
  38.         aim = {'AimSyncData', raknet.PACKET.AIM_SYNC, sampStorePlayerAimData},
  39.         trailer = {'TrailerSyncData', raknet.PACKET.TRAILER_SYNC, sampStorePlayerTrailerData},
  40.         unoccupied = {'UnoccupiedSyncData', raknet.PACKET.UNOCCUPIED_SYNC, nil},
  41.         bullet = {'BulletSyncData', raknet.PACKET.BULLET_SYNC, nil},
  42.         spectator = {'SpectatorSyncData', raknet.PACKET.SPECTATOR_SYNC, nil}
  43.     }
  44.     local sync_info = sync_traits[sync_type]
  45.     local data_type = 'struct ' .. sync_info[1]
  46.     local data = ffi.new(data_type, {})
  47.     local raw_data_ptr = tonumber(ffi.cast('uintptr_t', ffi.new(data_type .. '*', data)))
  48.     -- copy player's sync data to the allocated memory
  49.     if copy_from_player then
  50.  
  51.         local copy_func = sync_info[3]
  52.         if copy_func then
  53.  
  54.             local _, player_id
  55.             if copy_from_player == true then
  56.                 _, player_id = sampGetPlayerIdByCharHandle(PLAYER_PED)
  57.             else
  58.                 player_id = tonumber(copy_from_player)
  59.             end
  60.             copy_func(player_id, raw_data_ptr)
  61.         end
  62.     end
  63.     -- function to send packet
  64.     local func_send = function()
  65.         local bs = raknetNewBitStream()
  66.         raknetBitStreamWriteInt8(bs, sync_info[2])
  67.         raknetBitStreamWriteBuffer(bs, raw_data_ptr, ffi.sizeof(data))
  68.         raknetSendBitStreamEx(bs, sampfuncs.HIGH_PRIORITY, sampfuncs.UNRELIABLE_SEQUENCED, 1)
  69.         raknetDeleteBitStream(bs)
  70.     end
  71.     -- metatable to access sync data and 'send' function
  72.     local mt = {
  73.         __index = function(t, index)
  74.             return data[index]
  75.         end,
  76.         __newindex = function(t, index, value)
  77.             data[index] = value
  78.         end
  79.     }
  80.     return setmetatable({send = func_send}, mt)
  81. end
  82.  
  83. local key = '................................'
  84. local state = false
  85. local menu = imgui.ImBool(false)
  86. local log = imgui.ImBool(true)
  87. local line = imgui.ImBool(true)
  88. -- local log_posing = false
  89. -- local log_x, log_y = 50, 50
  90. -- local log_text = {
  91. --  'Готов к логгированию',
  92. --  '',
  93. --  '',
  94. --  '',
  95. --  '',
  96. --  '',
  97. --  '',
  98. --  '',
  99. --  '',
  100. -- }
  101. local priv = false
  102. local dissync = false
  103. local max = imgui.ImInt(50)
  104.  
  105. function imgui.OnDrawFrame()
  106.     if menu.v then
  107.         local xw, yw = getScreenResolution()
  108.         imgui.SetNextWindowPos(imgui.ImVec2(xw/2, yw/2), imgui.Cond.FirstUseEver)
  109.         imgui.SetNextWindowSize(imgui.ImVec2(500, 170), imgui.Cond.FirstUseEver)
  110.         imgui.Begin(u8'Бутыльный разрыватель | Автор: MrCreepTon', menu, imgui.WindowFlags.NoResize)
  111.         if state then
  112.             if imgui.Button(u8'Выключить', imgui.ImVec2(-0.1, 20)) then
  113.                 sampProcessChatInput('/butilka')
  114.             end
  115.         else
  116.             if imgui.Button(u8'Включить', imgui.ImVec2(-0.1, 20)) then
  117.                 sampProcessChatInput('/butilka')
  118.             end
  119.         end
  120.         if imgui.Button(u8'Сохранить настройки', imgui.ImVec2(-0.1, 20)) then
  121.             saveIni()
  122.         end
  123.         imgui.Separator()
  124.         imgui.BeginChild(u8'##window1', imgui.ImVec2(275, 70), false)
  125.         imgui.Checkbox(u8'Включить логгирование', log)
  126.         -- if log.v then
  127.         --  if imgui.Button(u8'Изменить местоположение окна') then
  128.         --      log_posing = true
  129.         --  end
  130.         -- end
  131.         imgui.Checkbox(u8'Включить линии к жертвам', line)
  132.         imgui.EndChild()
  133.         imgui.SameLine()
  134.         imgui.BeginChild(u8'##window2', imgui.ImVec2(200, 70), false)
  135.         imgui.PushItemWidth(50)
  136.         imgui.InputInt(u8'Радиус', max, 0, 0)
  137.         imgui.EndChild()
  138.         imgui.End()
  139.     end
  140.     -- if log.v then
  141.     --  imgui.SetNextWindowPos(imgui.ImVec2(log_x, log_y))
  142.     --  imgui.SetNextWindowSize(imgui.ImVec2(350, 200))
  143.     --  imgui.Begin(u8'Butilka Logging', false, imgui.WindowFlags.NoResize + imgui.WindowFlags.NoCollapse)
  144.     --  imgui.TextColoredRGB(log_text[1])
  145.     --  imgui.TextColoredRGB(log_text[2])
  146.     --  imgui.TextColoredRGB(log_text[3])
  147.     --  imgui.TextColoredRGB(log_text[4])
  148.     --  imgui.TextColoredRGB(log_text[5])
  149.     --  imgui.TextColoredRGB(log_text[6])
  150.     --  imgui.TextColoredRGB(log_text[7])
  151.     --  imgui.TextColoredRGB(log_text[8])
  152.     --  imgui.TextColoredRGB(log_text[9])
  153.     --  imgui.End()
  154.     -- end
  155. end
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163. local a = {
  164.     'a',
  165.     'b',
  166.     'c',
  167.     'd',
  168.     'e',
  169.     'f',
  170.     'g',
  171.     'h',
  172.     'i',
  173.     'j',
  174.     'k',
  175.     'l',
  176.     'm',
  177.     'n',
  178.     'p',
  179.     'q',
  180.     'r',
  181.     's',
  182.     't',
  183.     'u',
  184.     'v',
  185.     'w',
  186.     'x',
  187.     'y',
  188.     'z'
  189. }
  190.  
  191.  
  192.  
  193. local c = {
  194.     'а',
  195.     'б',
  196.     'в',
  197.     'г',
  198.     'д',
  199.     'е',
  200.     'ё',
  201.     'ж',
  202.     'з',
  203.     'и',
  204.     'й',
  205.     'к',
  206.     'л',
  207.     'м',
  208.     'н',
  209.     'о',
  210.     'п',
  211.     'р',
  212.     'с',
  213.     'т',
  214.     'у',
  215.     'ф',
  216.     'х',
  217.     'ц',
  218.     'ч',
  219.     'ш',
  220.     'щ',
  221.     'ъ',
  222.     'ы',
  223.     'ь',
  224.     'э',
  225.     'ю',
  226.     'я'
  227. }
  228.  
  229.  
  230.  
  231.  
  232.  
  233. local e = {
  234.     'А',
  235.     'Б',
  236.     'В',
  237.     'Г',
  238.     'Д',
  239.     'Е',
  240.     'Ё',
  241.     'Ж',
  242.     'З',
  243.     'И',
  244.     'Й',
  245.     'К',
  246.     'Л',
  247.     'М',
  248.     'Н',
  249.     'О',
  250.     'П',
  251.     'Р',
  252.     'С',
  253.     'Т',
  254.     'У',
  255.     'Ф',
  256.     'Х',
  257.     'Ц',
  258.     'Ч',
  259.     'Ш',
  260.     'Щ',
  261.     'Ъ',
  262.     'Ы',
  263.     'Ь',
  264.     'Э',
  265.     'Ю',
  266.     'Я'
  267. }
  268.  
  269.  
  270.  
  271. function renderTarget(id)
  272.     local t = lua_thread.create(function()
  273.         local _, ped = sampGetCharHandleBySampPlayerId(id)
  274.         local gx, gy, gz = 0, 0, 0
  275.         if _ then
  276.             gx, gy, gz = getCharCoordinates(ped)
  277.         else
  278.             return false
  279.         end
  280.         while _ and state do
  281.             wait(10)
  282.  
  283.             _, ped = sampGetCharHandleBySampPlayerId(id)
  284.             if _ then
  285.                 local mx, my, mz = getCharCoordinates(PLAYER_PED)
  286.                 local x, y, z = getCharCoordinates(ped)
  287.                 if not isCharInArea3d(ped, gx - 5, gy - 5, gz - 5, gx + 5, gy + 5, gz + 5, false) then
  288.                     break
  289.                 end
  290.                 local mxw, myw = convert3DCoordsToScreen(mx, my, mz)
  291.                 local xw, yw = convert3DCoordsToScreen(x, y, z)
  292.                 if isCharOnScreen(ped) then
  293.                     renderDrawLine(mxw, myw, xw, yw, 2, 0xFFFF5656)
  294.                 end
  295.             end
  296.         end
  297.     end)
  298.     --t:terminate()
  299. end
  300.  
  301. function main()
  302.     repeat wait(0) until isSampAvailable()
  303.     wait(2000)
  304.     loadIni()
  305.     sampAddChatMessage('{FF5656}[Бутыльный разрыватель]: {FFFFFF}Успешно загрузились!', -1)
  306.     sampRegisterChatCommand('butilka.menu', function()
  307.         menu.v = not menu.v
  308.     end)
  309.     sampRegisterChatCommand('butilka', function()
  310.         state = not state
  311.         if state then return sampAddChatMessage('{FF5656}[Бутыльный разрыватель]: {FFFFFF}Включен!', -1) end
  312.         return sampAddChatMessage('{FF5656}[Бутыльный разрыватель]: {FFFFFF}Выключен!', -1)
  313.     end)
  314.     while true do
  315.         wait(0)
  316.         -- if log_posing then
  317.         --  if isKeyDown(vk.VK_LBUTTON) then
  318.         --      log_posing = false
  319.         --      sampToggleCursor(false)
  320.         --      sampAddChatMessage('{FF5656}[Бутыльный разрыватель]: {FFFFFF}Успешно установлены новые координаты!', -1)
  321.         --      sampAddChatMessage('{FF5656}[Бутыльный разрыватель]: {FFFFFF}Если после закрытия меню вы заморозитесь, прожмите {FF5656}ESC', -1)
  322.         --  end
  323.         --  sampToggleCursor(true)
  324.         --  local xw, yw = getCursorPos()
  325.         --  log_x, log_y = xw + 20, yw
  326.         -- end
  327.         imgui.Process = menu.v
  328.     end
  329. end
  330.  
  331.  
  332.  
  333. function loadIni()
  334.     local settings = ini.load(nil, 'nabutilku1.1')
  335.     if settings == nil then
  336.         saveIni()
  337.     else
  338.         max.v = settings.settings.radius
  339.         log.v = settings.settings.log
  340.         line.v = settings.settings.line
  341.     end
  342. end
  343.  
  344. function zapros(method, url, args, resolve, reject)
  345.     local request_thread = effil.thread(function (method, url, args)
  346.         local requests = require 'requests'
  347.         local result, response = pcall(requests.request, method, url, args)
  348.         if result then
  349.             response.json, response.xml = nil, nil
  350.             return true, response
  351.         else
  352.             return false, response
  353.         end
  354.     end)(method, url, args)
  355.     -- Если запрос без функций обработки ответа и ошибок.
  356.     if not resolve then resolve = function() end end
  357.     if not reject then reject = function() end end
  358.     -- Проверка выполнения потока
  359.     local t = lua_thread.create(function()
  360.         local runner = request_thread
  361.         while true do
  362.             local status, err = runner:status()
  363.             if not err then
  364.                 if status == 'completed' then
  365.                     local result, response = runner:get()
  366.                     if result then
  367.                         resolve(response)
  368.                     else
  369.                         reject(response)
  370.                     end
  371.                     return
  372.                 elseif status == 'canceled' then
  373.                     return reject(status)
  374.                 end
  375.             else
  376.                 return reject(err)
  377.             end
  378.             wait(0)
  379.         end
  380.     end)
  381.     return false
  382. end
  383.  
  384.  
  385.  
  386.  
  387. function saveIni()
  388.     ini.save({
  389.         settings = {
  390.             radius = max.v,
  391.             log = log.v,
  392.             line = line.v
  393.         }
  394.     }, 'nabutilku1.1')
  395. end
  396.  
  397.  
  398.  
  399. function ev.onPlayerEnterVehicle(id, vehid, pass)
  400.     if state and not dissync then
  401.         local _, veh = sampGetCarHandleBySampVehicleId(vehid)
  402.         if _ then
  403.             if getDriverOfCar(veh) == -1 or not pass and isCharOnFoot(PLAYER_PED) then
  404.                 local x, y, z = getCharCoordinates(PLAYER_PED)
  405.                 local cx, cy, cz = getCarCoordinates(veh)
  406.                 local dist = getDistanceBetweenCoords3d(x, y, z, cx, cy, cz)
  407.                 if dist <= max.v then
  408.                     local t = lua_thread.create(function()
  409.                         local _, ped = sampGetCharHandleBySampPlayerId(id)
  410.                         if _ then
  411.                             local px, py, pz = getCharCoordinates(ped)
  412.                             dist = getDistanceBetweenCoords3d(cx, cy, cz, px, py, pz)
  413.                             if log.v then
  414.                                 printStringNow('~y~Attention:~n~~w~Player ~r~'..sampGetPlayerNickname(id)..'['..id..'] ~w~is entering vehicle...', 3000)
  415.                             end
  416.                             while dist > 3 do
  417.                                 wait(0)
  418.  
  419.                                 if dist > 5 then
  420.                                     if log.v then
  421.                                         printStringNow('~r~Error:~n~~w~Player ~r~'..sampGetPlayerNickname(id)..'['..id..'] ~w~ne sel v avto', 3000)
  422.                                     end
  423.                                     break
  424.                                 end
  425.                                 _, ped = sampGetCharHandleBySampPlayerId(id)
  426.                                 if _ then
  427.                                     px, py, pz = getCharCoordinates(ped)
  428.                                     dist = getDistanceBetweenCoords3d(cx, cy, cz, px, py, pz)
  429.                                 else
  430.                                     if log.v then
  431.                                         printStringNow('~r~Error:~n~~w~Player left', 3000)
  432.                                         break
  433.                                     end
  434.                                     break
  435.                                 end
  436.                             end
  437.                         else
  438.                             if log.v then
  439.                                 printStringNow('~r~Error:~n~~w~Player left', 3000)
  440.                             end
  441.                         end
  442.                         wait(300)
  443.                         dissync = true
  444.                         local x, y, z = getCharCoordinates(PLAYER_PED)
  445.                         local angle = getHeadingFromVector2d(cx - x, cy - y)
  446.                         local dist = getDistanceBetweenCoords2d(cx, cy, x, y)
  447.                         while dist > 6 do
  448.                             x = x + 5 * math.sin(-math.rad(angle))
  449.  
  450.                             y = y + 5 * math.cos(-math.rad(angle))
  451.                             local sync = samp_create_jopa_data('player')
  452.                             sync.position.x, sync.position.y, sync.position.z = x, y, cz
  453.  
  454.                             sync.moveSpeed.z = -1
  455.                             sync.send()
  456.                             dist = getDistanceBetweenCoords2d(cx, cy, x, y)
  457.                         end
  458.                         local sync = samp_create_jopa_data('player')
  459.                         sync.position.x, sync.position.y, sync.position.z = cx, cy, cz
  460.                         -- sync.surfingVehicleId = vehid
  461.                         -- sync.surfingOffsets.z = -1
  462.                         sync.moveSpeed.z = -1
  463.                         sync.send()
  464.                         wait(10)
  465.                         for i = 1, 3 do
  466.                             local sync = samp_create_jopa_data('unoccupied')
  467.                             sync.vehicleId = vehid
  468.                             sync.seatId = 0
  469.                             --sync.vehicleHealth = 1000
  470.                             sync.position.x, sync.position.y, sync.position.z = cx, cy, cz - 0.2
  471.                             sync.send()
  472.                             wait(10)
  473.                         end
  474.                         x, y, z = getCharCoordinates(PLAYER_PED)
  475.                         dist = getDistanceBetweenCoords2d(cx, cy, x, y)
  476.                         while dist > 6 do
  477.                             angle = getHeadingFromVector2d(x - cx, y - cy)
  478.                             cx = cx + 5 * math.sin(-math.rad(angle))
  479.                             cy = cy + 5 * math.cos(-math.rad(angle))
  480.                             local sync = samp_create_jopa_data('player')
  481.                             sync.position.x, sync.position.y, sync.position.z = cx, cy, z
  482.                             sync.moveSpeed.z = -1
  483.                             sync.send()
  484.                             dist = getDistanceBetweenCoords2d(cx, cy, x, y)
  485.                         end
  486.                         wait(30)
  487.                         dissync = false
  488.                         sampForceOnfootSync()
  489.                         if log.v then
  490.                             printStringNow('~g~Success:~n~~w~Player ~r~'..sampGetPlayerNickname(id)..'['..id..'] ~w~sel na butilku', 3000)
  491.                         end
  492.                         if id ~= nil and line.v then
  493.                             renderTarget(id)
  494.                         end
  495.                     end)
  496.                     --t:terminate()
  497.                 end
  498.             end
  499.         end
  500.     end
  501. end
  502.  
  503.  
  504.  
  505. function ev.onSetPlayerPos()
  506.     if dissync then return false end
  507. end
  508.  
  509.  
  510.  
  511. function ev.onSendPlayerSync(data)
  512.     if dissync then return false end
  513. end
  514.  
  515.  
  516.  
  517. function imgui.TextColoredRGB(text)
  518.     local style = imgui.GetStyle()
  519.     local colors = style.Colors
  520.     local ImVec4 = imgui.ImVec4
  521.     local explode_argb = function(argb)
  522.         local a = bit.band(bit.rshift(argb, 24), 0xFF)
  523.         local r = bit.band(bit.rshift(argb, 16), 0xFF)
  524.         local g = bit.band(bit.rshift(argb, 8), 0xFF)
  525.         local b = bit.band(argb, 0xFF)
  526.         return a, r, g, b
  527.     end
  528.  
  529.     local getcolor = function(color)
  530.         if color:sub(1, 6):upper() == 'SSSSSS' then
  531.             local r, g, b = colors[1].x, colors[1].y, colors[1].z
  532.             local a = tonumber(color:sub(7, 8), 16) or colors[1].w * 255
  533.             return ImVec4(r, g, b, a / 255)
  534.         end
  535.         local color = type(color) == 'string' and tonumber(color, 16) or color
  536.         if type(color) ~= 'number' then return end
  537.         local r, g, b, a = explode_argb(color)
  538.         return imgui.ImColor(r, g, b, a):GetVec4()
  539.     end
  540.  
  541.     local render_text = function(text_)
  542.         for w in text_:gmatch('[^\r\n]+') do
  543.             local text, colors_, m = {}, {}, 1
  544.             w = w:gsub('{(......)}', '{%1FF}')
  545.             while w:find('{........}') do
  546.                 local n, k = w:find('{........}')
  547.                 local color = getcolor(w:sub(n + 1, k - 1))
  548.                 if color then
  549.                     text[#text], text[#text + 1] = w:sub(m, n - 1), w:sub(k + 1, #w)
  550.                     colors_[#colors_ + 1] = color
  551.                     m = n
  552.                 end
  553.                 w = w:sub(1, n - 1) .. w:sub(k + 1, #w)
  554.             end
  555.             if text[0] then
  556.                 for i = 0, #text do
  557.                     imgui.TextColored(colors_[i] or colors[1], u8(text[i]))
  558.                     imgui.SameLine(nil, 0)
  559.                 end
  560.                 imgui.NewLine()
  561.             else imgui.Text(u8(w)) end
  562.         end
  563.     end
  564.     render_text(text)
  565. end
  566.  
  567.  
  568.  
  569. -- function writeLog(text)
  570. --  if text ~= log_text[1] then
  571. --      for i = 9, 2, -1 do
  572. --          log_text[i] = log_text[i - 1]
  573. --      end
  574. --      log_text[1] = text
  575. --  end
  576. -- end
  577.  
  578. function apply_custom_style()
  579.     imgui.SwitchContext()
  580.     local style = imgui.GetStyle()
  581.     local colors = style.Colors
  582.     local clr = imgui.Col
  583.     local ImVec4 = imgui.ImVec4
  584.     style.WindowRounding = 2.0
  585.     style.WindowTitleAlign = imgui.ImVec2(0.5, 0.84)
  586.     style.ChildWindowRounding = 2.0
  587.     style.FrameRounding = 2.0
  588.     style.ItemSpacing = imgui.ImVec2(5.0, 4.0)
  589.     style.ScrollbarSize = 13.0
  590.     style.ScrollbarRounding = 0
  591.     style.GrabMinSize = 8.0
  592.     style.GrabRounding = 1.0
  593.     colors[clr.FrameBg]                = ImVec4(0.48, 0.16, 0.16, 0.54)
  594.     colors[clr.FrameBgHovered]         = ImVec4(0.98, 0.26, 0.26, 0.40)
  595.     colors[clr.FrameBgActive]          = ImVec4(0.98, 0.26, 0.26, 0.67)
  596.     colors[clr.TitleBg]                = ImVec4(0.04, 0.04, 0.04, 1.00)
  597.     colors[clr.TitleBgActive]          = ImVec4(0.48, 0.16, 0.16, 1.00)
  598.     colors[clr.TitleBgCollapsed]       = ImVec4(0.00, 0.00, 0.00, 0.51)
  599.     colors[clr.CheckMark]              = ImVec4(0.98, 0.26, 0.26, 1.00)
  600.     colors[clr.SliderGrab]             = ImVec4(0.88, 0.26, 0.24, 1.00)
  601.     colors[clr.SliderGrabActive]       = ImVec4(0.98, 0.26, 0.26, 1.00)
  602.     colors[clr.Button]                 = ImVec4(0.98, 0.26, 0.26, 0.40)
  603.     colors[clr.ButtonHovered]          = ImVec4(0.98, 0.26, 0.26, 1.00)
  604.     colors[clr.ButtonActive]           = ImVec4(0.98, 0.06, 0.06, 1.00)
  605.     colors[clr.Header]                 = ImVec4(0.98, 0.26, 0.26, 0.31)
  606.     colors[clr.HeaderHovered]          = ImVec4(0.98, 0.26, 0.26, 0.80)
  607.     colors[clr.HeaderActive]           = ImVec4(0.98, 0.26, 0.26, 1.00)
  608.     colors[clr.Separator]              = colors[clr.Border]
  609.     colors[clr.SeparatorHovered]       = ImVec4(0.75, 0.10, 0.10, 0.78)
  610.     colors[clr.SeparatorActive]        = ImVec4(0.75, 0.10, 0.10, 1.00)
  611.     colors[clr.ResizeGrip]             = ImVec4(0.98, 0.26, 0.26, 0.25)
  612.     colors[clr.ResizeGripHovered]      = ImVec4(0.98, 0.26, 0.26, 0.67)
  613.     colors[clr.ResizeGripActive]       = ImVec4(0.98, 0.26, 0.26, 0.95)
  614.     colors[clr.TextSelectedBg]         = ImVec4(0.98, 0.26, 0.26, 0.35)
  615.     colors[clr.Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00)
  616.     colors[clr.TextDisabled]           = ImVec4(0.50, 0.50, 0.50, 1.00)
  617.     colors[clr.WindowBg]               = ImVec4(0.06, 0.06, 0.06, 0.94)
  618.     colors[clr.ChildWindowBg]          = ImVec4(1.00, 1.00, 1.00, 0.00)
  619.     colors[clr.PopupBg]                = ImVec4(0.08, 0.08, 0.08, 0.94)
  620.     colors[clr.ComboBg]                = colors[clr.PopupBg]
  621.     colors[clr.Border]                 = ImVec4(0.43, 0.43, 0.50, 0.50)
  622.     colors[clr.BorderShadow]           = ImVec4(0.00, 0.00, 0.00, 0.00)
  623.     colors[clr.MenuBarBg]              = ImVec4(0.14, 0.14, 0.14, 1.00)
  624.     colors[clr.ScrollbarBg]            = ImVec4(0.02, 0.02, 0.02, 0.53)
  625.     colors[clr.ScrollbarGrab]          = ImVec4(0.31, 0.31, 0.31, 1.00)
  626.     colors[clr.ScrollbarGrabHovered]   = ImVec4(0.41, 0.41, 0.41, 1.00)
  627.     colors[clr.ScrollbarGrabActive]    = ImVec4(0.51, 0.51, 0.51, 1.00)
  628.     colors[clr.CloseButton]            = ImVec4(0.41, 0.41, 0.41, 0.50)
  629.     colors[clr.CloseButtonHovered]     = ImVec4(0.98, 0.39, 0.36, 1.00)
  630.     colors[clr.CloseButtonActive]      = ImVec4(0.98, 0.39, 0.36, 1.00)
  631.     colors[clr.PlotLines]              = ImVec4(0.61, 0.61, 0.61, 1.00)
  632.     colors[clr.PlotLinesHovered]       = ImVec4(1.00, 0.43, 0.35, 1.00)
  633.     colors[clr.PlotHistogram]          = ImVec4(0.90, 0.70, 0.00, 1.00)
  634.     colors[clr.PlotHistogramHovered]   = ImVec4(1.00, 0.60, 0.00, 1.00)
  635.     colors[clr.ModalWindowDarkening]   = ImVec4(0.80, 0.80, 0.80, 0.35)
  636. end
  637.  
  638. apply_custom_style()
Advertisement
Add Comment
Please, Sign In to add comment