Class: Window

Inherits:
Object
  • Object
show all
Defined in:
lib/window.rb

Overview

The game window class. Created internally from multiple sprites.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(viewport = nil) ⇒ Window


74
75
76
77
78
# File 'lib/window.rb', line 74

def initialize(viewport = nil)
  raise "not implemented"

  @viewport = viewport
end

Instance Attribute Details

#activeObject

Cursor blink status. If TRUE, the cursor is blinking.


21
22
23
# File 'lib/window.rb', line 21

def active
  @active
end

#back_opacityObject

The window background's opacity (0-255). Values out of range are automatically corrected.


64
65
66
# File 'lib/window.rb', line 64

def back_opacity
  @back_opacity
end

#contentsObject

Refers to the Bitmap used for the window's contents.


9
10
11
# File 'lib/window.rb', line 9

def contents
  @contents
end

#contents_opacityObject

The opacity of the window's contents (0-255). Values out of range are automatically corrected.


68
69
70
# File 'lib/window.rb', line 68

def contents_opacity
  @contents_opacity
end

#cursor_rectObject

The cursor box (Rect). Sets the window's upper left corner using relative coordinates (-16, -16).


18
19
20
# File 'lib/window.rb', line 18

def cursor_rect
  @cursor_rect
end

#heightObject

The window's height.


41
42
43
# File 'lib/window.rb', line 41

def height
  @height
end

#opacityObject

The window's opacity (0-255). Values out of range are automatically corrected.


60
61
62
# File 'lib/window.rb', line 60

def opacity
  @opacity
end

#oxObject

The X-coordinate of the starting point of the window's contents. Change this value to scroll the window's contents.


52
53
54
# File 'lib/window.rb', line 52

def ox
  @ox
end

#oyObject

The Y-coordinate of the starting point of the window's contents. Change this value to scroll the window's contents.


56
57
58
# File 'lib/window.rb', line 56

def oy
  @oy
end

#pauseObject

The pause graphic's visibility. This is a symbol that appears in the message window when waiting for the player to press a button. If TRUE, the graphic is visible.


29
30
31
# File 'lib/window.rb', line 29

def pause
  @pause
end

#stretchObject

The wallpaper display method. If TRUE, stretches the wallpaper graphic; if FALSE, tiles it. The default value is TRUE.


13
14
15
# File 'lib/window.rb', line 13

def stretch
  @stretch
end

#viewportObject (readonly)

Gets the Viewport specified when the window was created.


72
73
74
# File 'lib/window.rb', line 72

def viewport
  @viewport
end

#visibleObject

The window's visibility. If TRUE, the window is visible.


24
25
26
# File 'lib/window.rb', line 24

def visible
  @visible
end

#widthObject

The window's width.


38
39
40
# File 'lib/window.rb', line 38

def width
  @width
end

#windowskinObject

Refers to the Bitmap used as a windowskin.


5
6
7
# File 'lib/window.rb', line 5

def windowskin
  @windowskin
end

#xObject

The window's X-coordinate.


32
33
34
# File 'lib/window.rb', line 32

def x
  @x
end

#yObject

The window's Y-coordinate.


35
36
37
# File 'lib/window.rb', line 35

def y
  @y
end

#zObject

The window's Z-coordinate. The larger this value, the closer to the player the window will be displayed. If multiple objects share the same Z-coordinate, the more recently created object will be displayed closest to the player. The Z-coordinate of the window's contents equals the window background's Z-coordinate plus 2.


48
49
50
# File 'lib/window.rb', line 48

def z
  @z
end

Instance Method Details

#disposeObject

Frees the window. If the window has already been freed, does nothing.


81
82
83
84
85
# File 'lib/window.rb', line 81

def dispose
  raise "not implemented"

  @disposed = true
end

#disposed?Boolean

Returns TRUE if the window has been freed.


88
89
90
# File 'lib/window.rb', line 88

def disposed?
  @disposed
end

#updateObject

Refreshes the cursor blink and the pause graphic animation. As a rule, this method is called once per frame.


94
95
96
# File 'lib/window.rb', line 94

def update
  raise "not implemented"
end