Линия

goosik

Участник
Автор темы
59
4
Как сделать такую же линию как в Ultrafuck?
Picsart_24-02-27_11-40-06-383.png
 
Решение
прозрачный imgui.Col.WindowBg и не прозрачный imgui.Col.ChildBg
Lua:
local imgui = require 'mimgui'
local WinState = imgui.new.bool()

imgui.OnFrame(function() return WinState[0] end, function()
    imgui.SetNextWindowPos(imgui.ImVec2(500, 500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.SetNextWindowSize(imgui.ImVec2(-1, -1), imgui.Cond.Always)
    imgui.Begin('1231', WinState,imgui.WindowFlags.NoDecoration)
    if imgui.BeginChild('1', imgui.ImVec2(160, 250), true) then

        imgui.EndChild()
    end
    imgui.SameLine()
    if imgui.BeginChild('2', imgui.ImVec2(450, 250), true) then

        imgui.EndChild()
    end
    imgui.End()
end)

function main()
    sampRegisterChatCommand('test', function()...

MLycoris

Режим чтения
Проверенный
1,821
1,860
прозрачный imgui.Col.WindowBg и не прозрачный imgui.Col.ChildBg
Lua:
local imgui = require 'mimgui'
local WinState = imgui.new.bool()

imgui.OnFrame(function() return WinState[0] end, function()
    imgui.SetNextWindowPos(imgui.ImVec2(500, 500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.SetNextWindowSize(imgui.ImVec2(-1, -1), imgui.Cond.Always)
    imgui.Begin('1231', WinState,imgui.WindowFlags.NoDecoration)
    if imgui.BeginChild('1', imgui.ImVec2(160, 250), true) then

        imgui.EndChild()
    end
    imgui.SameLine()
    if imgui.BeginChild('2', imgui.ImVec2(450, 250), true) then

        imgui.EndChild()
    end
    imgui.End()
end)

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

imgui.OnInitialize(function()
    theme()
end)
function theme()
    imgui.GetStyle().Colors[imgui.Col.WindowBg]               = imgui.ImVec4(0.06, 0.06, 0.06, 0.00)
    imgui.GetStyle().Colors[imgui.Col.ChildBg]                = imgui.ImVec4(0.00, 0.00, 0.00, 0.70)
    imgui.GetStyle().Colors[imgui.Col.Border]                 = imgui.ImVec4(0.43, 0.43, 0.50, 0.00)
    imgui.GetStyle().Colors[imgui.Col.BorderShadow]           = imgui.ImVec4(0.00, 0.00, 0.00, 0.00)
end
 
  • Нравится
  • Вау
Реакции: sVor и goosik

goosik

Участник
Автор темы
59
4
прозрачный imgui.Col.WindowBg и не прозрачный imgui.Col.ChildBg
Lua:
local imgui = require 'mimgui'
local WinState = imgui.new.bool()

imgui.OnFrame(function() return WinState[0] end, function()
    imgui.SetNextWindowPos(imgui.ImVec2(500, 500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
    imgui.SetNextWindowSize(imgui.ImVec2(-1, -1), imgui.Cond.Always)
    imgui.Begin('1231', WinState,imgui.WindowFlags.NoDecoration)
    if imgui.BeginChild('1', imgui.ImVec2(160, 250), true) then

        imgui.EndChild()
    end
    imgui.SameLine()
    if imgui.BeginChild('2', imgui.ImVec2(450, 250), true) then

        imgui.EndChild()
    end
    imgui.End()
end)

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

imgui.OnInitialize(function()
    theme()
end)
function theme()
    imgui.GetStyle().Colors[imgui.Col.WindowBg]               = imgui.ImVec4(0.06, 0.06, 0.06, 0.00)
    imgui.GetStyle().Colors[imgui.Col.ChildBg]                = imgui.ImVec4(0.00, 0.00, 0.00, 0.70)
    imgui.GetStyle().Colors[imgui.Col.Border]                 = imgui.ImVec4(0.43, 0.43, 0.50, 0.00)
    imgui.GetStyle().Colors[imgui.Col.BorderShadow]           = imgui.ImVec4(0.00, 0.00, 0.00, 0.00)
end
Сяб <3
 
  • Нравится
Реакции: MLycoris