Hi, I’m trying to change the size of a text block, but first of all, in the Text_block class you cant call a funcation to do it, that i thing thats one of the most importants things you need in this case. Furhtermore i am readyng that in the own canvas_slot you can change the size of a widget, but it doesnt change the text size.
Do qnybody knows how to do this?
1 Like
Doesn’t look like you can, at least now.
Looking at the code I see: justification, clipping, the text itself, color, opacity, and overflow policy.
I don’t see either size or font.
From UnrealEngine.digest.verse…
text_justification<native><public> := enum:
Left
Center
Right
InvariantLeft
InvariantRight
# Text overflow policy values:
# Clip: Overflowing text will be clipped.
# Ellipsis: Overflowing text will be replaced with an ellipsis.
text_overflow_policy<native><public> := enum:
Clip
Ellipsis
# Base widget for text widget.
text_base<native><public> := class<abstract>(widget):
# The text to display to the user. Used only during initialization of the widget and not modified by SetText.
DefaultText<native><localizes><public>:message = external {}
# The color of the displayed text. Used only during initialization of the widget and not modified by SetTextColor.
DefaultTextColor<native><public>:color = external {}
# The opacity of the displayed text. Used only during initialization of the widget and not modified by SetTextOpacity.
DefaultTextOpacity<native><public>:type {_X:float where 0.000000 <= _X, _X <= 1.000000} = external {}
# The justification to display to the user. Used only during initialization of the widget and not modified by SetJustification.
DefaultJustification<native><public>:text_justification = external {}
# The policy that determine what happens when the text is longer than its allowed length.
# Used only during initialization of the widget and not modified by SetOverflowPolicy.
DefaultOverflowPolicy<native><public>:text_overflow_policy = external {}
# Sets the text displayed in the widget.
SetText<native><public>(InText:message):void
# Gets the text currently in the widget.
GetText<native><public>():[]char
# Sets the text justification in the widget.
SetJustification<native><public>(InJustification:text_justification):void
# Gets the text justification in the widget.
GetJustification<native><public>():text_justification
# Sets the policy that determine what happens when the text is longer than its allowed length.
SetOverflowPolicy<native><public>(InOverflowPolicy:text_overflow_policy):void
# Gets the policy that determine what happens when the text is longer than its allowed length.
GetOverflowPolicy<native><public>():text_overflow_policy
# Sets the color of the displayed text.
SetTextColor<native><public>(InColor:color):void
# Gets the color of the displayed text.
GetTextColor<native><public>():color
# Sets the opacity of the displayed text.
SetTextOpacity<native><public>(InOpacity:type {_X:float where 0.000000 <= _X, _X <= 1.000000}):void
# Gets the opacity of the displayed text.
GetTextOpacity<native><public>():type {_X:float where 0.000000 <= _X, _X <= 1.000000}
1 Like
Correct, there is no way to change the text size at this time.
1 Like
There are only two work-arounds that I am aware of and neither handles dynamic text (unless you get very tricky): using the widget designer instead of code then you have to use the HUD device to display. And putting the text in a texture file and displaying it as a texture block. Neither is ideal.
2 Likes
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.