CenterText
CenterText Xpos, Ypos, StringOrValue
 
Parameters:

    Xpos= The X coordinate of where the text should be displayed
    Ypos= The Y coordinate of where the text should be displayed
    StringOrValue = The String or Value that you wish to be displayed
Returns: NONE
 

CenterText will display a String or Value to the screen at a user specified position. The message will be centered around it's X axis when drawn.



FACTS:


* Using either Text or CenterText does not alter the 'Print Cursor' position that the Print command uses.

* CenterText will display any information using the current FONT.

* CenterText renders to the current surface, except when the user either CaptureToScene, or CaptureToWorld are activated. In either situation, the draw request will be add edto the scene or world queues.




Mini Tutorial:


This simple example, displays some messages to the screen.

  
  
; Display a message at position 100(x),150(y)
  Text 100,150,"Hello World"
  
; Display a centered message around position 100(x),170(y)
  CenterText 100,170,"Hello World"
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



This example would display.

  
  Hello World
  

 
Related Info: Print | SetFont | Text :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com