local imgui = require 'imgui'
local pie = require 'imgui_piemenu'
local require "lib.moonloader"
local activ_menu = false
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(1000) end
sampAddChatMessage("• {FFC800}[Подсказка] {ffffff}Menu загружен...", 0xffffff)
sampRegisterChatCommand("xmenu", xmenu)
while true do
wait(0)
if activ_menu == true then
imgui.Process = activ_menu
end
end
end
function imgui.OnDrawFrame()
if imgui.IsWindowHovered() and imgui.IsMouseClicked(1) then
imgui.OpenPopup('PieMenu')
end
if pie.BeginPiePopup('PieMenu', 1) then
if pie.PieMenuItem('Test1') then end
if pie.PieMenuItem('Test2') then end
--if pie.PieMenuItem('Test5') then end
if pie.PieMenuItem('Test3', false) then end
if pie.BeginPieMenu('Sub') then
if pie.BeginPieMenu('Sub sub\nmenu') then
if pie.PieMenuItem('SubSub') then end
if pie.PieMenuItem('SubSub2') then end
pie.EndPieMenu()
end
if pie.PieMenuItem('TestSub') then end
if pie.PieMenuItem('TestSub2') then end
pie.EndPieMenu()
end
pie.EndPiePopup()
end
end
function xmenu()
activ_menu = not activ_menu
sampAddChatMessage('Меню '..(activ_menu and 'включен' or 'выключен')..'.', -1)
end