Difference between revisions of "0342"
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:...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
{{OpCode | {{OpCode | ||
| games = {{Icon|t}} | | games = {{Icon|t}} | ||
− | | command = | + | | 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 9: | Line 9: | ||
}} | }} | ||
− | 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. | + | 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. Centered text cannot use [[0343|wrap x]]; instead it uses [[0344|center size]], which defaults to a size 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 == | == Keywords == | ||
− | set, draw, text, center, centre, centered | + | set, draw, intro, {{K|text}}, center, centre, centered |
Latest revision as of 00:40, 23 November 2016
- 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. Centered text cannot use wrap x; instead it uses center size, which defaults to a size 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