typewriter_style objectclient
Object table typewriter_style in plugin/lib/sh_styles.lua
Part of Area Display
Summary
Methods
advance(display, typed)client
Updates the part of the text that has been typed out so far and plays the typing sound if a new character other than a space has appeared.
Draws the part of the notice that has been typed out so far at the left side of the screen, below its middle.
layout(display, scrw)client
Wraps the text of the notice and splits its lines into the characters to type out.
start(display)client
Prepares the notice for typing: it appears at once instead of fading in, and stays for as long as it takes to type it out on top of its usual time.
Methods
Updates the part of the text that has been typed out so far and plays the typing sound if a new character other than a space has appeared.
Parameters
- display Map the notice; its
typedandtyped_linesfields are set - typed Number how many characters of the text are typed out
typewriter_style:draw(display, alpha, scrw, scrh, offset)
client plugins/areadisplay/plugin/lib/sh_styles.lua:258Draws the part of the notice that has been typed out so far at the left side of the screen, below its middle.
Parameters
- display Map the notice
- alpha Number opacity of the notice, from 0 to 255
- scrw Number screen width
- scrh Number screen height
- offset Number height taken by the notices of this style drawn before this one
Returns
- Number height the notice took
Wraps the text of the notice and splits its lines into the characters to type out.
Parameters
- display Map the notice; its
lines,line_charsandchar_countfields are set - scrw Number screen width the layout is made for
Prepares the notice for typing: it appears at once instead of fading in, and stays for as long as it takes to type it out on top of its usual time.
Parameters
- display Map the notice