Permalink
Browse files

DFrom.ComboBox properly updates the given convar

  • Loading branch information...
1 parent 6ed5e89 commit 08da4b621760d1525aa53682a101cb58c74cb8f4 @robotboy655 robotboy655 committed Jan 4, 2015
Showing with 3 additions and 0 deletions.
  1. +3 −0 garrysmod/lua/vgui/dform.lua
@@ -128,6 +128,9 @@ function PANEL:ComboBox( strLabel, strConVar )
local right = vgui.Create( "DComboBox", self )
right:SetConVar( strConVar )
right:Dock( FILL )
+ function right:OnSelect( index, value, data )
+ RunConsoleCommand( self.m_strConVar, tostring( data or value ) )
+ end
self:AddItem( left, right )

0 comments on commit 08da4b6

Please sign in to comment.