瀏覽代碼

Fix scaling issue for texture button focus texture.

(cherry picked from commit 1971c09e5e16c3a956558ec683ae5a1f5acd49b0)
K. S. Ernest (iFire) Lee 6 年之前
父節點
當前提交
804b68c981
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      scene/gui/texture_button.cpp

+ 1 - 2
scene/gui/texture_button.cpp

@@ -223,8 +223,7 @@ void TextureButton::_notification(int p_what) {
 			}
 			}
 			if (has_focus() && focused.is_valid()) {
 			if (has_focus() && focused.is_valid()) {
 
 
-				Rect2 drect(Point2(), get_size());
-				draw_texture_rect(focused, drect, false);
+				draw_texture_rect(focused, _position_rect, false);
 			};
 			};
 		} break;
 		} break;
 	}
 	}