Browse Source

Fix: Assign new texture when CustomWidget size changes

John Dodis 1 year ago
parent
commit
6b07ddda9f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ui2d/ui2d.lua

+ 1 - 1
ui2d/ui2d.lua

@@ -1803,7 +1803,7 @@ function UI2D.CustomWidget( name, width, height )
 			cur_window.cw[ idx ].width = width
 			cur_window.cw[ idx ].width = width
 			cur_window.cw[ idx ].height = height
 			cur_window.cw[ idx ].height = height
 			framework.ReleaseTexture()
 			framework.ReleaseTexture()
-			framework.NewTexture( width, height )
+			cur_window.cw[ idx ].texture = framework.NewTexture( width, height )
 			framework.SetCanvas( cur_window.cw[ idx ].pass, cur_window.cw[ idx ].texture )
 			framework.SetCanvas( cur_window.cw[ idx ].pass, cur_window.cw[ idx ].texture )
 		end
 		end
 	end
 	end