Token -> Text
Token -> Text#
- class miniworldmaker.tokens.token_plugins.text_token.text_token.Text(position=None, text=' ')[source]
A Text-Token is a token which contains a Text.
You have to set the sget_tokens_atize of the token with self.size() manually so that the complete text can be seen.
- Parameters
position – Top-Left position of Text.
text – The initial text
Examples
Create a new text_token:
self.text = TextToken((1,1), "Hello World")
- font_by_size(width=None, height=None)[source]
- property font_size
- get_text()[source]
Gets the currently displayed text
- Returns
The currently displayed text
- get_text_width()[source]
- property max_width
- new_costume()[source]
- on_shape_change()[source]
- set_text(text)[source]
Sets the text of the token
- Parameters
text – The text
- property text
changes the text.