diff --git a/cocos/ui/UIButton.h b/cocos/ui/UIButton.h index 3d097cf55c..04a8a65425 100644 --- a/cocos/ui/UIButton.h +++ b/cocos/ui/UIButton.h @@ -341,7 +341,7 @@ protected: void disabledTextureScaleChangedWithSize(); virtual void adaptRenderers() override; - void updateTitleLocation(); + virtual void updateTitleLocation(); void updateContentSize(); virtual void createTitleRenderer(); bool createTitleRendererIfNull();