spwork
I use code create a button,and the button is not a button,it’s a white square,so,how to create a button correctly or other UI element?
I use code create a button,and the button is not a button,it’s a white square,so,how to create a button correctly or other UI element?
example 02_HelloGUI
// Load XML file containing default UI style sheet
ResourceCache* cache = GetSubsystem<ResourceCache>();
XMLFile* style = cache->GetResource<XMLFile>("UI/DefaultStyle.xml");
// Set the loaded style as default style
uiRoot_->SetDefaultStyle(style);
button->SetStyleAuto();
Thank you, master, I forget SetStyleAuto()