Class: Window

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Window

Returns a new instance of Window.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/rgss3/window.rb', line 26

def initialize(*args)
  @contents_sprite = Sprite.new
  self.contents = Bitmap.new(1, 1)
  @opacity = 255
  @cursor_rect = Rect.new
  @padding = 8
  @padding_bottom = 8
  @pause = false
  @arrows_visible = true
  @active = true
  @openness = 255
  @visible = true
  @z = 100
  @ox = 0
  @oy = 0
  @tone = Tone.new
  @back_opacity = 192
  @contents_opacity = 255
  case args.size
  when 0
    self.x = 0
    self.y = 0
    @width = 0
    @height = 0
  when 4
    self.x, self.y, @width, @height = args
  end
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



11
12
13
# File 'lib/rgss3/window.rb', line 11

def active
  @active
end

#arrows_visibleObject

Returns the value of attribute arrows_visible.



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

def arrows_visible
  @arrows_visible
end

#back_opacityObject

Returns the value of attribute back_opacity.



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

def back_opacity
  @back_opacity
end

#contentsObject

Returns the value of attribute contents.



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

def contents
  @contents
end

#contents_opacityObject

Returns the value of attribute contents_opacity.



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

def contents_opacity
  @contents_opacity
end

#cursor_rectObject

Returns the value of attribute cursor_rect.



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

def cursor_rect
  @cursor_rect
end

#heightObject

Returns the value of attribute height.



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

def height
  @height
end

#opacityObject

Returns the value of attribute opacity.



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

def opacity
  @opacity
end

#opennessObject

Returns the value of attribute openness.



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

def openness
  @openness
end

#oxObject

Returns the value of attribute ox.



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

def ox
  @ox
end

#oyObject

Returns the value of attribute oy.



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

def oy
  @oy
end

#paddingObject

Returns the value of attribute padding.



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

def padding
  @padding
end

#padding_bottomObject

Returns the value of attribute padding_bottom.



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

def padding_bottom
  @padding_bottom
end

#pauseObject

Returns the value of attribute pause.



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

def pause
  @pause
end

#toneObject

Returns the value of attribute tone.



7
8
9
# File 'lib/rgss3/window.rb', line 7

def tone
  @tone
end

#viewportObject

Returns the value of attribute viewport.



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

def viewport
  @viewport
end

#visibleObject

Returns the value of attribute visible.



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

def visible
  @visible
end

#widthObject

Returns the value of attribute width.



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

def width
  @width
end

#windowskinObject

Returns the value of attribute windowskin.



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

def windowskin
  @windowskin
end

#xObject

Returns the value of attribute x.



15
16
17
# File 'lib/rgss3/window.rb', line 15

def x
  @x
end

#yObject

Returns the value of attribute y.



16
17
18
# File 'lib/rgss3/window.rb', line 16

def y
  @y
end

#zObject

Returns the value of attribute z.



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

def z
  @z
end

Instance Method Details

#close?Boolean

Returns:

  • (Boolean)


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

def close?
  @openness == 0
end

#disposeObject



136
137
138
139
# File 'lib/rgss3/window.rb', line 136

def dispose
  each_internal_sprite(&:dispose)
  @disposed = true
end

#disposed?Boolean

Returns:

  • (Boolean)


141
142
143
# File 'lib/rgss3/window.rb', line 141

def disposed?
  @disposed
end

#move(x, y, width, height) ⇒ Object



58
59
60
61
62
63
# File 'lib/rgss3/window.rb', line 58

def move(x, y, width, height)
  self.x = x
  self.y = y
  @width = width
  @height = height
end

#open?Boolean

Returns:

  • (Boolean)


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

def open?
  @openness == 255
end

#updateObject



55
56
# File 'lib/rgss3/window.rb', line 55

def update
end