我创建了一个 Derma Frame,当我在该框架上调用 Center() 时,它没有正确地居中于屏幕。
截屏:
这是代码:
local ply = LocalPlayer()
hook.Add("OnPlayerChat", "Link:lnotify:OnPlayerChat", function(ply, text, teamChat, isDead)
if(ply:IsSuperAdmin()) then
if (text == "!lnotify") then
local lnotifyAdminMenu = vgui.Create("DFrame")
lnotifyAdminMenu:Center()
lnotifyAdminMenu:SetSize(1000, 720)
lnotifyAdminMenu:ShowCloseButton(true)
lnotifyAdminMenu:MakePopup()
end
else
Derma_Message("You're not permitted to use this menu", "Access Denied", "OK")
end
end)