-
-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: #1992 Add top, right, bottom, left alignment for CUIStatic #1337
Conversation
633cb6c
to
89827b6
Compare
89827b6
to
913fd0e
Compare
@@ -1058,32 +1058,62 @@ void CUIXmlInitBase::ApplyAlign(float& x, float& y, u32 align) | |||
|
|||
////////////////////////////////////////////////////////////////////////// | |||
|
|||
// source: https://stackoverflow.com/questions/650162/why-cant-the-switch-statement-be-applied-to-strings | |||
constexpr uint32_t hash(const std::string_view data) noexcept |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Xottab-DUTY can you advise where to put this function? It can be used to refactor other large if statement blocks with strings -> switch cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't merged this PR in time only because I was thinking where to put this function, and then decided to think a bit later, and...
Just screw this "thinking". 😆 I'll just merge this, it's ok to keep this function here for now..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically, this should be put somewhere in xrCore.
@Hrusteckiy, hurray! Ura!!! I really like this PR has 1337th number, hehe. |
I'm glad, will check. |
Resolves #1192
Example:
Example code in ui_custom_msgs.xml: