Summary

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.
Draws the part of the notice that has been typed out so far at the left side of the screen, below its middle.
Wraps the text of the notice and splits its lines into the characters to type out.
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

typewriter_style:advance(display, typed)

client plugins/areadisplay/plugin/lib/sh_styles.lua:212

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 typed and typed_lines fields 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:258

Draws 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

typewriter_style:layout(display, scrw)

client plugins/areadisplay/plugin/lib/sh_styles.lua:171

Wraps the text of the notice and splits its lines into the characters to type out.

Parameters

  • display Map the notice; its lines, line_chars and char_count fields are set
  • scrw Number screen width the layout is made for

typewriter_style:start(display)

client plugins/areadisplay/plugin/lib/sh_styles.lua:196

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

Defined in