Class: LiteRGSS::Text
- Inherits:
-
Drawable
- Object
- Disposable
- Drawable
- LiteRGSS::Text
- Defined in:
- LiteRGSS.rb.yard.rb,
docs/0_Dependencies.rb
Overview
Text cannot be saved, loaded from file nor cloned in the memory
Class that describes a text shown on the screen or inside a viewport
Direct Known Subclasses
Defined Under Namespace
Modules: Util
Instance Attribute Summary collapse
-
#__index__ ⇒ Integer
readonly
Return the text index to know if it has been created before an other sprite/text/viewport in the same viewport.
-
#align ⇒ Integer
The alignment of the text (0 = left, 1 = center, 2 = right).
-
#bold ⇒ Boolean
If the text should be shown in bold.
-
#draw_shadow ⇒ Boolean
If the text is drawn as in Pokemon DPP / RSE / HGSS / BW (with shadow).
-
#fill_color ⇒ Color
The inside color of the text.
-
#height ⇒ Numeric
The height of the text surface.
-
#italic ⇒ Boolean
If the text should be shown in italic.
-
#nchar_draw ⇒ Integer
The number of character the object should draw.
-
#opacity ⇒ Integer
Opacity of the text.
-
#outline_color ⇒ Color
The color of the outline.
-
#outline_thickness ⇒ Integer
The size of the text outline.
-
#real_width ⇒ Integer
readonly
Return the real width of the text.
-
#size ⇒ Integer
The font size of the text.
-
#text ⇒ String
Text shown by this Object.
-
#viewport ⇒ Viewport, Window
readonly
Return the Text viewport.
-
#visible ⇒ Boolean
If the Text is visible.
-
#width ⇒ Numeric
The width of the text surface.
-
#x ⇒ Numeric
The x coordinate of the text surface.
-
#y ⇒ Numeric
The y coordinate of the text surface.
-
#z ⇒ Numeric
The Text z property.
Class Method Summary collapse
-
.new(font_id, viewport, x, y, width, height, str, align = 0, outlinesize = nil, color_id = nil, size_id = nil)
Create a new Text.
Instance Method Summary collapse
-
#load_color(font_id) ⇒ self
Load a color from a font_id.
-
#multiline_text=(value)
Set a multiline text.
-
#set_position(x, y) ⇒ self
Define the position of the text.
-
#text_width(text) ⇒ Integer
Return the width of the given string if drawn by this Text object.
Methods inherited from Disposable
Instance Attribute Details
#__index__ ⇒ Integer (readonly)
Return the text index to know if it has been created before an other sprite/text/viewport in the same viewport
471 472 473 |
# File 'LiteRGSS.rb.yard.rb', line 471 def __index__ @__index__ end |
#align ⇒ Integer
Returns The alignment of the text (0 = left, 1 = center, 2 = right).
439 440 441 |
# File 'LiteRGSS.rb.yard.rb', line 439 def align @align end |
#bold ⇒ Boolean
Returns If the text should be shown in bold.
477 478 479 |
# File 'LiteRGSS.rb.yard.rb', line 477 def bold @bold end |
#draw_shadow ⇒ Boolean
Returns If the text is drawn as in Pokemon DPP / RSE / HGSS / BW (with shadow).
455 456 457 |
# File 'LiteRGSS.rb.yard.rb', line 455 def draw_shadow @draw_shadow end |
#fill_color ⇒ Color
Returns The inside color of the text.
441 442 443 |
# File 'LiteRGSS.rb.yard.rb', line 441 def fill_color @fill_color end |
#height ⇒ Numeric
Returns The height of the text surface.
433 434 435 |
# File 'LiteRGSS.rb.yard.rb', line 433 def height @height end |
#italic ⇒ Boolean
Returns If the text should be shown in italic.
475 476 477 |
# File 'LiteRGSS.rb.yard.rb', line 475 def italic @italic end |
#nchar_draw ⇒ Integer
Returns The number of character the object should draw.
457 458 459 |
# File 'LiteRGSS.rb.yard.rb', line 457 def nchar_draw @nchar_draw end |
#opacity ⇒ Integer
Returns Opacity of the text.
461 462 463 |
# File 'LiteRGSS.rb.yard.rb', line 461 def opacity @opacity end |
#outline_color ⇒ Color
Returns The color of the outline.
443 444 445 |
# File 'LiteRGSS.rb.yard.rb', line 443 def outline_color @outline_color end |
#outline_thickness ⇒ Integer
Returns The size of the text outline.
435 436 437 |
# File 'LiteRGSS.rb.yard.rb', line 435 def outline_thickness @outline_thickness end |
#real_width ⇒ Integer (readonly)
Return the real width of the text
459 460 461 |
# File 'LiteRGSS.rb.yard.rb', line 459 def real_width @real_width end |
#size ⇒ Integer
Returns The font size of the text.
437 438 439 |
# File 'LiteRGSS.rb.yard.rb', line 437 def size @size end |
#text ⇒ String
Returns Text shown by this Object.
451 452 453 |
# File 'LiteRGSS.rb.yard.rb', line 451 def text @text end |
#viewport ⇒ Viewport, Window (readonly)
Return the Text viewport
473 474 475 |
# File 'LiteRGSS.rb.yard.rb', line 473 def @viewport end |
#visible ⇒ Boolean
Returns If the Text is visible.
453 454 455 |
# File 'LiteRGSS.rb.yard.rb', line 453 def visible @visible end |
#width ⇒ Numeric
Returns The width of the text surface.
431 432 433 |
# File 'LiteRGSS.rb.yard.rb', line 431 def width @width end |
#x ⇒ Numeric
Returns The x coordinate of the text surface.
427 428 429 |
# File 'LiteRGSS.rb.yard.rb', line 427 def x @x end |
#y ⇒ Numeric
Returns The y coordinate of the text surface.
429 430 431 |
# File 'LiteRGSS.rb.yard.rb', line 429 def y @y end |
#z ⇒ Numeric
Returns The Text z property.
469 470 471 |
# File 'LiteRGSS.rb.yard.rb', line 469 def z @z end |
Class Method Details
.new(font_id, viewport, x, y, width, height, str, align = 0, outlinesize = nil, color_id = nil, size_id = nil)
Create a new Text
416 417 418 |
# File 'LiteRGSS.rb.yard.rb', line 416 def self.new(font_id, , x, y, width, height, str, align = 0, outlinesize = nil, color_id = nil, size_id = nil) end |
Instance Method Details
#load_color(font_id) ⇒ self
Load a color from a font_id
447 448 449 |
# File 'LiteRGSS.rb.yard.rb', line 447 def load_color(font_id) end |
#multiline_text=(value)
Set a multiline text
1541 1542 |
# File 'docs/0_Dependencies.rb', line 1541 def multiline_text=(value) end |
#set_position(x, y) ⇒ self
Define the position of the text
423 424 425 |
# File 'LiteRGSS.rb.yard.rb', line 423 def set_position(x, y) end |
#text_width(text) ⇒ Integer
Return the width of the given string if drawn by this Text object
465 466 467 |
# File 'LiteRGSS.rb.yard.rb', line 465 def text_width(text) end |