Derma Help

[lua]
usermessage.Hook(“ATMUserMessage”, function(data)
–Code generated with Derma Designer
local MoneyLabel
local DepositTextEntry
local WithdrawTextEntry
local ATMFrame

ATMFrame = vgui.Create(‘DFrame’)
ATMFrame:SetSize(ScrW() * 0.249, ScrH() * 0.357)
ATMFrame:Center()
ATMFrame:SetTitle(‘ATM Menu’)
ATMFrame:SetSizable(true)
ATMFrame:MakePopup()

MoneyLabel = vgui.Create(‘DLabel’, ATMFrame)
MoneyLabel:SetPos(ScrW() * 0.427, ScrH() * 0.656)
MoneyLabel:SetText(‘You have ‘…data:ReadLong()…’ dollars.’)
MoneyLabel:SizeToContents()

DepositTextEntry = vgui.Create(‘DTextEntry’, ATMFrame)
DepositTextEntry:SetSize(ScrW() * 0.143, ScrH() * 0.045)
DepositTextEntry:SetPos(ScrW() * 0.429, ScrH() * 0.562)
DepositTextEntry:SetText(‘Deposit’)
DepositTextEntry.OnEnter = function()
RunConsoleCommand(“atm_deposit”, DepositTextEntry:GetValue())

end

WithdrawTextEntry = vgui.Create(‘DTextEntry’, ATMFrame)
WithdrawTextEntry:SetSize(ScrW() * 0.143, ScrH() * 0.045)
WithdrawTextEntry:SetPos(ScrW() * 0.425, ScrH() * 0.471)
WithdrawTextEntry:SetText(‘Withdraw’)
WithdrawTextEntry.OnEnter = function()
RunConsoleCommand(“atm_withdraw”, WithDrawTextEntry:GetValue())

end

end)
[/lua]
Is my code. I only see the frame, I think because the other elements are being created behind it? How can I fix this?

You have to parent the other derma stuff to the frame I think. Though I don’t completely know, I normally don’t play around with derma stuff.

They are being parented.

Sort out the positioning. The positions are relative to the parent.

Thanks!