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 have a custom class written that is identical to Text that I am calling DynamicText. The only difference is that instead of std::string text_;, I have std::string* _text; so that I can maintain an array of strings in the background without having to create a new Text object if the string changes. I also modified the Node class so that I can return the children_ and do something like Node::GetChildren().at(0) |= inverted;. This is really convenient feature that I can make my DynamicText object toggle its invertedness. I tried this same method for setting its color Node::GetChildren().at(0) |= color(Red), but color seems to work slightly differently than inverted. Once the color is set I can't change the color again unless I create a new DynamicText object. Is their a mechanism to set the color of a Text object similar to how inverted works?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a custom class written that is identical to Text that I am calling DynamicText. The only difference is that instead of
std::string text_;
, I havestd::string* _text;
so that I can maintain an array of strings in the background without having to create a new Text object if the string changes. I also modified the Node class so that I can return the children_ and do something likeNode::GetChildren().at(0) |= inverted;
. This is really convenient feature that I can make my DynamicText object toggle its invertedness. I tried this same method for setting its colorNode::GetChildren().at(0) |= color(Red)
, but color seems to work slightly differently than inverted. Once the color is set I can't change the color again unless I create a new DynamicText object. Is their a mechanism to set the color of a Text object similar to how inverted works?Beta Was this translation helpful? Give feedback.
All reactions