как убрать показ мышки в имгуи без окончания imgui.process

leekyrave

Известный
Автор темы
420
224
Версия MoonLoader
.026-beta
У меня есть два окна имгуи. одно должно всегда показываться - статистика,другое - по команде.
когда окно,которое вызывается по команде неактивно - мышка не должна показываться,курсор если точнее
 

leekyrave

Известный
Автор темы
420
224
Lua:
imgui.ShowCursor = false
спс бро,уважаю,а как лучше сделать,чтобы imgui.Process был всегда активный,короче щас покажу

Lua:
function main()


    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    

   sampRegisterChatCommand("imgui",cmd_imgui)
    
    
    while true do
    wait(0)

 if stats_state.v then
   imgui.Process = true
 end

    local r, g, b, a = rainbow(3, 255)
    changeRadarColor(join_argb(r, g, b, a))

      

 
    
end

end
Код:
function imgui.OnDrawFrame()
  if stats_state.v then
    imgui.ShowCursor = false
    imgui.SetNextWindowSize(imgui.ImVec2(200, 150), imgui.Cond.FirstUseEver)
    imgui.SetNextWindowPos(imgui.ImVec2((sw / 1.1), sh / 1.1), imgui.Cond.FirstUseEver,imgui.ImVec2(0.5,0.5))
    imgui.Begin("213",stats_state, imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoMove)
    
    imgui.Text("123")
 
    imgui.End()
 
  end
 
  if main_window_state.v then
  типо код тут когда маинвиндовстате тру
 
  end
 
 end
лучше сделать так или так


Lua:
function main()


    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    

   sampRegisterChatCommand("imgui",cmd_imgui)
   imgui.Process = true
    
    while true do
    wait(0)


    local r, g, b, a = rainbow(3, 255)
    changeRadarColor(join_argb(r, g, b, a))

      

 
    
end

end
 

Fott

Известный
3,400
2,208
спс бро,уважаю,а как лучше сделать,чтобы imgui.Process был всегда активный,короче щас покажу

Lua:
function main()


    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
 

   sampRegisterChatCommand("imgui",cmd_imgui)
 
 
    while true do
    wait(0)

if stats_state.v then
   imgui.Process = true
end

    local r, g, b, a = rainbow(3, 255)
    changeRadarColor(join_argb(r, g, b, a))

   


 
end

end
Код:
function imgui.OnDrawFrame()
  if stats_state.v then
    imgui.ShowCursor = false
    imgui.SetNextWindowSize(imgui.ImVec2(200, 150), imgui.Cond.FirstUseEver)
    imgui.SetNextWindowPos(imgui.ImVec2((sw / 1.1), sh / 1.1), imgui.Cond.FirstUseEver,imgui.ImVec2(0.5,0.5))
    imgui.Begin("213",stats_state, imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoMove)
 
    imgui.Text("123")

    imgui.End()

  end

  if main_window_state.v then
  типо код тут когда маинвиндовстате тру

  end

end
лучше сделать так или так


Lua:
function main()


    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
 

   sampRegisterChatCommand("imgui",cmd_imgui)
   imgui.Process = true
 
    while true do
    wait(0)


    local r, g, b, a = rainbow(3, 255)
    changeRadarColor(join_argb(r, g, b, a))

   


 
end

end
Не понял вопроса. "Был всегда активный" это со входа в игру?
 
  • Нравится
Реакции: leekyrave

damag

Женюсь на официантке в моем любимом баре
Проверенный
1,152
1,191
спс бро,уважаю,а как лучше сделать,чтобы imgui.Process был всегда активный,короче щас покажу

Lua:
function main()


    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
   

   sampRegisterChatCommand("imgui",cmd_imgui)
   
   
    while true do
    wait(0)

if stats_state.v then
   imgui.Process = true
end

    local r, g, b, a = rainbow(3, 255)
    changeRadarColor(join_argb(r, g, b, a))

     


   
end

end
Код:
function imgui.OnDrawFrame()
  if stats_state.v then
    imgui.ShowCursor = false
    imgui.SetNextWindowSize(imgui.ImVec2(200, 150), imgui.Cond.FirstUseEver)
    imgui.SetNextWindowPos(imgui.ImVec2((sw / 1.1), sh / 1.1), imgui.Cond.FirstUseEver,imgui.ImVec2(0.5,0.5))
    imgui.Begin("213",stats_state, imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoMove)
   
    imgui.Text("123")

    imgui.End()

  end

  if main_window_state.v then
  типо код тут когда маинвиндовстате тру

  end

end
лучше сделать так или так


Lua:
function main()


    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
   

   sampRegisterChatCommand("imgui",cmd_imgui)
   imgui.Process = true
   
    while true do
    wait(0)


    local r, g, b, a = rainbow(3, 255)
    changeRadarColor(join_argb(r, g, b, a))

     


   
end

end
Lua:
function main()
    --code
    while true do wait(0)
        imgui.Process = true
        nazvanie = true
    end
end

function imgui.OnDrawFrame()
    if nazvanie then
        --you code
    end
end
 
  • Нравится
Реакции: Fott и leekyrave