Скрипт "Фаст Трейд", ПКМ по игроку + клавиша

Статус
В этой теме нельзя размещать новые ответы.

Corby

Участник
Автор темы
64
17
Ищу такой скрипт, который кидает трейд игроку при сочетании клавиш - ПКМ(по игроку, которому нужно кинуть) + клавиша(можно поменять)
 
Решение
Держи. Как всегда на имгуи (кек). Команда - /ftrade.
Lua:
script_name('FastTrade')
script_author('Bredd Lane')

require 'lib.moonloader'
local imgui = require 'imgui'
local vkeys = require 'vkeys'
if not doesDirectoryExist('moonloader/config') then
    createDirectory('moonloader\\config')
end
local inicfg = require 'inicfg'
local file = 'FastTrade.ini'
local mainIni = inicfg.load({
    main = {
        ftradeKey = encodeJson({VK_R}),
    }
},file)
if not doesFileExist('moonloader/config/'..file) then
    inicfg.save(mainIni,file)
end
local ftradeKey = {
    v = decodeJson(mainIni.main.ftradeKey)
}
local main_window_state = imgui.ImBool(false)
local encoding = require "encoding"
encoding.default = "CP1251"
u8 = encoding.UTF8

addonscode =...

Bredd Lane

Известный
423
348
Держи. Как всегда на имгуи (кек). Команда - /ftrade.
Lua:
script_name('FastTrade')
script_author('Bredd Lane')

require 'lib.moonloader'
local imgui = require 'imgui'
local vkeys = require 'vkeys'
if not doesDirectoryExist('moonloader/config') then
    createDirectory('moonloader\\config')
end
local inicfg = require 'inicfg'
local file = 'FastTrade.ini'
local mainIni = inicfg.load({
    main = {
        ftradeKey = encodeJson({VK_R}),
    }
},file)
if not doesFileExist('moonloader/config/'..file) then
    inicfg.save(mainIni,file)
end
local ftradeKey = {
    v = decodeJson(mainIni.main.ftradeKey)
}
local main_window_state = imgui.ImBool(false)
local encoding = require "encoding"
encoding.default = "CP1251"
u8 = encoding.UTF8

addonscode = u8[[local imgui = require 'imgui'
local vkeys = require 'vkeys'
local wm = require 'lib.windows.message'

local module = {}
module._VERSION = "1.0.0"
module._SETTINGS = {
    HotKey = {
        noKeysMessage = "No"
    },
    ToggleButton = {
        scale = 1.0,
        AnimSpeed = 0.13,
        colors = {
            imgui.GetStyle().Colors[imgui.Col.ButtonActive], -- Enable circle
            imgui.ImColor(150, 150, 150, 255):GetVec4(), -- Disable circle
            imgui.GetStyle().Colors[imgui.Col.FrameBgHovered], -- Enable rect
            imgui.ImColor(100, 100, 100, 180):GetVec4() -- Disable rect
        }
    }
}

-- Spinner:
module.Spinner = function(label, radius, thickness, color)
    local style = imgui.GetStyle()
    local pos = imgui.GetCursorScreenPos()
    local size = imgui.ImVec2(radius * 2, (radius + style.FramePadding.y) * 2)
 
    imgui.Dummy(imgui.ImVec2(size.x + style.ItemSpacing.x, size.y))

    local DrawList = imgui.GetWindowDrawList()
    DrawList:PathClear()
 
    local num_segments = 30
    local start = math.abs(math.sin(imgui.GetTime() * 1.8) * (num_segments - 5))
 
    local a_min = 3.14 * 2.0 * start / num_segments
    local a_max = 3.14 * 2.0 * (num_segments - 3) / num_segments

    local centre = imgui.ImVec2(pos.x + radius, pos.y + radius + style.FramePadding.y)
 
    for i = 0, num_segments do
        local a = a_min + (i / num_segments) * (a_max - a_min)
        DrawList:PathLineTo(imgui.ImVec2(centre.x + math.cos(a + imgui.GetTime() * 8) * radius, centre.y + math.sin(a + imgui.GetTime() * 8) * radius))
    end

    DrawList:PathStroke(color, false, thickness)
    return true
end

-- BufferingBar:
module.BufferingBar = function(label, value, size_arg, bg_col, fg_col)
    local style = imgui.GetStyle()
    local size = size_arg;

    local DrawList = imgui.GetWindowDrawList()
    size.x = size.x - (style.FramePadding.x * 2);

    local pos = imgui.GetCursorScreenPos()

    imgui.Dummy(imgui.ImVec2(size.x, size.y))
 
    local circleStart = size.x * 0.85;
    local circleEnd = size.x;
    local circleWidth = circleEnd - circleStart;
 
    DrawList:AddRectFilled(pos, imgui.ImVec2(pos.x + circleStart, pos.y + size.y), bg_col)
    DrawList:AddRectFilled(pos, imgui.ImVec2(pos.x + circleStart * value, pos.y + size.y), fg_col)
 
    local t = imgui.GetTime()
    local r = size.y / 2;
    local speed = 1.5;
 
    local a = speed * 0;
    local b = speed * 0.333;
    local c = speed * 0.666;

    local o1 = (circleWidth+r) * (t+a - speed * math.floor((t+a) / speed)) / speed;
    local o2 = (circleWidth+r) * (t+b - speed * math.floor((t+b) / speed)) / speed;
    local o3 = (circleWidth+r) * (t+c - speed * math.floor((t+c) / speed)) / speed;
 
    DrawList:AddCircleFilled(imgui.ImVec2(pos.x + circleEnd - o1, pos.y + r), r, bg_col);
    DrawList:AddCircleFilled(imgui.ImVec2(pos.x + circleEnd - o2, pos.y + r), r, bg_col);
    DrawList:AddCircleFilled(imgui.ImVec2(pos.x + circleEnd - o3, pos.y + r), r, bg_col);
    return true
end

-- HotKey:
local tBlockKeys = {[vkeys.VK_RETURN] = true, [vkeys.VK_T] = true, [vkeys.VK_F6] = true, [vkeys.VK_F8] = true}
local tBlockChar = {[116] = true, [84] = true}
local tModKeys = {[vkeys.VK_MENU] = true, [vkeys.VK_SHIFT] = true, [vkeys.VK_CONTROL] = true}
local tBlockNextDown = {}

local tHotKeyData = {
    edit = nil,
    save = {},
   lastTick = os.clock(),
   tickState = false
}
local tKeys = {}

module.HotKey = function(name, keys, lastkeys, width)
    local width = width or 90
    local name = tostring(name)
    local lastkeys = lastkeys or {}
    local keys, bool = keys or {}, false
    lastkeys.v = keys.v

    local sKeys = table.concat(module.getKeysName(keys.v), " + ")

    if #tHotKeyData.save > 0 and tostring(tHotKeyData.save[1]) == name then
        keys.v = tHotKeyData.save[2]
        sKeys = table.concat(module.getKeysName(keys.v), " + ")
        tHotKeyData.save = {}
        bool = true
    elseif tHotKeyData.edit ~= nil and tostring(tHotKeyData.edit) == name then
        if #tKeys == 0 then
            if os.clock() - tHotKeyData.lastTick > 0.5 then
            tHotKeyData.lastTick = os.clock()
            tHotKeyData.tickState = not tHotKeyData.tickState
         end
         sKeys = tHotKeyData.tickState and module._SETTINGS.HotKey.noKeysMessage or " "
        else
            sKeys = table.concat(module.getKeysName(tKeys), " + ")
        end
    end

    imgui.PushStyleColor(imgui.Col.Button, imgui.GetStyle().Colors[imgui.Col.FrameBg])
    imgui.PushStyleColor(imgui.Col.ButtonHovered, imgui.GetStyle().Colors[imgui.Col.FrameBgHovered])
    imgui.PushStyleColor(imgui.Col.ButtonActive, imgui.GetStyle().Colors[imgui.Col.FrameBgActive])
    if imgui.Button((tostring(sKeys):len() == 0 and module._SETTINGS.HotKey.noKeysMessage or sKeys) .. name, imgui.ImVec2(width, 0)) then
        tHotKeyData.edit = name
    end
    imgui.PopStyleColor(3)
    return bool
end

function module.getCurrentEdit()
    return tHotKeyData.edit ~= nil
end

function module.getKeysList(bool)
   local bool = bool or false
   local tKeysList = {}
   if bool then
      for k, v in ipairs(tKeys) do
         tKeysList[k] = vkeys.id_to_name(v)
      end
   else
      tKeysList = tKeys
   end
   return tKeysList
end

function module.getKeysName(keys)
    if type(keys) ~= "table" then
       return false
    else
       local tKeysName = {}
       for k, v in ipairs(keys) do
          tKeysName[k] = vkeys.id_to_name(v)
       end
       return tKeysName
    end
end

local function getKeyNumber(id)
   for k, v in ipairs(tKeys) do
      if v == id then
         return k
      end
   end
   return -1
end

local function reloadKeysList()
    local tNewKeys = {}
    for k, v in pairs(tKeys) do
       tNewKeys[#tNewKeys + 1] = v
    end
    tKeys = tNewKeys
    return true
end

function module.isKeyModified(id)
if type(id) ~= "number" then
   return false
end
return (tModKeys[id] or false) or (tBlockKeys[id] or false)
end

addEventHandler("onWindowMessage", function (msg, wparam, lparam)
    if tHotKeyData.edit ~= nil and msg == wm.WM_CHAR then
        if tBlockChar[wparam] then
            consumeWindowMessage(true, true)
        end
    end
    if msg == wm.WM_KEYDOWN or msg == wm.WM_SYSKEYDOWN then
        if tHotKeyData.edit ~= nil and wparam == vkeys.VK_ESCAPE then
            tKeys = {}
            tHotKeyData.edit = nil
            consumeWindowMessage(true, true)
        end
        if tHotKeyData.edit ~= nil and wparam == vkeys.VK_BACK then
            tHotKeyData.save = {tHotKeyData.edit, {}}
            tHotKeyData.edit = nil
            consumeWindowMessage(true, true)
        end
        local num = getKeyNumber(wparam)
        if num == -1 then
            tKeys[#tKeys + 1] = wparam
            if tHotKeyData.edit ~= nil then
                if not module.isKeyModified(wparam) then
                    tHotKeyData.save = {tHotKeyData.edit, tKeys}
                    tHotKeyData.edit = nil
                    tKeys = {}
                    consumeWindowMessage(true, true)
                end
            end
        end
        reloadKeysList()
        if tHotKeyData.edit ~= nil then
            consumeWindowMessage(true, true)
        end
    elseif msg == wm.WM_KEYUP or msg == wm.WM_SYSKEYUP then
        local num = getKeyNumber(wparam)
        if num > -1 then
            tKeys[num] = nil
        end
        reloadKeysList()
        if tHotKeyData.edit ~= nil then
            consumeWindowMessage(true, true)
        end
    end
end)

-- Toggle Button:
LastActiveTime = {}
LastActive = {}
module.ToggleButton = function(str_id, bool)
    local rBool = false

    local function ImSaturate(f)
        return f < 0.0 and 0.0 or (f > 1.0 and 1.0 or f)
    end
 
    local p = imgui.GetCursorScreenPos()
    local draw_list = imgui.GetWindowDrawList()

    local height = imgui.GetTextLineHeightWithSpacing() * module._SETTINGS.ToggleButton.scale
    local width = height * 1.2
    local radius = height * 0.50

    if imgui.InvisibleButton(str_id, imgui.ImVec2(width + radius, height)) then
        bool.v = not bool.v
        rBool = true
        LastActiveTime[tostring(str_id)] = os.clock()
        LastActive[tostring(str_id)] = true
    end

    local t = bool.v and 1.0 or 0.0

    if LastActive[tostring(str_id)] then
        local time = os.clock() - LastActiveTime[tostring(str_id)]
        if time <= module._SETTINGS.ToggleButton.AnimSpeed then
            local t_anim = ImSaturate(time / module._SETTINGS.ToggleButton.AnimSpeed)
            t = bool.v and t_anim or 1.0 - t_anim
        else
            LastActive[tostring(str_id)] = false
        end
    end

    local col_bg = imgui.GetColorU32(module._SETTINGS.ToggleButton.colors[bool.v and 3 or 4])

    draw_list:AddRectFilled(imgui.ImVec2(p.x + (radius * 0.65), p.y + (height / 6)), imgui.ImVec2(p.x + (radius * 0.65) + width, p.y + (height - (height / 6))), col_bg, 10.0)
    draw_list:AddCircleFilled(imgui.ImVec2(p.x + (radius * 1.3) + t * (width - (radius * 1.3)), p.y + radius), radius - 1.0, imgui.GetColorU32(module._SETTINGS.ToggleButton.colors[bool.v and  1 or 2]))

    return rBool
end

return module]]
rkeyscode = [[local vkeys = require 'vkeys'

vkeys.key_names[vkeys.VK_LMENU] = "LAlt"
vkeys.key_names[vkeys.VK_RMENU] = "RAlt"
vkeys.key_names[vkeys.VK_LSHIFT] = "LShift"
vkeys.key_names[vkeys.VK_RSHIFT] = "RShift"
vkeys.key_names[vkeys.VK_LCONTROL] = "LCtrl"
vkeys.key_names[vkeys.VK_RCONTROL] = "RCtrl"

local tHotKey = {}
local tKeyList = {}
local tKeysCheck = {}
local iCountCheck = 0
local tBlockKeys = {[vkeys.VK_LMENU] = true, [vkeys.VK_RMENU] = true, [vkeys.VK_RSHIFT] = true, [vkeys.VK_LSHIFT] = true, [vkeys.VK_LCONTROL] = true, [vkeys.VK_RCONTROL] = true}
local tModKeys = {[vkeys.VK_MENU] = true, [vkeys.VK_SHIFT] = true, [vkeys.VK_CONTROL] = true}
local tBlockNext = {}
local module = {}
module._VERSION = "1.1.0"
module._MODKEYS = tModKeys
module._LOCKKEYS = false

local function getKeyNum(id)
   for k, v in pairs(tKeyList) do
      if v == id then
         return k
      end
   end
   return 0
end

function module.isHotKeyHotKey(keys, keys2)
   if type(keys) ~= "table" then
      print("[RKeys | isHotKeyHotKey]: Bad argument #1. Value \"", tostring(keys), "\" is not table.")
      return false
   elseif type(keys2) ~= "table" then
      print("[RKeys | isHotKeyHotKey]: Bad argument #2. Value \"", tostring(keys2), "\" is not table.")
      return false
   else
      return table.concat(keys, " ") == table.concat(keys2, " ")
   end
end

function module.isKeyModified(id)
   if type(id) ~= "number" then
      print("[RKeys | isKeyModified]: Bad argument #1. Value \"", tostring(id), "\" is not number.")
      return false
   end
   return (tModKeys[id] or false) or (tBlockKeys[id] or false)
end

function module.isModifiedDown()
   local bool = false
   for k, v in pairs(tModKeys) do
      if isKeyDown(k) then
         bool = true
         break
      end
   end
   return bool
end

lua_thread.create(function ()
   while true do
      wait(0)
      local tDownKeys = module.getCurrentHotKey()
      for k, v in pairs(tHotKey) do
         if #v.keys > 0 then
            local bool = true
            for i = 1, #v.keys do
               if i ~= #v.keys and (getKeyNum(v.keys[i]) > getKeyNum(v.keys[i + 1]) or getKeyNum(v.keys[i]) == 0) then
                  bool = false
                  break
               elseif i == #v.keys and (v.pressed and not wasKeyPressed(v.keys[i]) or not v.pressed and not isKeyDown(v.keys[i])) or (#v.keys == 1 and module.isModifiedDown()) then
                  bool = false
                  break
               end
            end
            if bool and ((module.onHotKey and module.onHotKey(k, v.keys) ~= false) or module.onHotKey == nil) then
               v.callback(k, v.keys)
            end
         end
      end
   end
end)

function module.registerHotKey(keys, pressed, callback)
   tHotKey[#tHotKey + 1] = {keys = keys, pressed = pressed, callback = callback}
   return #tHotKey
end

function module.getAllHotKey()
   return tHotKey
end

function module.changeHotKey(id, newkeys)
   if type(id) ~= "number" then
      print("[RKeys | changeHotKey]: Bad argument #1. Value \"", tostring(keys), "\" is not number.")
      return false
   elseif type(newkeys) ~= "table" then
      print("[RKeys | changeHotKey]: Bad argument #2. Value \"", tostring(newkeys), "\" is not table.")
      return false
   else
      local bool = false
      if module.isHotKeyDefined(id) then
         tHotKey[id].keys = newkeys
         bool = true
      end
      return bool
   end
end

function module.unRegisterHotKey(keys_or_id)
   local result = false
   local count = 0
   if type(keys_or_id) == "number" and tHotKey[keys_or_id] then
      tHotKey[keys_or_id] = nil
      result = true
      count = nil
   elseif type(keys_or_id) == "table" then
      while module.isHotKeyDefined(keys_or_id) do
         local _, id = module.isHotKeyDefined(keys_or_id)
         tHotKey[id] = nil
         result = true
         count = count + 1
      end
      local id = 1
      local tNewHotKey = {}
      for k, v in pairs(tHotKey) do
         tNewHotKey[id] = v
         id = id + 1
      end
      tHotKey = tNewHotKey
   else
      print("[RKeys | unRegisterHotKey]: Bad argument #1. Value \"", tostring(keys_or_id), "\" is not number or table.")
      return false, -1
   end
   return result, count
end

function module.isHotKeyDefined(keys_or_id)
   if type(keys_or_id) == "number" and tHotKey[keys_or_id] then
      return true, tHotKey[keys_or_id].keys
   elseif type(keys_or_id) == "table" then
      local bool, hkId = false, -1
      for k, v in pairs(tHotKey) do
         if module.isHotKeyHotKey(keys_or_id, v.keys) then
            bool = true
            hkId = k
            break
         end
      end
      return bool, hkId
   else
      print("[RKeys | isHotKeyDefined]: Bad argument #1. Value \"", tostring(keys_or_id), "\" is not number or table.")
      return false, -1
   end
   return false, -1
end

function module.getKeysName(keys)
   if type(keys) ~= "table" then
      print("[RKeys | getKeysName]: Bad argument #1. Value \"", tostring(keys), "\" is not table.")
      return false
   else
      local tKeysName = {}
      for k, v in ipairs(keys) do
         tKeysName[k] = vkeys.id_to_name(v)
      end
      return tKeysName
   end
end

function module.getCurrentHotKey(show_name_keys)
   local show_name_keys = show_name_keys or false
   local tCurKeys = {}
   for k, v in pairs(vkeys) do
      if tBlockKeys[v] == nil then
         local num, down = getKeyNum(v), isKeyDown(v)
         if down and num == 0 then
            tKeyList[#tKeyList + 1] = v
         elseif num > 0 and not down then
            tKeyList[num] = nil
         end
      end
   end
   local i = 1
   for k, v in pairs(tKeyList) do
      tCurKeys[i] = show_name_keys == false and v or vkeys.id_to_name(v)
      i = i + 1
   end
   return tCurKeys, #tKeyList > 0 and not module.isKeyModified(tKeyList[#tKeyList]) or false
end

return module]]

if not doesFileExist('moonloader/lib/imgui_addons.lua') then
    local f = io.open('moonloader/lib/imgui_addons.lua', "w")
    if f then
        f:write(addonscode)
        f:close()
        bImadd, imadd = pcall(import, "moonloader\\lib\\imgui_addons.lua")
    else
        return
    end
end
local imadd = require 'imgui_addons'

if not doesFileExist('moonloader/lib/rkeys.lua') then
    local f = io.open('moonloader/lib/rkeys.lua', "w")
    if f then
        f:write(rkeyscode)
        f:close()
        bFa, fa = pcall(import, "moonloader\\lib\\rkeys.lua")
    else
        return
    end
end
local rkeys = require 'rkeys'

function onWindowMessage(msg, wparam, lparam)
    if msg == 0x100 or msg == 0x101 then
        if (wparam == 0x1B and main_window_state.v) and not isPauseMenuActive() and not sampIsChatInputActive() and not isSampfuncsConsoleActive() and not sampIsDialogActive() then
            consumeWindowMessage(true, false)
            if msg == 0x101 then
                main_window_state.v = false
            end
        end
    end
end

function isKeysDown(keylist)
    local tKeys = keylist
    local bool = false
    local isDownIndex = 0
    local key = #tKeys < 2 and tonumber(tKeys[1]) or tonumber(tKeys[#tKeys])
    if #tKeys < 2 then
        if not isKeyDown(VK_RMENU) and not isKeyDown(VK_LMENU) and not isKeyDown(VK_LSHIFT) and not isKeyDown(VK_RSHIFT) and not isKeyDown(VK_LCONTROL) and not isKeyDown(VK_RCONTROL) then
            if wasKeyPressed(key) then
                bool = true
            end
        end
    else
        if isKeyDown(tKeys[1])  then
            if isKeyDown(tKeys[2]) then
                if tKeys[3] ~= nil then
                    if isKeyDown(tKeys[3]) then
                        if tKeys[4] ~= nil then
                            if isKeyDown(tKeys[4]) then
                                if tKeys[5] ~= nil then
                                    if isKeyDown(tKeys[5]) then
                                        if wasKeyPressed(key) then
                                            bool = true
                                        end
                                    end
                                else
                                    if wasKeyPressed(key) then
                                        bool = true
                                    end
                                end
                            end
                        else
                            if wasKeyPressed(key) then
                                bool = true
                            end
                        end
                    end
                else
                    if wasKeyPressed(key) then
                        bool = true
                    end
                end
            end
        end
    end
    if nextLockKey == keylist then
        bool = false
        nextLockKey = ""
    end
    return bool
end

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

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampAddChatMessage('{3660E9}[FastTrade]{FFFFFF} Загружен! Команда - /ftrade. Автор - Bredd Lane',-1)
    sampRegisterChatCommand('ftrade', function ()
        main_window_state.v = not main_window_state.v
    end)
    while true do
        wait(0)
        theme()
        imgui.Process = main_window_state.v
        local valid, ped = getCharPlayerIsTargeting(PLAYER_HANDLE)
        local result, id = sampGetPlayerIdByCharHandle(ped)
        if result then
            if doesCharExist(ped) and isKeysDown(ftradeKey.v) and not isPauseMenuActive() and not sampIsChatInputActive() and not isSampfuncsConsoleActive() and not sampIsDialogActive() then
                sampSendChat('/trade '..id)
            end
        end
        mainIni.main.ftradeKey = encodeJson(ftradeKey.v)
        inicfg.save(mainIni,file)
    end
end
function imgui.OnDrawFrame()
    imgui.ShowCursor = main_window_state.v
    if main_window_state.v then
        local sw, sh = getScreenResolution()
        imgui.SetNextWindowPos(imgui.ImVec2(sw / 2, sh / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(118, 50), imgui.Cond.FirstUseEver)
        imgui.Begin('FastTrade', main_window_state, imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoResize + imgui.WindowFlags.NoScrollbar)
        imadd.HotKey('##ftradekey', ftradeKey, {}, 100)
        imgui.SameLine()
        imgui.TextQuestion(u8'При прицеливании на игрока и нажатии на "'..table.concat(rkeys.getKeysName(ftradeKey.v), " + ")..u8'" прописывается /trade и ID игрока, на которого вы прицелились.')
        imgui.End()
    end
end

function theme()
    imgui.SwitchContext()
    local style = imgui.GetStyle()
    local colors = style.Colors
    local clr = imgui.Col
    local ImVec4 = imgui.ImVec4
    style.WindowPadding = imgui.ImVec2(4, 4)
    style.WindowRounding = 10
    style.ChildWindowRounding = 5
    style.FramePadding = imgui.ImVec2(5, 3)
    style.FrameRounding = 3.0
    style.ItemSpacing = imgui.ImVec2(5, 4)
    style.ItemInnerSpacing = imgui.ImVec2(4, 4)
    style.IndentSpacing = 21
    style.ScrollbarSize = 13.0
    style.ScrollbarRounding = 10
    style.GrabMinSize = 8
    style.GrabRounding = 1
    style.WindowTitleAlign = imgui.ImVec2(0.5, 0.5)
    style.ButtonTextAlign = imgui.ImVec2(0.5, 0.5)
    colors[clr.Text] = ImVec4(0.95, 0.96, 0.98, 1.00)
    colors[clr.TextDisabled] = ImVec4(0.36, 0.42, 0.47, 1.00)
    colors[clr.WindowBg] = ImVec4(0.11, 0.15, 0.17, 1.00)
    colors[clr.ChildWindowBg] = ImVec4(0.15, 0.18, 0.22, 1.00)
    colors[clr.PopupBg] = ImVec4(0.08, 0.08, 0.08, 0.94)
    colors[clr.Border] = ImVec4(0.43, 0.43, 0.50, 0.50)
    colors[clr.BorderShadow] = ImVec4(0.00, 0.00, 0.00, 0.00)
    colors[clr.FrameBg] = ImVec4(0.20, 0.25, 0.29, 1.00)
    colors[clr.FrameBgHovered] = ImVec4(0.12, 0.20, 0.28, 1.00)
    colors[clr.FrameBgActive] = ImVec4(0.09, 0.12, 0.14, 1.00)
    colors[clr.TitleBg] = ImVec4(0.09, 0.12, 0.14, 0.65)
    colors[clr.TitleBgCollapsed] = ImVec4(0.00, 0.00, 0.00, 0.51)
    colors[clr.TitleBgActive] = ImVec4(0.08, 0.10, 0.12, 1.00)
    colors[clr.MenuBarBg] = ImVec4(0.15, 0.18, 0.22, 1.00)
    colors[clr.ScrollbarBg] = ImVec4(0.02, 0.02, 0.02, 0.39)
    colors[clr.ScrollbarGrab] = ImVec4(0.20, 0.25, 0.29, 1.00)
    colors[clr.ScrollbarGrabHovered] = ImVec4(0.18, 0.22, 0.25, 1.00)
    colors[clr.ScrollbarGrabActive] = ImVec4(0.09, 0.21, 0.31, 1.00)
    colors[clr.ComboBg] = ImVec4(0.20, 0.25, 0.29, 1.00)
    colors[clr.CheckMark] = ImVec4(0.28, 0.56, 1.00, 1.00)
    colors[clr.SliderGrab] = ImVec4(0.28, 0.56, 1.00, 1.00)
    colors[clr.SliderGrabActive] = ImVec4(0.37, 0.61, 1.00, 1.00)
    colors[clr.Button] = ImVec4(0.20, 0.25, 0.29, 1.00)
    colors[clr.ButtonHovered] = ImVec4(0.28, 0.56, 1.00, 1.00)
    colors[clr.ButtonActive] = ImVec4(0.06, 0.53, 0.98, 1.00)
    colors[clr.Header] = ImVec4(0.20, 0.25, 0.29, 0.55)
    colors[clr.HeaderHovered] = ImVec4(0.26, 0.59, 0.98, 0.80)
    colors[clr.HeaderActive] = ImVec4(0.26, 0.59, 0.98, 1.00)
    colors[clr.ResizeGrip] = ImVec4(0.26, 0.59, 0.98, 0.25)
    colors[clr.ResizeGripHovered] = ImVec4(0.26, 0.59, 0.98, 0.67)
    colors[clr.ResizeGripActive] = ImVec4(0.06, 0.05, 0.07, 1.00)
    colors[clr.CloseButton] = ImVec4(0.40, 0.39, 0.38, 0.16)
    colors[clr.CloseButtonHovered] = ImVec4(0.40, 0.39, 0.38, 0.39)
    colors[clr.CloseButtonActive] = ImVec4(0.40, 0.39, 0.38, 1.00)
    colors[clr.PlotLines] = ImVec4(0.61, 0.61, 0.61, 1.00)
    colors[clr.PlotLinesHovered] = ImVec4(1.00, 0.43, 0.35, 1.00)
    colors[clr.PlotHistogram] = ImVec4(0.90, 0.70, 0.00, 1.00)
    colors[clr.PlotHistogramHovered] = ImVec4(1.00, 0.60, 0.00, 1.00)
    colors[clr.TextSelectedBg] = ImVec4(0.25, 1.00, 0.00, 0.43)
    colors[clr.ModalWindowDarkening]   = ImVec4(0.20, 0.20, 0.20, 0.35);
end
 

Вложения

  • FastTrade.lua
    23.8 KB · Просмотры: 150
Статус
В этой теме нельзя размещать новые ответы.