Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local PANEL = {}
- PANEL.Base = "draggable"
- class.GetSet(PANEL, "Title", "DEAD")
- function PANEL:SetTitle(str)
- self.title:SetText(str)
- end
- function PANEL:CanDrag(button, press, pos)
- return
- button == "mouse1" and
- self:SkinHook(nil, "FrameCanDrag", pos)
- end
- --
- function PANEL:Initialize()
- -- close button
- self.close = aahh.Create("button", self)
- self.close.OnPress = function()
- self:SetDraggingAllowed(false)
- end
- self.close.OnRelease = function()
- self:Remove()
- end
- -- title
- self.title = aahh.Create("label", self)
- end
- function PANEL:OnDraw()
- self:SkinHook("draw", "FrameDraw")
- end
- function PANEL:OnPerformLayout()
- self:SkinHook("layout", "FrameLayout")
- end
- aahh.RegisterPanel(PANEL, "frame")
Advertisement
Add Comment
Please, Sign In to add comment