Permalink
Browse files

Added waitforenter key for DProperty_Generic

For entity editing
  • Loading branch information...
1 parent 723a7fc commit bec7647eadd8fd7c128b8250e82fa735b4f8734e @robotboy655 robotboy655 committed Aug 28, 2014
Showing with 4 additions and 6 deletions.
  1. +4 −6 garrysmod/lua/vgui/prop_generic.lua
@@ -7,11 +7,9 @@
local PANEL = {}
-AccessorFunc( PANEL, "m_pRow", "Row" )
+AccessorFunc( PANEL, "m_pRow", "Row" )
function PANEL:Init()
-
-
end
function PANEL:Think()
@@ -45,7 +43,7 @@ function PANEL:Setup( vars )
self:Clear()
local text = self:Add( "DTextEntry" )
- text:SetUpdateOnType( true )
+ if ( !vars.waitforenter ) then text:SetUpdateOnType( true ) end
text:SetDrawBackground( false )
text:Dock( FILL )
@@ -61,11 +59,11 @@ function PANEL:Setup( vars )
-- Alert row that value changed
text.OnValueChange = function( text, newval )
-
+
self:ValueChanged( newval )
end
end
-derma.DefineControl( "DProperty_Generic", "", PANEL, "Panel" )
+derma.DefineControl( "DProperty_Generic", "", PANEL, "Panel" )

0 comments on commit bec7647

Please sign in to comment.