Qulex3 Posted October 28 Posted October 28 I don't know if it's technically possible to do this, but I think a GetLabelSize() should be added for the UI. While designing the main menu for my game, I had to get the width and height of the label many times. Since there is no command like GetLabelSize(), I tried to do it manually with mathematical formulas, but the result is not 100% accurate (The reason I do this with mathematical formulas is that when the window resolution changes, the font height and width change. I have to use a formula so that the width and height values of the label are appropriate for each resolution) 1 Quote
Josh Posted October 29 Posted October 29 In C++ there is a method in the Interface class I use for some positioning: int GetTextWidth(shared_ptr<Font> font, const float scale, const WString& text, const int weight); I have not documented this because I am not 100% sure how it works with DPI scaling, outside of my own usage of it. 1 Quote Let's build cool stuff and have fun.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.