SHOW:
|
|
- or go back to the newest paste.
| 1 | local panel = {}
| |
| 2 | ||
| 3 | function panel:Init() | |
| 4 | end | |
| 5 | ||
| 6 | local m=Matrix() | |
| 7 | - | local vec = Vector(20, 20, 0) |
| 7 | + | local vec = Vector(600/2, 500/2, 0) |
| 8 | local ang = Angle(0, 0.1, 0) | |
| 9 | ||
| 10 | function panel:Paint(w, h) | |
| 11 | draw.RoundedBox(8,0,0,w,h,color_black) | |
| 12 | ||
| 13 | local vec = vec + Vector(self:LocalToScreen()) | |
| 14 | ||
| 15 | m:Translate(vec) | |
| 16 | m:Rotate(ang) | |
| 17 | m:Translate(-vec) | |
| 18 | ||
| 19 | surface.SetDrawColor(Color(255,0,0,255)) | |
| 20 | ||
| 21 | cam.PushModelMatrix(m) | |
| 22 | surface.DrawRect(w/2, h/2, 128, 128) | |
| 23 | cam.PopModelMatrix() | |
| 24 | end | |
| 25 | ||
| 26 | - | if (asd) then asd:Remove() end |
| 26 | + | |
| 27 | ||
| 28 | if (t!t) then asd:Remove() end | |
| 29 | ||
| 30 | asd=vgui.Create("asda")
| |
| 31 | asd:SetSize(600,500) | |
| 32 | asd:Center() |