Hello!
I try make DFrame inside DFrame!
But 2 DFrame loses focus if i clicked on first DFrame!
sample code:
2 DFrame
[CODE]
local PANEL = {}
function PANEL:Init()
self:SetIsMenu(true)
self:SetSize(ScrW() / 4,ScrH() / 2)
self:SetPos(ScrW() - self:GetWide(),ScrH() - self:GetTall())
self.btnMaxim:Remove()
self.btnMinim:Remove()
self:SetDraggable(true)
self:SetSizable(true)
self:SetScreenLock(true)
self:SetDrawOnTop(true)
self:MakePopup()
end
function PANEL:PerformLayout()
self.btnClose:SetPos( self:GetWide() - 35, 0 )
self.btnClose:SetSize( 31, 31 )
end
derma.DefineControl( "DMessage", "Message panel", PANEL, "DFrame" )
[/CODE]
1 DFrame
[CODE]
local PANEL = {}
function PANEL:Init()
self:SizeTo(ScrW(),ScrH(),1)
self.btnMaxim:Remove()
self.btnMinim:Remove()
self.Message = vgui.Create("DImageButton",self)
self.Message:SetImage( "icon16/email.png" )
self.Message:SetSize(30,30)
self.Message.MessageCount = 99
self.Message.DoClick = function()
if (IsValid(self.MessagePanel)) then
self.MessagePanel:Close()
else
self.MessagePanel = vgui.Create("DMessage",self) or self.MessagePanel
end
end
end
derma.DefineControl( "DBase", "", PANEL, "DFrame" )
[/CODE]
How i can fix that?
nevermind, now that shit work fine!
Sorry, you need to Log In to post a reply to this thread.