Class: Window

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

Overview

A Window is an object that has a frame (built from #window_builder and #windowskin) and some contents that can be Sprites or Texts.

Instance Attribute Summary

Attributes inherited from LiteRGSS::Window

#__index__, #active, #back_opacity, #contents_opacity, #cursor_rect, #cursorskin, #height, #opacity, #ox, #oy, #pause, #pause_x, #pause_y, #pauseskin, #stretch, #viewport, #visible, #width, #window_builder, #windowskin, #x, #y, #z

Instance Method Summary collapse

Methods inherited from LiteRGSS::Window

#initialize, #lock, #locked?, #set_origin, #set_position, #set_size, #unlock, #update

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Constructor Details

This class inherits a constructor from LiteRGSS::Window

Instance Method Details

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

Detect if the mouse is in the window

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



1651
1652
# File 'docs/0_Dependencies.rb', line 1651

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 window

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 window

Author:

  • Nuri Yuri



1658
1659
# File 'docs/0_Dependencies.rb', line 1658

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