Difference between revisions of "0342"

From GTAMods Wiki
Jump to navigation Jump to search
(Created page with "thumb|0342 in action {{OpCode | games = {{Icon|t}} | command = SET_TEXT_CENTRE | description = Sets the centering of the text | syntax1 = 0342:...")
 
m
Line 2: Line 2:
 
{{OpCode
 
{{OpCode
 
| games      = {{Icon|t}}
 
| games      = {{Icon|t}}
| command    = SET_TEXT_CENTRE
+
| command    = SET_<wbr>TEXT_<wbr>CENTRE
| description = Sets the centering of the text
+
| description = Sets the centering of the [[Text#Intro text|text]]
 
| syntax1    = 0342: set_text_draw_centered [''int'']
 
| syntax1    = 0342: set_text_draw_centered [''int'']
 
| p1t        = [''int'']
 
| p1t        = [''int'']
Line 12: Line 12:
  
 
== Keywords ==
 
== Keywords ==
set, draw, text, center, centre, centered
+
set, draw, intro, {{K|text}}, center, centre, centered

Revision as of 05:55, 2 November 2016

0342 in action

GTA III Vice City San Andreas SET_TEXT_CENTRE


Description
Sets the centering of the text
Syntax
0342: set_text_draw_centered [int]
Parameter
[int]
0 = not centered (default), 1 = centered

This opcode sets the horizontal centering of the text, which is not centered by default. Without centering, the text uses the left side of the text to position itself. With centering, it uses the center of the text to position itself. If the background of the text is on, centering the text causes the background to also center and stretch to a length of 640.0. The lead image on this page shows text displayed in Vice City at the x position of 100.0 and y positions starting at 10.0 and separated by 20.0 each. The first two lines are not centered, the next two lines are centered, the next line is not centered with background on, and the final line is centered with background on.

Keywords

set, draw, intro, text, center, centre, centered