You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to avoid code duplication so first I thought that I creating a common function for converting the FontAttribute and the Juce::Font would be the way to go. But after further peeking the code creating a TextDrawingComponent and a NumberComponent would look like a better idea, as there are many code pieces which are redundant (text alignment, etc.)
What do you think about this approach?
The text was updated successfully, but these errors were encountered:
One reason they are not combined right now is because they inherit from isobus::OutputNumber vs isobus::InputNumber for example, which allows for convenient use of isobus::VTObject::get_object_type and other things like that. In theory I'm not opposed to combining them but there will probably be other things that need to get re-done to make that happen, or at the very least you may need to override some virtual functions in creative ways
One reason they are not combined right now is because they inherit from isobus::OutputNumber vs isobus::InputNumber for example, which allows for convenient use of isobus::VTObject::get_object_type and other things like that. In theory I'm not opposed to combining them but there will probably be other things that need to get re-done to make that happen, or at the very least you may need to override some virtual functions in creative ways
Thanks for the answer, I will sort it out and get back for review.
I came across a formatting issue with an InputNumber (underline was not present).
The reason is the fact that the font flags are not handled here:
https://github.com/Open-Agriculture/AgIsoVirtualTerminal/blob/main/src/InputNumberComponent.cpp#L47
At the input strings they are handled:
https://github.com/Open-Agriculture/AgIsoVirtualTerminal/blob/main/src/InputStringComponent.cpp#L42
I would like to avoid code duplication so first I thought that I creating a common function for converting the FontAttribute and the Juce::Font would be the way to go. But after further peeking the code creating a TextDrawingComponent and a NumberComponent would look like a better idea, as there are many code pieces which are redundant (text alignment, etc.)
What do you think about this approach?
The text was updated successfully, but these errors were encountered: