Class: Text

Inherits:
LiteRGSS::Text show all
Defined in:
docs/0_Dependencies.rb

Overview

Class that describes a text shown on the screen or inside a viewport

Direct Known Subclasses

Sprite_Timer, UI::SymText, UI::UserInput

Instance Attribute Summary

Attributes inherited from LiteRGSS::Text

#__index__, #align, #bold, #draw_shadow, #fill_color, #height, #italic, #nchar_draw, #opacity, #outline_color, #outline_thickness, #real_width, #size, #text, #viewport, #visible, #width, #x, #y, #z

Instance Method Summary collapse

Methods inherited from LiteRGSS::Text

#load_color, #multiline_text=, new, #set_position, #text_width

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Instance Method Details

#simple_mouse_in?(mouse_x = Mouse.x, mouse_y = Mouse.y) ⇒ Boolean

Detect if the mouse is in the sprite (without rotation and stuff like that)

Parameters:

  • mouse_x (Integer) (defaults to: Mouse.x)

    the mouse x position on the screen

  • mouse_y (Integer) (defaults to: Mouse.y)

    the mouse y position on the screen

Returns:

  • (Boolean)

Author:

  • Nuri Yuri



1479
1480
# File 'docs/0_Dependencies.rb', line 1479

def simple_mouse_in?(mouse_x = Mouse.x, mouse_y = Mouse.y)
end

#translate_mouse_coords(mouse_x = Mouse.x, mouse_y = Mouse.y) ⇒ Array(Integer, Integer)

Convert mouse coordinate on the screen to mouse coordinates on the sprite

Parameters:

  • mouse_x (Integer) (defaults to: Mouse.x)

    the mouse x position on the screen

  • mouse_y (Integer) (defaults to: Mouse.y)

    the mouse y position on the screen

Returns:

  • (Array(Integer, Integer))

    the mouse coordinates on the sprite

Author:

  • Nuri Yuri



1486
1487
# File 'docs/0_Dependencies.rb', line 1486

def translate_mouse_coords(mouse_x = Mouse.x, mouse_y = Mouse.y)
end