Маленькое окно при .v Mimgui

Lenny Scripts

Активный
Автор темы
179
35
Версия MoonLoader
.026-beta
Как сделать, чтобы если была поставлена галочка, и тем самым .v менялся на true то выводилось маленькое окно? Нужно для статистики
 
Решение
Типо?
Lua:
local imgui = require 'mimgui'
local ffi = require 'ffi'
local vkeys = require 'vkeys'

local encoding = require 'encoding'
encoding.default = 'CP1251'
local u8 = encoding.UTF8           

local wm = require 'windows.message'
local new = imgui.new

local galka,renwin,renwin2 = new.bool(),new.bool(),new.bool()
local sizeX, sizeY = getScreenResolution()

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

local newFrame = imgui.OnFrame(
    function() return renwin[0] end,
    function(player)
        imgui.SetNextWindowPos(imgui.ImVec2(sizeX / 2, sizeY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(220, 200), imgui.Cond.FirstUseEver)
        imgui.Begin("Main...

qdIbp

Автор темы
Проверенный
1,450
1,191
Типо?
Lua:
local imgui = require 'mimgui'
local ffi = require 'ffi'
local vkeys = require 'vkeys'

local encoding = require 'encoding'
encoding.default = 'CP1251'
local u8 = encoding.UTF8           

local wm = require 'windows.message'
local new = imgui.new

local galka,renwin,renwin2 = new.bool(),new.bool(),new.bool()
local sizeX, sizeY = getScreenResolution()

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

local newFrame = imgui.OnFrame(
    function() return renwin[0] end,
    function(player)
        imgui.SetNextWindowPos(imgui.ImVec2(sizeX / 2, sizeY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(220, 200), imgui.Cond.FirstUseEver)
        imgui.Begin("Main Window", renwin)
            if imgui.Checkbox(u8'Галочка', galka) then
                renwin2[0] = not renwin2[0]
            end
        imgui.End()
    end
)
local newFrame = imgui.OnFrame(
    function() return renwin2[0] end,
    function(player)
        imgui.SetNextWindowPos(imgui.ImVec2(sizeX / 2, sizeY / 3.5), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
        imgui.SetNextWindowSize(imgui.ImVec2(100, 100), imgui.Cond.FirstUseEver)
        imgui.Begin("stats", renwin2)
            imgui.Text(u8"Не смотри!")
        imgui.End()
    end
)
function main()
    addEventHandler('onWindowMessage', function(msg, wparam, lparam)
        if msg == wm.WM_KEYDOWN or msg == wm.WM_SYSKEYDOWN then
            if wparam == vkeys.VK_X then
                renwin[0] = not renwin[0]
            end
        end
    end)
    wait(-1)
end
 
  • Нравится
Реакции: Lenny Scripts