Class: LiteRGSS::Window

Inherits:
Drawable show all
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

Window

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Disposable

#dispose, #disposed?

Instance Attribute Details

#__index__Integer (readonly)

Returns internal index of the Window in the Viewport stack when it was created.

Returns:

  • (Integer)

    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

#activeBoolean

Returns if the Window show the cursor.

Returns:

  • (Boolean)

    if the Window show the cursor



564
565
566
# File 'LiteRGSS.rb.yard.rb', line 564

def active
  @active
end

#back_opacityInteger

Returns opacity of the Window frame.

Returns:

  • (Integer)

    opacity of the Window frame



570
571
572
# File 'LiteRGSS.rb.yard.rb', line 570

def back_opacity
  @back_opacity
end

#contents_opacityInteger

Returns opacity of the Window contents (sprites/texts).

Returns:

  • (Integer)

    opacity of the Window contents (sprites/texts)



572
573
574
# File 'LiteRGSS.rb.yard.rb', line 572

def contents_opacity
  @contents_opacity
end

#cursor_rectRect

Returns cursor rect giving the coordinate of the cursor and the size of the cursor (to perform zoom operations).

Returns:

  • (Rect)

    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

#cursorskinBitmap?

Returns cursor texture used to show the cursor when the Window is active.

Returns:

  • (Bitmap, nil)

    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

#heightInteger

Returns Height of the Window.

Returns:

  • (Integer)

    Height of the Window



515
516
517
# File 'LiteRGSS.rb.yard.rb', line 515

def height
  @height
end

#opacityInteger

Returns opacity of the whole Window.

Returns:

  • (Integer)

    opacity of the whole Window



568
569
570
# File 'LiteRGSS.rb.yard.rb', line 568

def opacity
  @opacity
end

#oxInteger

Returns origin x of the contents of the Window in the Window View.

Returns:

  • (Integer)

    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

#oyInteger

Returns origin y of the contents of the Window in the Window View.

Returns:

  • (Integer)

    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

#pauseBoolean

Returns if the pause animation is shown (message).

Returns:

  • (Boolean)

    if the pause animation is shown (message)



558
559
560
# File 'LiteRGSS.rb.yard.rb', line 558

def pause
  @pause
end

#pause_xInteger?

Returns x coordinate of the pause sprite in the Window (if nil, middle of the window).

Returns:

  • (Integer, nil)

    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_yInteger?

Returns y coordinate of the pause sprite in the Window (if nil, bottom of the window).

Returns:

  • (Integer, nil)

    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

#pauseskinBitmap?

Returns Bitmap used to show the pause animation (there’s 4 cells organized in a 2x2 matrix to show the pause animation).

Returns:

  • (Bitmap, nil)

    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

#stretchBoolean

Returns if the Window draw the frame by stretching the border (true) or by repeating the middle border tiles (false).

Returns:

  • (Boolean)

    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

#viewportViewport (readonly)

Returns viewport in which the Window is shown.

Returns:

  • (Viewport)

    viewport in which the Window is shown



509
510
511
# File 'LiteRGSS.rb.yard.rb', line 509

def viewport
  @viewport
end

#visibleRect, Boolean

Returns:

  • (Rect)

    rect corresponding to the view of the Window (Viewport compatibility)

  • (Boolean)

    if the window is visible or not



577
578
579
# File 'LiteRGSS.rb.yard.rb', line 577

def visible
  @visible
end

#widthInteger

Returns Width of the Window.

Returns:

  • (Integer)

    Width of the Window



513
514
515
# File 'LiteRGSS.rb.yard.rb', line 513

def width
  @width
end

#window_builderArray(Integer, Integer, Integer, Integer, Interger, Integer)

Returns the window builder of the Window.

Returns:

  • (Array(Integer, Integer, Integer, Integer, Interger, Integer))

    the window builder of the Window



524
525
526
# File 'LiteRGSS.rb.yard.rb', line 524

def window_builder
  @window_builder
end

#windowskinBitmap

Returns Windowskin used to draw the Window frame.

Returns:

  • (Bitmap)

    Windowskin used to draw the Window frame



511
512
513
# File 'LiteRGSS.rb.yard.rb', line 511

def windowskin
  @windowskin
end

#xInteger

Note:

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.

Returns:

  • (Integer)

    X position of the Window



528
529
530
# File 'LiteRGSS.rb.yard.rb', line 528

def x
  @x
end

#yInteger

Returns Y position of the Window.

Returns:

  • (Integer)

    Y position of the Window



530
531
532
# File 'LiteRGSS.rb.yard.rb', line 530

def y
  @y
end

#zInteger

Returns z order position of the Window in the Viewport/Graphics.

Returns:

  • (Integer)

    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

Parameters:



485
486
487
# File 'LiteRGSS.rb.yard.rb', line 485

def self.new(viewport)

end

Instance Method Details

#lockself

Lock the window vertice calculation (background)

Returns:

  • (self)


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

Returns:

  • (Boolean)


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

Parameters:

  • ox (Integer)
  • oy (Integer)

Returns:

  • (self)


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

Parameters:

  • x (Integer)

    new x position

  • y (Integer)

    new y position

Returns:

  • (self)


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

Parameters:

  • width (Integer)

    new width

  • height (Integer)

    new height

Returns:

  • (self)


520
521
522
# File 'LiteRGSS.rb.yard.rb', line 520

def set_size(width, height)

end

#unlockself

Unlock the window vertice calculation and force the calculation at the same time (background)

Returns:

  • (self)


500
501
502
# File 'LiteRGSS.rb.yard.rb', line 500

def unlock

end

#updateself

Update the iner Window Animation (pause sprite & cursor sprite)

Returns:

  • (self)


490
491
492
# File 'LiteRGSS.rb.yard.rb', line 490

def update

end