- 49
- 3
- Версия MoonLoader
- Другое
Как только не пробовал, и через self.HideCursor, и через onFrame, нихера не получается. Помогите.
код:
local imgui = require 'imgui'
local vkeys = require 'vkeys'
local sampev = require 'samp.events'
local main_color = 0xFFFFFF
local red_color = 0xEA3030
local main_color_text = 0x1A9CD0
local main_window_state = imgui.ImBool(false)
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampAddChatMessage("[0xEA3030][INFO] [0xFFFFFF]Gamesense Loaded!", -1)
sampRegisterChatCommand("gs", gs)
imgui.Process = false
while true do
wait(0)
end
end
function gs()
main_window_state.v = not main_window_state.v
imgui.Process = main_window_state.v
end
local newFrame = imgui.OnFrame(
function() return renderWindow[0] end,
function(player)
player.HideCursor = true
end
)
function imgui.OnDrawFrame()
if main_window_state.v then
imgui.SetNextWindowSize(imgui.ImVec2(800, 350), imgui.Cond.FirstUseEver)
local sW, sH = getScreenResolution()
imgui.SetNextWindowPos(imgui.ImVec2(sW / 2, sH / 2), imgui.Cond.ImGuiCond_Always, imgui.ImVec2(0.5, 0.5))
imgui.Begin("Test", main_window_state, imgui.WindowFlags.NoResize)
imgui.BeginChild('left pane', imgui.ImVec2(150, 0), true)
if imgui.Button("Button 1", imgui.ImVec2(145, 20)) then
end
if imgui.Button("Button 2", imgui.ImVec2(145, 20)) then
end
imgui.EndChild()
imgui.SameLine(165)
imgui.BeginChild('Central UP', imgui.ImVec2(630, 100), true)
imgui.Text("Some Text1")
imgui.Text("Some Text2")
imgui.EndChild()
imgui.SetCursorPos(imgui.ImVec2(165, 140))
imgui.BeginChild('Central Down', imgui.ImVec2(630, 100), true)
imgui.Text("Some Text")
if imgui.Button("Button in Child", imgui.ImVec2(145, 20)) then
end
imgui.EndChild()
imgui.End()
end
end