This wiki has been moved to https://github.com/SuperTux/wiki into the mediawiki branch.

Difference between revisions of "ScriptingText"

From SuperTux
Jump to: navigation, search
m (Bot-aided spell checker)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
  
= Summary =
+
== Summary ==
 
This module provides access to methods responsible for displaying text on-screen.
 
This module provides access to methods responsible for displaying text on-screen.
  
= Methods =
+
== Instances ==
 +
An eponymous instance (<tt>Text</tt>) can be accessed from scripts. The console allows a <tt>sector.Text</tt>.
 +
 
 +
== Methods ==
 
{| class="objectlist"
 
{| class="objectlist"
 
! class="method"| set_text(string text)
 
! class="method"| set_text(string text)
Line 25: Line 28:
 
|}
 
|}
  
= Constants =
+
== Constants ==
  
 
None
 
None
  
 
[[Category:Scripting Reference]]
 
[[Category:Scripting Reference]]

Revision as of 05:49, 25 June 2007


Summary

This module provides access to methods responsible for displaying text on-screen.

Instances

An eponymous instance (Text) can be accessed from scripts. The console allows a sector.Text.

Methods

set_text(string text) Sets the text string to be displayed to text.
set_font(string font) Sets the font of the text to be displayed to text. Currently valid values are gold, white, blue, gray, big and small.
fade_in(float time) Fades in the specified text for the next time seconds.
fade_out(float time) Just the opposite of fade_in.
set_visible(bool visible) Shows or hides the text abruptly (drastic counterpart to fade_in and fade_out).
set_centered(bool centered) If centered is true, the text will be centered on the screen. Otherwise, it will be left-aligned.

Constants

None