-
Notifications
You must be signed in to change notification settings - Fork 35
Improve Rich Text #124
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
base: master
Are you sure you want to change the base?
Improve Rich Text #124
Conversation
getContext().pushMatrix(); | ||
getContext().translate(getArea().x, getArea().y); | ||
Object o = this.text.getHoveringElement(getContext()); | ||
getContext().popMatrix(); | ||
return o; | ||
return this.text.getHoveringElement(context); |
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.
why are you removing the transform
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.
because it's already translated for the interactable/drawing methods, translating again makes it stop working
or perhaps it's because the RichText lines are untranslated
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.
Im confused. It was working before, was it not? And you didnt change anything where it would translate.
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.
this method wasn't used previously
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.
nvm, this method was only used in ClientScreenHandler, but now i'm using it for the interactable/draw methods in the widget itself. using it as is caused problems with the matrix translate. ClientScreenHandler would need the translate, but the widget's internal methods don't
adds an extra draw method for passing in a different text renderer
adds methods for getting last width/height
fix off by one trim
simplify getting hovered element