Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class "CEditField"
- {
- m_X = 0;
- m_Y = 0;
- m_Width = 0;
- m_Height = 0;
- m_Text = "";
- m_Parent = false;
- }
- function CEditField:CEditField( X, Y, Width, Height, Text, Parent )
- self.m_X = X;
- self.m_Y = Y;
- self.m_Width = Width;
- self.m_Height = Height;
- self.m_Text = Text;
- self.m_Parent = Parent;
- end
- function CEditField:Destroy()
- self = nil;
- end
- local EditField = {};
- addCommandHandler( "ef",
- function( Cmd, X, Y, Width, Height, Text, Parent )
- for i = 1, 10000 do
- EditField[ #EditField + 1 ] = CEditField( tonumber( X ), tonumber( Y ), tonumber( Width ), tonumber( Height ), tonumber( Text ), tonumber( Parent ) );
- end
- end
- )
- addCommandHandler( "def",
- function()
- for i, v in ipairs( EditField ) do
- v:Destroy();
- end
- collectgarbage();
- end
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement