Hello there. I want to make a sliding effect like the next video shows to show my VGUI I created.
[url]http://youtu.be/RQqS7HFoQ6U[/url]
Here's my code:
[CODE]-- Converting the old Gesture Menu to a new one, in VGUI
local GestureMenu = {}
function GestureMenu:Init()
self.GMWindow = vgui.Create("DFrame")
self.GMWindow:SetTitle("Gesture Menu")
self.GMWindow:Dock(FILL)
self.GMWindow:DockMargin(10,654,20,20)
self.GMWindow:DockPadding(0,0,400,0)
self.GMWindow:MakePopup(true)
self.GMWindow:ShowCloseButton(false)
self.GMWindow:SetDraggable(false)
self.GMWindow:SetVisible(false)
--("If you click any of these buttons, it will trigger a custom animation!")
--("Wave", "act", "wave")
--("Laugh (HAHA)", "act", "laugh")
--("Cheer (Strange cheer)", "act", "cheer")
--("Sexy Dance", "act", "muscle")
--("Dance", "act", "dance")
--("Zombie Move", "act", "zombie")
--("Agree", "act", "agree")
--("Disagree", "act", "disagree")
--("Cmere", "act", "becon")
--("Bow", "act", "bow")
--("Sign Forward", "act", "forward")
--("Sign Regroup", "act", "group")
--("Sign Halt", "act", "halt")
--("This addon was originally made by Zergeant on Garrysmod.org, modified by Tenrys and fixed then by FreeFry.")
print("-- GESTURE MENU INITIALIZED, IF YOU HAVEN'T ALREADY, BIND '+g_menu' TO A KEY. --")
end
function GestureMenu:Show()
self.GMWindow:DockPadding(0,400,0,0)
end
function GestureMenu:Hide()
self.GMWindow:DockPadding(0,0,400,0)
end
concommand.Add("+g_menu",function() GestureMenu:Show() end)
concommand.Add("-g_menu",function() GestureMenu:Hide() end)
GestureMenu:Init()[/CODE]
Panel:MoveTo()
Thanks for the answer, gonna try that.
Sorry, you need to Log In to post a reply to this thread.