Advertisement
Guest User

Untitled

a guest
Aug 27th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. class "CEditField"
  2. {
  3.     m_X = 0;
  4.     m_Y = 0;
  5.     m_Width = 0;
  6.     m_Height = 0;
  7.     m_Text = "";
  8.     m_Parent = false;
  9. }
  10.  
  11. function CEditField:CEditField( X, Y, Width, Height, Text, Parent )
  12.     self.m_X = X;
  13.     self.m_Y = Y;
  14.     self.m_Width = Width;
  15.     self.m_Height = Height;
  16.     self.m_Text = Text;
  17.     self.m_Parent = Parent;
  18. end
  19.  
  20.  
  21. function CEditField:_CEditField()
  22.     self.m_X = NULL;
  23.     self.m_Y = NULL;
  24.     self.m_Width = NULL;
  25.     self.m_Height = NULL;
  26.     self.m_Text = NULL;
  27.     self.m_Parent = NULL;
  28. end
  29.  
  30.  
  31.  
  32. local EditField = {};
  33. addCommandHandler( "ef",
  34.     function( Cmd, X, Y, Width, Height, Text, Parent )
  35.         for i = 1, 10000 do
  36.             EditField[ #EditField + 1 ] = CEditField( tonumber( X ), tonumber( Y ), tonumber( Width ), tonumber( Height ), tonumber( Text ), tonumber( Parent ) );
  37.         end
  38.     end
  39. )
  40.  
  41. addCommandHandler( "def",
  42.     function()
  43.         for i, v in ipairs( EditField ) do
  44.             delete( v );
  45.         end
  46.     end
  47. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement