Class: LiteRGSS::Window
- Inherits:
-
Drawable
- Object
- Disposable
- Drawable
- LiteRGSS::Window
- Defined in:
- LiteRGSS.rb.yard.rb
Overview
Class used to show a Window object on screen.
A Window is an object that has a frame (built from #window_builder and #windowskin) and some contents that can be Sprites or Texts.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#__index__ ⇒ Integer
readonly
Internal index of the Window in the Viewport stack when it was created.
-
#active ⇒ Boolean
If the Window show the cursor.
-
#back_opacity ⇒ Integer
Opacity of the Window frame.
-
#contents_opacity ⇒ Integer
Opacity of the Window contents (sprites/texts).
-
#cursor_rect ⇒ Rect
Cursor rect giving the coordinate of the cursor and the size of the cursor (to perform zoom operations).
-
#cursorskin ⇒ Bitmap?
Cursor texture used to show the cursor when the Window is active.
-
#height ⇒ Integer
Height of the Window.
-
#opacity ⇒ Integer
Opacity of the whole Window.
-
#ox ⇒ Integer
Origin x of the contents of the Window in the Window View.
-
#oy ⇒ Integer
Origin y of the contents of the Window in the Window View.
-
#pause ⇒ Boolean
If the pause animation is shown (message).
-
#pause_x ⇒ Integer?
X coordinate of the pause sprite in the Window (if nil, middle of the window).
-
#pause_y ⇒ Integer?
Y coordinate of the pause sprite in the Window (if nil, bottom of the window).
-
#pauseskin ⇒ Bitmap?
Bitmap used to show the pause animation (there’s 4 cells organized in a 2x2 matrix to show the pause animation).
-
#stretch ⇒ Boolean
If the Window draw the frame by stretching the border (true) or by repeating the middle border tiles (false).
-
#viewport ⇒ Viewport
readonly
Viewport in which the Window is shown.
- #visible ⇒ Rect, Boolean
-
#width ⇒ Integer
Width of the Window.
-
#window_builder ⇒ Array(Integer, Integer, Integer, Integer, Interger, Integer)
The window builder of the Window.
-
#windowskin ⇒ Bitmap
Windowskin used to draw the Window frame.
-
#x ⇒ Integer
X position of the Window.
-
#y ⇒ Integer
Y position of the Window.
-
#z ⇒ Integer
Z order position of the Window in the Viewport/Graphics.
Class Method Summary collapse
-
.new(viewport)
Create a new Window.
Instance Method Summary collapse
-
#lock ⇒ self
Lock the window vertice calculation (background).
-
#locked? ⇒ Boolean
Tell if the window vertice caculation is locked or not.
-
#set_origin(ox, oy) ⇒ self
Change the contents origin x/y in the Window View.
-
#set_position(x, y) ⇒ self
Change the position of the window on screen.
-
#set_size(width, height) ⇒ self
Change the size of the window.
-
#unlock ⇒ self
Unlock the window vertice calculation and force the calculation at the same time (background).
-
#update ⇒ self
Update the iner Window Animation (pause sprite & cursor sprite).
Methods inherited from Disposable
Instance Attribute Details
#__index__ ⇒ Integer (readonly)
Returns internal index of the Window in the Viewport stack when it was created.
579 580 581 |
# File 'LiteRGSS.rb.yard.rb', line 579 def __index__ @__index__ end |
#active ⇒ Boolean
Returns if the Window show the cursor.
564 565 566 |
# File 'LiteRGSS.rb.yard.rb', line 564 def active @active end |
#back_opacity ⇒ Integer
Returns opacity of the Window frame.
570 571 572 |
# File 'LiteRGSS.rb.yard.rb', line 570 def back_opacity @back_opacity end |
#contents_opacity ⇒ Integer
Returns opacity of the Window contents (sprites/texts).
572 573 574 |
# File 'LiteRGSS.rb.yard.rb', line 572 def contents_opacity @contents_opacity end |
#cursor_rect ⇒ Rect
Returns cursor rect giving the coordinate of the cursor and the size of the cursor (to perform zoom operations).
552 553 554 |
# File 'LiteRGSS.rb.yard.rb', line 552 def cursor_rect @cursor_rect end |
#cursorskin ⇒ Bitmap?
Returns cursor texture used to show the cursor when the Window is active.
554 555 556 |
# File 'LiteRGSS.rb.yard.rb', line 554 def cursorskin @cursorskin end |
#height ⇒ Integer
Returns Height of the Window.
515 516 517 |
# File 'LiteRGSS.rb.yard.rb', line 515 def height @height end |
#opacity ⇒ Integer
Returns opacity of the whole Window.
568 569 570 |
# File 'LiteRGSS.rb.yard.rb', line 568 def opacity @opacity end |
#ox ⇒ Integer
Returns origin x of the contents of the Window in the Window View.
541 542 543 |
# File 'LiteRGSS.rb.yard.rb', line 541 def ox @ox end |
#oy ⇒ Integer
Returns origin y of the contents of the Window in the Window View.
543 544 545 |
# File 'LiteRGSS.rb.yard.rb', line 543 def oy @oy end |
#pause ⇒ Boolean
Returns if the pause animation is shown (message).
558 559 560 |
# File 'LiteRGSS.rb.yard.rb', line 558 def pause @pause end |
#pause_x ⇒ Integer?
Returns x coordinate of the pause sprite in the Window (if nil, middle of the window).
560 561 562 |
# File 'LiteRGSS.rb.yard.rb', line 560 def pause_x @pause_x end |
#pause_y ⇒ Integer?
Returns y coordinate of the pause sprite in the Window (if nil, bottom of the window).
562 563 564 |
# File 'LiteRGSS.rb.yard.rb', line 562 def pause_y @pause_y end |
#pauseskin ⇒ Bitmap?
Returns Bitmap used to show the pause animation (there’s 4 cells organized in a 2x2 matrix to show the pause animation).
556 557 558 |
# File 'LiteRGSS.rb.yard.rb', line 556 def pauseskin @pauseskin end |
#stretch ⇒ Boolean
Returns if the Window draw the frame by stretching the border (true) or by repeating the middle border tiles (false).
566 567 568 |
# File 'LiteRGSS.rb.yard.rb', line 566 def stretch @stretch end |
#viewport ⇒ Viewport (readonly)
Returns viewport in which the Window is shown.
509 510 511 |
# File 'LiteRGSS.rb.yard.rb', line 509 def @viewport end |
#visible ⇒ Rect, Boolean
577 578 579 |
# File 'LiteRGSS.rb.yard.rb', line 577 def visible @visible end |
#width ⇒ Integer
Returns Width of the Window.
513 514 515 |
# File 'LiteRGSS.rb.yard.rb', line 513 def width @width end |
#window_builder ⇒ Array(Integer, Integer, Integer, Integer, Interger, Integer)
Returns the window builder of the Window.
524 525 526 |
# File 'LiteRGSS.rb.yard.rb', line 524 def window_builder @window_builder end |
#windowskin ⇒ Bitmap
Returns Windowskin used to draw the Window frame.
511 512 513 |
# File 'LiteRGSS.rb.yard.rb', line 511 def windowskin @windowskin end |
#x ⇒ Integer
Array contain the 6 following values : [middle_tile_x, middle_tile_y, middle_tile_width, middle_tile_height, contents_border_x, contents_border_y, cb_right, cb_botton] The frame is calculated from the 4 first value, the 2 last values gives the offset in x/y between the border of the frame and the border of the contents.
Returns X position of the Window.
528 529 530 |
# File 'LiteRGSS.rb.yard.rb', line 528 def x @x end |
#y ⇒ Integer
Returns Y position of the Window.
530 531 532 |
# File 'LiteRGSS.rb.yard.rb', line 530 def y @y end |
#z ⇒ Integer
Returns z order position of the Window in the Viewport/Graphics.
539 540 541 |
# File 'LiteRGSS.rb.yard.rb', line 539 def z @z end |
Class Method Details
.new(viewport)
Create a new Window
485 486 487 |
# File 'LiteRGSS.rb.yard.rb', line 485 def self.new() end |
Instance Method Details
#lock ⇒ self
Lock the window vertice calculation (background)
495 496 497 |
# File 'LiteRGSS.rb.yard.rb', line 495 def lock end |
#locked? ⇒ Boolean
Tell if the window vertice caculation is locked or not
505 506 507 |
# File 'LiteRGSS.rb.yard.rb', line 505 def locked? end |
#set_origin(ox, oy) ⇒ self
Change the contents origin x/y in the Window View
548 549 550 |
# File 'LiteRGSS.rb.yard.rb', line 548 def set_origin(ox, oy) end |
#set_position(x, y) ⇒ self
Change the position of the window on screen
535 536 537 |
# File 'LiteRGSS.rb.yard.rb', line 535 def set_position(x, y) end |
#set_size(width, height) ⇒ self
Change the size of the window
520 521 522 |
# File 'LiteRGSS.rb.yard.rb', line 520 def set_size(width, height) end |
#unlock ⇒ self
Unlock the window vertice calculation and force the calculation at the same time (background)
500 501 502 |
# File 'LiteRGSS.rb.yard.rb', line 500 def unlock end |
#update ⇒ self
Update the iner Window Animation (pause sprite & cursor sprite)
490 491 492 |
# File 'LiteRGSS.rb.yard.rb', line 490 def update end |