You have to use the onDrawGui party hook for that.
PartyComponent.onDrawGui(self, context)
It must be defined it in the party object to become active—connectors by themselves don't work unless it's already defined.
Within the hook function you gain access to the graphics context object, and its many features; two of which are for drawing text.
https://github.com/JKos/log2doc/wiki/Ob ... icscontext
The concept here, is that within the onDrawGui hook function, you can issue drawing commands with the context object. This will draw on the current frame [only]. In practice, to actually see the drawing for more than a split second, you have to draw it for each frame. So arrange the drawing commands in the hook to render the text when it is called; as it is for each frame.
If you want to be able to start & stop the effect, then you need to enclose the drawing commands behind a condition; boolean true/false works well. That way it does not call the drawing commands when the condition is false.
You can set the font size via GraphicsContext.font("large")
—Known valid values for font are: "tiny", "small", "medium", "large"
Centering is not automatic, and will be different for different resolutions/and aspects. The context object does provide the screen dimensions with: context.width & context.height